Database schema design, migration discipline, and data modeling for production applications. Use when: designing database tables, creating migrations, choosing between SQL and NoSQL, adding indexes, defining relationships, or reviewing data architecture.
From cksnpx claudepluginhub cardinalconseils/claude-starter --plugin cksThis skill is limited to using the following tools:
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Domain expertise for designing database schemas, writing migrations, modeling relationships, indexing for performance, and maintaining data integrity. Covers relational design principles, naming conventions, ORM patterns, and backup strategy.
id (primary key), created_at, updated_atuuid for IDs, timestamptz for dates, text over varchar (Postgres)NOT NULL, UNIQUE, CHECK, DEFAULT| Type | Implementation | Example |
|---|---|---|
| One-to-one | Foreign key + UNIQUE constraint | user -> profile |
| One-to-many | Foreign key on the "many" side | user -> posts |
| Many-to-many | Junction table with two foreign keys | users <-> roles via user_roles |
{table_a}_{table_b} in alphabetical orderON DELETE behavior (CASCADE, SET NULL, or RESTRICT)WHERE clauses, columns in ORDER BYWHERE status = 'active')20240115_add_role_to_users not migration_042include, joinedload, includes)DEBUG=knex:query, PRISMA_LOG=query)snake_case, singular (user, order_item)snake_case (created_at, first_name){referenced_table}_id (user_id, order_id)idx_{table}_{columns} (idx_user_email)chk_{table}_{rule}, uq_{table}_{columns}| Rationalization | Reality |
|---|---|
| "We'll restructure the DB later" | Schema changes after launch require data migrations on live data. Get it close to right now. |
| "We don't need indexes yet" | Missing indexes cause 100x slower queries as data grows. Add them when creating tables. |
| "The ORM handles everything" | ORMs generate SQL. Understand what SQL they generate, especially for N+1 queries. |
| "We can skip down migrations" | Down migrations are your rollback plan. Skipping them means you cannot undo a bad deploy. |
| "NoSQL is always faster" | NoSQL trades query flexibility for write speed. If you need joins, use a relational database. |
SELECT * in application queriesON DELETE behavior specified on foreign keysid, created_at, updated_atON DELETE behaviorWHERE/ORDER BY clauses are indexed