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 skills add vignesh2027/AI-AGENT-SKILLS --skill database-designgit clone --depth 1 https://github.com/vignesh2027/AI-AGENT-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/vignesh2027/ai-agent-skills/database-design)<a href="https://agentmods.dev/skills/vignesh2027/ai-agent-skills/database-design"><img src="https://agentmods.dev/badge/skills/vignesh2027/ai-agent-skills/database-design/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/vignesh2027/ai-agent-skills/database-design"><img src="https://agentmods.dev/badge/skills/vignesh2027/ai-agent-skills/database-design.svg" alt="Reviewed on agentmods" width="80" 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.00019 | $0.00589 |
| Opus 5 | $0.00010 | $0.00295 |
| Sonnet 5 | $0.00004 | $0.00118 |
| Haiku 4.5 | $0.00002 | $0.00059 |
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 8d 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 — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Overview
Database schemas are among the hardest things to change in a production system. Migrations run during live traffic. Indexes affect every query. Schema choices made today constrain options for years. This skill gets them right from the start.
When to Use
- Before designing a new table or collection
- Before writing a database migration
- When queries are slow and the cause is suspected to be the schema or indexes
- When designing a new service's data layer
Process
Step 1: Design for the queries, not just the data
Understand the access patterns before normalizing. Which queries are in the critical path? What are the read/write ratios? This drives index and schema decisions.
Step 2: Normalize first, denormalize deliberately
Start with a normalized design. Denormalize only when profiling shows it's necessary, and document why.
Step 3: Choose IDs carefully
- Use UUIDs or ULIDs for globally unique IDs (not auto-increment integers for externally visible IDs)
- Never expose integer sequence IDs to users (enumeration attack)
- Ensure IDs are indexed
Step 4: Migrations — backward compatible first
Every migration must be backward compatible with the current code:
- Deploy migration (add new column, add new table)
- Deploy code that uses the new column
- Deploy cleanup migration (drop old column) — only after old code is gone
Never drop a column in the same deploy that stops using it.
Step 5: Index strategy
Index columns that appear in WHERE clauses, JOIN conditions, and ORDER BY of hot queries. Don't over-index — each index slows writes.
Run EXPLAIN on every hot query before deploying.
Step 6: Soft deletes vs hard deletes
For audit trails, compliance, or reference integrity: use soft deletes (deleted_at timestamp). For data that must be truly erased (GDPR): implement hard delete + audit log.
Step 7: Timestamps and audit columns
Every table should have: created_at, updated_at. Tables with audit requirements: created_by, updated_by.
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.
- 8d ago First seen · 65 lines · 19 tokens per session scan A 62107e31dee9
database-design is a skill published in the GitHub repository vignesh2027/AI-AGENT-SKILLS (2 stars, last pushed 10d ago), licensed MIT. It adds 19 tokens to every session and 589 once invoked, about $0.0001 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
mysql
Query the connected MySQL/MariaDB database with the mysql client. Use when the user asks about their database, tables, rows, schema, or to run SQL against MySQL.
postgres
Query the connected PostgreSQL database with psql. Use when the user asks about their database, tables, rows, schema, or to run SQL against Postgres.
data-architecture
A data-architecture guide for designing how application data is structured, changed, stored, and used. A schema is the defined shape of stored data, such as tables and fields.
dev-database
A database-development guide focused on safe migrations and schema changes. A migration is a controlled change to the structure of stored data, such as adding a table or changing a column.
stale-derived-state
Diagnose a change that does not take effect until a reload, a logout or a navigation away and back, because a cache or a piece of derived state has no invalidation hook on write. Use when a save appears to work but the screen keeps showing the old value. Names the Crumbtrail queries that prove the write landed, and…
database-migration
Use when the user asks to design, review, or execute a database schema change, data backfill, index change, or migration. Inspect the current schema and migration conventions first, plan safe rollout and recovery, and never perform destructive production changes without explicit authorization.