database-design

A guide for organizing stored application data, including tables, relationships, indexes, queries, backups, and large-scale database layouts.

In plain words
What is it for?
Use it to design schemas and entity-relationship diagrams, normalize data, add indexes, optimize queries, plan migrations, and prepare sharding or recovery strategies.
Why use it?
It helps prevent duplicated or inconsistent data and find causes of slow queries or difficult database changes.

Skill for Claude CodeCodex

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/projanvil/mindforge/database-design
Any agent
npx skills add ProjAnvil/MindForge --skill database-design
Clone the repo
git clone --depth 1 https://github.com/ProjAnvil/MindForge

Made for: Claude Code, Codex.

Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,718 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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 $0.00052 $0.03718
Opus 5 $0.00026 $0.01859
Sonnet 5 $0.00010 $0.00744
Haiku 4.5 $0.00005 $0.00372

Measured 2d ago against content hash e2d2691c1237, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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

Origin

This is a copy

100% identical to database-design — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/en/database-design/SKILL.md · 441 lines

How it starts

The opening of the file, as written. The whole thing — 441 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Database Design Skill

You are an expert database architect with 15+ years of experience in designing high-performance, scalable, and maintainable database systems. You specialize in relational database design, ER modeling, normalization, index optimization, sharding, data migration, and disaster recovery.

Your Expertise

Core Database Disciplines

  • ER Diagram Design: Entity-relationship modeling, cardinality, weak/strong entities
  • Database Normalization: 1NF through 5NF, BCNF, denormalization strategies
  • Index Optimization: B-Tree, hash, full-text, spatial indexes, query optimization
  • Sharding & Partitioning: Horizontal/vertical sharding, partition strategies, distributed databases
  • Data Migration: Online/offline migration, dual-write, CDC, validation strategies
  • Backup & Recovery: Full/incremental backups, PITR, disaster recovery, RTO/RPO
  • Query Optimization: EXPLAIN analysis, slow query optimization, execution plans
  • Schema Design: Table design, constraints, relationships, data types
  • Performance Tuning: Query tuning, server configuration, caching strategies

Technical Depth

  • SQL (MySQL, PostgreSQL, Oracle, SQL Server)
  • NoSQL (MongoDB, Redis, Cassandra, DynamoDB)
  • Time-series databases (InfluxDB, TimescaleDB)
  • Columnar databases (ClickHouse, Druid)
  • Graph databases (Neo4j, JanusGraph)
  • Database internals (storage engines, transaction processing, MVCC)
  • Distributed systems (CAP theorem, consistency models, replication)

Core Principles You Follow

1. Database Normalization

First Normal Form (1NF)
Rule: Each column contains atomic values, no repeating groups

❌ Bad Design:
users
| id | name | phones               |
|----|------|----------------------|
| 1  | John | 123-456, 789-012    |

✅ Good Design:
users
| id | name |
|----|------|
| 1  | John |

user_phones
| id | user_id | phone    |
|----|---------|----------|
| 1  | 1       | 123-456  |
| 2  | 1       | 789-012  |
Second Normal Form (2NF)
Rule: 1NF + No partial dependencies (non-key attributes depend on entire primary key)

❌ Bad Design (partial dependency):
order_items
| order_id | product_id | product_name | quantity | unit_price |
|----------|------------|--------------|----------|------------|
| 1        | 100        | Widget       | 5        | 10.00      |

Problem: product_name depends only on product_id, not on (order_id, product_id)

✅ Good Design:
products
| product_id | product_name |
|------------|--------------|
| 100        | Widget       |

order_items
| order_id | product_id | quantity | unit_price |
|----------|------------|----------|------------|
| 1        | 100        | 5        | 10.00      |

Read the full file on GitHub · 441 lines

Files

What ships with it

3 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. 2d ago First seen · 441 lines · 52 tokens per session scan A e2d2691c1237

Subscribe to this mod's changes

database-design is a skill published in the GitHub repository ProjAnvil/MindForge (3 stars, last pushed 5mo ago), licensed MIT. It adds 52 tokens to every session and 3,718 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to database-design, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

opik-diagnose

Surface the Opik traces worth a developer's attention, ranked by signal — errors, failed tool calls, latency, regressions, and low online-eval scores — plus Diagnostics issues. Reads live/production traces via the SDK (searchtraces and agentinsights) and works with no MCP; uses the MCP issue entity when connected.…

comet-ml/opik-mcp · 147 tokens

client-scripts

Write ServiceNow client scripts (onLoad/onChange/onSubmit/onCellEdit) using gform, guser, GlideAjax, field visibility/mandatory toggles, and validation with debounced server calls.

serac-labs/serac · 45 tokens

agoragentic-transaction-assurance

Prepare, evaluate, and reconcile autonomous agent transactions without self-granting payment or owner authority. Use when an agent must bind principal authority, seller terms, payment evidence, execution, delivered outcome, and reconciliation; handle paid retries safely; or prepare an authority request for owner…

rhein1/agoragentic-integrations · 65 tokens

linkding

Manage bookmarks with Linkding. Use when the user asks to "save a bookmark", "add link", "search bookmarks", "list my bookmarks", "find saved links", "tag a bookmark", "archive bookmark", "check if URL is saved", "list tags", "create bundle", or mentions Linkding bookmark management.

jmagar/claude-homelab · 69 tokens

debugging-mutations

Verify what changed on a ServiceNow instance after a tool call — sysaudit inspection, syslog/transaction logs, session context, Flow Designer execution logs, outbound HTTP traces.

serac-labs/serac · 41 tokens

maya-shot-export

Pipeline stage — shot-level export: frame ranges, cameras, FBX / Alembic packaging for editorial. Use when packaging shot data for downstream departments. Not for full pipeline publish (maya-pipeline) or scene assembly (maya-scene-assembly).

dcc-mcp/dcc-mcp-maya · 60 tokens