db-schema-design

db-schema-design is a skill for Claude Code from sananthanarayan/skilldrop. It costs 89 tokens per session (1,887 once invoked), scanned A, original, MIT.

A database design aid that starts with the queries and updates an application needs, then chooses a suitable storage structure and supporting keys or indexes.

In plain words
What is it for?
Use it to plan relational, document, key-value, wide-column, or graph databases, including partitioning, indexes, time and money fields, and read-path checks.
Why use it?
It reduces the risk of creating tables or collections that look tidy but make important reads slow or difficult.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the skilldrop plugin — 51 skills, 4 agents shipped together

Install

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.

agentmods
npx agentmods add skills/sananthanarayan/skilldrop/db-schema-design
Any agent
npx skills add sananthanarayan/skilldrop --skill db-schema-design
Clone the repo
git clone --depth 1 https://github.com/sananthanarayan/skilldrop

Made for: Claude Code.

Or install skilldrop, the plugin that ships this one along with the rest of its 51 skills, 4 agents.

Wrote 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.

agentmods badge for db-schema-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/sananthanarayan/skilldrop/db-schema-design.svg)](https://agentmods.dev/skills/sananthanarayan/skilldrop/db-schema-design)
Your own site
<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>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,887 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 6d ago against content hash 8c8a40cc787b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

skills/db-schema-design/SKILL.md · 69 lines

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

  1. 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.

  2. 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.

  3. 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.

Read the full file on GitHub · 69 lines

Files

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.

Changes

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.

  1. 6d ago First seen · 69 lines · 89 tokens per session scan A 8c8a40cc787b

Subscribe to this mod's changes

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.