Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/svngoku/coding-agents-skills/database-designnpx skills add svngoku/coding-agents-skills --skill database-designgit clone --depth 1 https://github.com/svngoku/coding-agents-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/svngoku/coding-agents-skills/database-design)<a href="https://agentmods.dev/skills/svngoku/coding-agents-skills/database-design"><img src="https://agentmods.dev/badge/skills/svngoku/coding-agents-skills/database-design.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00163 | $0.04202 |
| Opus 5 | $0.00081 | $0.02101 |
| Sonnet 5 | $0.00033 | $0.00840 |
| Haiku 4.5 | $0.00016 | $0.00420 |
Grade A, and why
database-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Design
Database design turns a domain into a schema that stays fast, correct, and easy to evolve for years. This skill covers the full pipeline — requirements analysis, entity modeling, normalization, keys, constraints, indexes, and safe migrations — plus deciding when a document, wide-column, or graph store beats a relational database.
Quick Reference
| Topic | Reference |
|---|---|
| Normalization worked examples, natural vs surrogate keys, UUID vs bigint | normalization-and-keys.md |
| B-tree internals, composite/covering/partial indexes, reading EXPLAIN | indexing-and-query-tuning.md |
| Migration tools (Alembic, Prisma, Flyway), expand-contract, backfilling | migrations-zero-downtime.md |
Core Workflow
Work through these steps in order — each informs the next, and skipping requirements analysis is the most common source of bad schemas.
- Gather requirements. List entities, attributes, and relationships. Note cardinalities and whether each read is CRUD (single-row) or reporting (aggregate). Ask about scale, growth, retention, and compliance (e.g. GDPR erasure).
- Model entities and relationships. Draw an ER sketch. Normalize to 3NF by default; denormalize only later, with a measured reason.
- Choose keys. Prefer surrogate
BIGINT IDENTITYprimary keys unless a natural key is genuinely stable. Decide UUID vs bigint now — changing it later is painful. - Add constraints. NOT NULL, UNIQUE, CHECK, defaults, and foreign keys belong in the database, not just in the ORM.
- Design indexes. Start with the indexes backing PK/FK/UNIQUE constraints, then add query-driven indexes for the hot paths found in step 1.
- Validate with EXPLAIN. Run
EXPLAIN (ANALYZE, BUFFERS)against realistic data. Fix the plan, not the schema, before considering denormalization. - Plan migrations. Versioned migrations in code; expand-contract for anything touching a live table. Never hand-edit production.
What ships with it
8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 299 lines · 163 tokens per session scan A ae57142b82ea
database-design is a skill published in the GitHub repository svngoku/coding-agents-skills (9 stars, last pushed 22d ago), licensed MIT. It adds 163 tokens to every session and 4,202 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
firebase-security-expert
Firebase security expert to audit Security Rules (Firestore/Realtime Database/Storage), authentication, API keys, data leakage prevention, and App Check configuration / Ahli keamanan Firebase untuk audit Security Rules (Firestore/Realtime Database/Storage), autentikasi, API keys, pencegahan kebocoran data, dan…
saas-multi-tenant
Design and implement multi-tenant SaaS architectures with RLS, tenant isolation, and PostgreSQL / Desain dan implementasikan arsitektur SaaS multi-tenant dengan RLS, isolasi tenant, dan PostgreSQL.
database-orm-expert
Expert guide for database schema design, ORM tools (Prisma 6, Drizzle ORM, TypeORM), migrations, query optimization, and type-safe SQL patterns in TypeScript / Panduan ahli untuk desain skema database, ORM tools (Prisma 6, Drizzle ORM, TypeORM), migrasi, optimasi query, dan pola SQL type-safe di TypeScript.
supabase-security-expert
Supabase security expert to audit RLS (Row Level Security), RBAC, relational databases, prevent data leakage, and utilize Supabase Linter / Ahli keamanan Supabase untuk audit RLS (Row Level Security), RBAC, database relasional, pencegahan kebocoran data, dan pemanfaatan Supabase Linter.
edge-serverless-db-expert
Expert guide for Serverless & Edge Databases (Neon Serverless Postgres, Cloudflare D1, Turso/libsql, Upstash Redis), cold-start mitigation, and connection pooling / Panduan ahli database Serverless & Edge (Neon, Cloudflare D1, Turso, Upstash).
supabase-migration
A skill to create or apply a Supabase database migration / Kemampuan untuk membuat atau menerapkan migrasi database Supabase.