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/sananthanarayan/skilldrop/db-schema-designnpx skills add sananthanarayan/skilldrop --skill db-schema-designgit clone --depth 1 https://github.com/sananthanarayan/skilldropWrote 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/sananthanarayan/skilldrop/db-schema-design)<a href="https://agentmods.dev/skills/sananthanarayan/skilldrop/db-schema-design"><img src="https://agentmods.dev/badge/skills/sananthanarayan/skilldrop/db-schema-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.1 | $0.00089 | $0.01887 |
| Opus 5 | $0.00044 | $0.00944 |
| Sonnet 5 | $0.00018 | $0.00377 |
| Haiku 4.5 | $0.00009 | $0.00189 |
Grade A, and why
db-schema-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 6d 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 — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
db-schema-design
Designs the storage layer from the queries backward — because a schema is right or wrong only relative to how it's read and written, and the most expensive schema mistakes are the access paths nobody designed for. Distinct from data-contract (the guarantee on a published dataset) and api-contract-draft (the sync interface): this is the table/collection/key design underneath. Hands evolution off to migration-plan and the published-dataset guarantee to data-contract.
How to respond
-
Collect the access patterns before drawing a single table. The deliverable starts as a list: each read and write the feature needs, with frequency, latency sensitivity, selectivity (one row / a range / a scan), and consistency need (read-your-writes? eventual ok?). Ask at most 2 questions, spent on the highest-frequency query and the largest-growth entity. A schema designed from the entity diagram instead of the queries is how you get a clean model that can't serve its hottest path.
-
Choose the paradigm deliberately, with a reason (selection matrix in
reference.md). Relational is the correct default for most transactional features and needs no defense; reaching past it does. ✅ "Document store — the entity is read and written whole, no cross-entity queries, and the shape varies per type" — ❌ "NoSQL because scale" (scale is a property of access patterns and data size, not a vibe). For NoSQL especially, the access patterns are the schema — you cannot add a query later for free the way SQL lets you. -
Design keys from the queries.
- Relational: surrogate key (e.g.
bigint/ULID) as PK by default; natural keys get a unique constraint, not the clustered PK. Avoid random UUIDv4 as a clustered/primary key — it scatters writes and splits pages; use a time-ordered ID (ULID/UUIDv7) when you need a UUID and ordered inserts. - NoSQL: partition key + sort key derived directly from the access patterns, chosen to spread load (no hot partition) and to co-locate what's read together. State the query each key shape serves.
- Relational: surrogate key (e.g.
What ships with it
5 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.
- 6d ago First seen · 69 lines · 89 tokens per session scan A 8c8a40cc787b
db-schema-design is a skill published in the GitHub repository sananthanarayan/skilldrop (2 stars, last pushed 22d ago), licensed MIT. It adds 89 tokens to every session and 1,887 once invoked, about $0.0004 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
backend-patterns
Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes. Use when building or reviewing Node.js, Express, or Next.js API routes and their data access.
chroma
Embedding database for RAG and semantic search.
pinecone
Managed vector DB for production RAG and search.
postgres-patterns
PostgreSQL database patterns for query optimization, schema design, indexing, and security. Quick reference for common patterns, index types, data types, and anti-pattern detection. Based on Supabase best practices.
postgresql-table-design
Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.
event-store-design
Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.