database-design

database-design is a skill for Claude Code, Codex from hautc-it/cil. It costs 51 tokens per session (1,114 once invoked), scanned A, original, MIT.

A guide for planning a database’s tables, fields, relationships, indexes, and storage approach before building it. It also covers how the design should fit an existing project and change safely over time.

In plain words
What is it for?
Use it to model entities, choose between SQL and NoSQL databases, plan indexes, account for read and write patterns, and prepare for future schema changes.
Why use it?
It helps avoid database structures that are difficult to query, slow under real use, or expensive to change later. It also keeps new tables consistent with the project’s existing conventions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit Use it to model entities, choose between SQL and NoSQL databases, plan indexes, account for read and write patterns, and prepare for future schema changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hautc-it/cil/database-design
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.

Any agent
npx skills add hautc-it/cil --skill database-design
Clone the repo
git clone --depth 1 https://github.com/hautc-it/cil

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/hautc-it/cil/database-design/github.svg)](https://agentmods.dev/skills/hautc-it/cil/database-design)
Your own site
<a href="https://agentmods.dev/skills/hautc-it/cil/database-design"><img src="https://agentmods.dev/badge/skills/hautc-it/cil/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.

agentmods 80×15 button for database-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/hautc-it/cil/database-design"><img src="https://agentmods.dev/badge/skills/hautc-it/cil/database-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,114 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.00051 $0.01114
Opus 5.5 $0.00020 $0.00446
Sonnet 5.5 $0.00010 $0.00223
Haiku 4.5 $0.00005 $0.00111

Measured 1mo ago against content hash 9c04b6a3cd08, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

templates/skills/database-design/SKILL.md · 100 lines

How it starts

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

Database Design Skill

Project Context

Existing project

  1. Read CLAUDE.md — existing schema conventions, DB constraints, or naming rules take priority.
  2. Identify the DB and ORM — PostgreSQL/MySQL/SQLite/MongoDB? Raw SQL, TypeORM, Prisma, SQLAlchemy, GORM? Read 2–3 existing model/schema files to understand naming (snake_case vs camelCase), primary key style (uuid vs serial), and timestamp conventions.
  3. Check the existing schema — new entities must follow the same patterns: column naming, index naming, foreign key style, soft-delete convention.
  4. Understand the migration workflow — how does this project evolve schema? (See the migration skill.) Design with the migration path in mind — changes that can't be migrated safely are bad designs.
  5. Search memory — memory_search("database schema [entity] design") — retrieve prior schema decisions, normalization choices, or known performance constraints.
  6. Consistency with existing tables beats theoretical correctness.

Greenfield project

No schema exists yet — foundational choices here are expensive to undo:

  1. Choose the database and query layer together — the query layer (ORM, query builder, or raw queries) constrains which DB features you can use cleanly. Choose the pairing that fits the platform and team, not just the DB in isolation.
  2. Set naming conventions before the first table — decide and document:
    • Table/collection naming style (singular vs plural, casing)
    • Primary key style (auto-increment integer, UUID, or platform-specific)
    • Timestamp columns (created_at, updated_at on every record; deleted_at if soft-delete is needed)
    • Foreign key naming pattern
  3. Do the access pattern analysis first (see Protocol step 1 below) — schema designed without knowing the read/write queries will need expensive rework.
  4. Design for migration — columns should be nullable or have cheap defaults so future schema changes don't require table rewrites or long locks.
  5. Write conventions into CLAUDE.md — naming rules, primary key style, soft-delete approach. This prevents divergence as the codebase grows.
  6. Store the decisions:
    memory_store("decision", "db: [database]+[query layer], PKs=[style], naming=[style], soft-delete=[x]", ["database", "schema", "conventions"])
    

Read the full file on GitHub · 100 lines

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. 1mo ago First seen · 100 lines · 51 tokens per session scan A 9c04b6a3cd08

Subscribe to this mod's changes

database-design is a skill published in the GitHub repository hautc-it/cil (1 stars, last pushed 2mo ago), licensed MIT. It adds 51 tokens to every session and 1,114 once invoked, about $0.0002 per session on Opus 5.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