database-design

database-design is a skill for Claude Code, Codex from HK-hub/AgentSkills. It costs 52 tokens per session (3,718 once invoked), scanned A, original, MIT.

Guidance for designing and improving databases, including their tables, relationships, indexes, queries, and scaling approach.

In plain words
What is it for?
Use it to plan schemas and entity relationships, normalize data, choose indexes, optimize SQL, design migrations, and consider partitioning, backups, and recovery.
Why use it?
It helps prevent poorly structured data, slow queries, difficult migrations, and database systems that are hard to expand or recover.

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/hk-hub/agentskills/database-design
Any agent
npx skills add HK-hub/AgentSkills --skill database-design
Clone the repo
git clone --depth 1 https://github.com/HK-hub/AgentSkills

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/hk-hub/agentskills/database-design.svg)](https://agentmods.dev/skills/hk-hub/agentskills/database-design)
Your own site
<a href="https://agentmods.dev/skills/hk-hub/agentskills/database-design"><img src="https://agentmods.dev/badge/skills/hk-hub/agentskills/database-design.svg" alt="Measured on agentmods" height="20"></a>
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 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 $0.00052 $0.03718
Opus 5 $0.00026 $0.01859
Sonnet 5 $0.00010 $0.00744
Haiku 4.5 $0.00005 $0.00372

Measured 4d 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 4d 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

Copies of this mod

1 near-identical copy found in the catalogue:

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. 4d 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 HK-hub/AgentSkills (6 stars, last pushed 17d 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. 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

opik-backend

Java backend patterns for Opik. Use when working in apps/opik-backend, designing APIs, database operations, or services.

comet-ml/opik · 31 tokens

opencode-qa

QA opencode itself, per case: verify the CLI/terminal (opencode run, db, serve, export), prove a specific plugin hook/action/event fired via the SSE event stream, smoke-test the TUI under tmux, and investigate sessions in opencode's SQLite DB by id, title/name, or message text. Ships tested helper scripts (each with a…

code-yeongyu/oh-my-openagent · 179 tokens

db-migrations

Create a database migration with Drizzle on a fresh Neon branch. Use when changing the packages/db schema or generating migrations.

superset-sh/superset · 28 tokens

minimax-h3-reference-video-prompt

Default downstream MiniMax H3 specialist for every image-based request unless the user explicitly declares boundary-only first/last frames with no reusable reference role. Use the official six-section full-reference format for character/person/object consistency, scene/style/action/camera/storyboard/voice/audio…

unknowlei/minimax-h3-opencode-skills · 89 tokens

minimax-h3-keyframe-video-prompt

Narrow downstream MiniMax H3 specialist for pure I2VA, FL2VA, and L2VA boundary-frame prompts. Use only after minimax-h3-creative-director verifies that the user explicitly declared the images as literal first/last frames and that they have no character, identity, person, object, costume, scene, style, voice, action…

unknowlei/minimax-h3-opencode-skills · 108 tokens

minimax-h3-multishot-planner

Non-skippable planning-only MiniMax H3 subskill used by minimax-h3-creative-director before final prompt formatting. Invoke when the user explicitly requests multiple shots, scenes, cuts, montage, or shot-by-shot design, or when a video of at least 10 seconds has no declared single-shot/multishot preference and the…

unknowlei/minimax-h3-opencode-skills · 120 tokens