schema-design

schema-design is a skill for Claude Code, Codex from int2t05/engineering-skills. It costs 62 tokens per session (1,515 once invoked), scanned A, original, MIT.

A guide to designing the structure of a relational database, including its tables, links between records, rules, and ways to find data quickly.

In plain words
What is it for?
Use it when planning or reviewing entities and relationships, database normalization, indexes, constraints, or partitioning in PostgreSQL, MySQL, or SQLite.
Why use it?
It helps prevent data models that become slow, inconsistent, or difficult to change as features are added.

Skill for Claude CodeCodex

Written for Claude Code and Codex: ${CLAUDE_PLUGIN_ROOT} variable, but also agents/openai.yaml present.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the engineering-skills plugin — 47 skills, 1 hook shipped together

Good fit Use it when planning or reviewing entities and relationships, database normalization, indexes…

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add int2t05/engineering-skills
Claude Code
/plugin install engineering-skills

Made for: Claude Code, Codex.

Or install engineering-skills, the plugin that ships this one along with the rest of its 47 skills, 1 hook.

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 schema-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/int2t05/engineering-skills/schema-design.svg)](https://agentmods.dev/skills/int2t05/engineering-skills/schema-design)
Your own site
<a href="https://agentmods.dev/skills/int2t05/engineering-skills/schema-design"><img src="https://agentmods.dev/badge/skills/int2t05/engineering-skills/schema-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,515 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00062 $0.01515
Opus 5 $0.00031 $0.00758
Sonnet 5 $0.00012 $0.00303
Haiku 4.5 $0.00006 $0.00152

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

Security

Grade A, and why

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/03-design/schema-design/SKILL.md · 125 lines

How it starts

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

Schema Design

Design the data model that sits beneath the API and beside the domain language. architecture picks the datastore type; domain-modeling sharpens the vocabulary; this skill designs the actual shape of the data — entities, relationships, indexes, constraints, and how the model scales. A schema designed reactively (added-to-as-features-arrive) becomes a performance and correctness liability that is expensive to fix later.

When to use

  • Designing entities and relationships for a new feature or bounded context
  • Choosing normalization level, indexing strategy, or partitioning for a new model
  • Reviewing a proposed schema for correctness, performance, or future evolution
  • Triggers on "data model", "schema design", "database design", "ER model", "数据模型", "表结构设计", "数据库设计"

Scope: assumes a relational datastore (Postgres/MySQL/SQLite). For document stores (MongoDB), key-value (DynamoDB), or graph stores, the embedding-vs-referencing and sharding decisions differ — use architecture for datastore selection, then adapt these patterns.

Not for: choosing the datastore type (use architecture); ubiquitous-language glossary (use domain-modeling); API request/response shapes (use api-design); changing an existing schema in production (use deprecation-migration).

Steps

1. Map entities and relationships

Start from the domain model (domain-modeling output / CONTEXT.md) and translate nouns into entities, verbs into relationships. For each entity, identify its identity (primary key), its attributes, and its lifecycle (created, mutated, archived, deleted).

  • Draw an ER diagram (Mermaid erDiagram — see ${CLAUDE_PLUGIN_ROOT}/references/mermaid-diagrams.md)
  • Cardinality for every relationship: one-to-one, one-to-many, many-to-many
  • Resolve many-to-many with junction tables; never hide them in a comma-separated column

Verify: every entity in the domain model is represented; every relationship has documented cardinality.

Read the full file on GitHub · 125 lines

Files

What ships with it

2 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 · 125 lines · 62 tokens per session scan A 95015ef22cb3

Subscribe to this mod's changes

schema-design is a skill published in the GitHub repository int2t05/engineering-skills (3 stars, last pushed 5d ago), licensed MIT. It adds 62 tokens to every session and 1,515 once invoked, about $0.0003 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.

Related

Other skills, from other repositories