Use when writing raw SQL with GRDB, complex joins across 4+ tables, window functions, ValueObservation for reactive queries, or dropping down from SQLiteData for performance. Direct SQLite access for iOS/macOS with type-safe queries and migrations.
npx playbooks add skill johnrogers/claude-swift-engineering --skill grdb
Direct SQLite access using [GRDB.swift](https://github.com/groue/GRDB.swift) - type-safe Swift wrapper with full SQLite power when you need it.
ALWAYS load reference files if there is even a small chance the content may be required. It's better to have the context than to miss a pattern or make a mistake.
| Reference | Load When |
|-----------|-----------|
| [Getting Started](references/getting-started.md) | Setting up DatabaseQueue or DatabasePool |
| [Queries](references/queries.md) | Writing raw SQL, Record types, type-safe queries |
| [Value Observation](references/value-observation.md) | Reactive queries, SwiftUI integration |
| [Migrations](references/migrations.md) | DatabaseMigrator, schema evolution |
| [Performance](references/performance.md) | EXPLAIN QUERY PLAN, indexing, profiling |
| Scenario | Use |
|----------|-----|
| Type-safe @Table models | SQLiteData |
| CloudKit sync needed | SQLiteData |
| Complex joins (4+ tables) | GRDB |
| Window functions (ROW_NUMBER, RANK) | GRDB |
| Performance-critical raw SQL | GRDB |
| Reactive queries (ValueObservation) | GRDB |
EXPLAIN QUERY PLAN is guessing. Always profile queries with EXPLAIN before optimizing.PersistableRecord or FetchableRecord correctly leads to silent data loss or deserialization failures. Always implement all required protocols correctly.Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.