database-design

database-design is a skill for Claude Code, Codex from bcastelino/agent-skills-kit. It costs 32 tokens per session (347 once invoked), scanned A, a copy of database-design, MIT.

A guide to making database decisions, including table structure, indexes, database products, object-relational mappers and safe schema changes. An object-relational mapper connects application code to database tables.

In plain words
What is it for?
Use it when designing or reviewing a database, choosing a database or mapper, planning indexes, improving queries or preparing migrations.
Why use it?
It helps avoid poorly structured data, slow queries and database choices that do not fit the application or its deployment environment.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing or reviewing a database, choosing a database or mapper, planning indexes, improving queries or preparing migrations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bcastelino/agent-skills-kit/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 bcastelino/agent-skills-kit --skill database-design
Clone the repo
git clone --depth 1 https://github.com/bcastelino/agent-skills-kit

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin database-design/plugin install database-design after adding the marketplace above.

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/bcastelino/agent-skills-kit/database-design.svg)](https://agentmods.dev/skills/bcastelino/agent-skills-kit/database-design)
Your own site
<a href="https://agentmods.dev/skills/bcastelino/agent-skills-kit/database-design"><img src="https://agentmods.dev/badge/skills/bcastelino/agent-skills-kit/database-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 347 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 88% 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.1 $0.00032 $0.00347
Opus 5 $0.00016 $0.00173
Sonnet 5 $0.00006 $0.00069
Haiku 4.5 $0.00003 $0.00035

Measured 7d ago against content hash 6954290df6d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/schema_validator.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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

88% identical to database-design — 3 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/database-design/SKILL.md · 52 lines

What it actually says

Database Design

Learn to THINK, not copy SQL patterns.

🎯 Selective Reading Rule

Read ONLY files relevant to the request! Check the content map, find what you need.

File Description When to Read
database-selection.md PostgreSQL vs Neon vs Turso vs SQLite Choosing database
orm-selection.md Drizzle vs Prisma vs Kysely Choosing ORM
schema-design.md Normalization, PKs, relationships Designing schema
indexing.md Index types, composite indexes Performance tuning
optimization.md N+1, EXPLAIN ANALYZE Query optimization
migrations.md Safe migrations, serverless DBs Schema changes

⚠️ Core Principle

  • ASK user for database preferences when unclear
  • Choose database/ORM based on CONTEXT
  • Don't default to PostgreSQL for everything

Decision Checklist

Before designing schema:

  • Asked user about database preference?
  • Chosen database for THIS context?
  • Considered deployment environment?
  • Planned index strategy?
  • Defined relationship types?

Anti-Patterns

❌ Default to PostgreSQL for simple apps (SQLite may suffice) ❌ Skip indexing ❌ Use SELECT * in production ❌ Store JSON when structured data is better ❌ Ignore N+1 queries

Files

What ships with it

7 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. 7d ago First seen · 52 lines · 32 tokens per session scan A 6954290df6d7

Subscribe to this mod's changes

database-design is a skill published in the GitHub repository bcastelino/agent-skills-kit (2 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 347 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to database-design, differing in 3 lines, and is treated as a copy.

Related

Other skills, from other repositories

notebook-kb

Use the notebook knowledge base (the local SQLite RAG /agy:notebook builds from a folder of documents) to do precise, grounded, cited work — total amounts by category, find every doc that mentions a person/organization, build a timeline, export a table — instead of re-reading prose and burning Claude's context.…

MarcosNahuel/antigravity-plugin-cc · 108 tokens

ecto-patterns

Ecto patterns — schemas, changesets, queries, migrations, Multi, associations, preloads, upserts. Use when editing Repo calls, Ecto.Query, or schema fields. Skip for Ash.

oliver-kriska/claude-elixir-phoenix · 45 tokens

ggsql

Write ggsql queries — a grammar of graphics for SQL. Use when the user wants to create, modify, or understand a ggsql visualization query.

posit-dev/skills · 33 tokens

bun-sqlite

Use for bun:sqlite, SQLite operations, prepared statements, transactions, and queries.

secondsky/claude-skills · 22 tokens

researcher

Delegate a deep research or survey task to Google's Antigravity CLI (agy staffer, fast Gemini). Use when the user says /agy:researcher, "ask agy to research", "have the agy staffer survey X", or wants a second, independent deep-dive on a topic or codebase without spending the host model's quota.

keli-wen/agy-staff · 75 tokens

migration-ready-schema

Data-model rules that make a schema importable from day one, so the migration-import-engineer is never blocked on missing columns. Every SMB Product-Builder product must let a customer bring their data from an incumbent (ServiceTitan/Toast/Mindbody/Shopify) — that requires provenance (sourceref) and rollback…

avelikiy/great_cto · 133 tokens