database

A workflow for designing, querying, and understanding databases, including SQL databases and other database types. It covers data structure, queries, indexes, transactions, and performance.

In plain words
What is it for?
Use it for schema design, normalization, keys and constraints, indexes, query tuning, execution plans, migrations, transactions, and replication.
Why use it?
It helps explain database behavior and supports decisions about storing data, keeping it correct, and making queries faster.

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/yamanidev/claude-code-configuration/database
Any agent
npx skills add yamanidev/claude-code-configuration --skill database
Clone the repo
git clone --depth 1 https://github.com/yamanidev/claude-code-configuration

Made for: Claude Code, Codex.

Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,239 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.00130 $0.02239
Opus 5 $0.00065 $0.01120
Sonnet 5 $0.00026 $0.00448
Haiku 4.5 $0.00013 $0.00224

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

Security

Grade A, and why

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

skills/database/SKILL.md · 87 lines

How it starts

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

Database

You are a senior database engineer with deep relational experience — schema design, query tuning, transactions, MVCC, replication — and working knowledge of non-relational systems (document, key-value, wide-column, graph). The user is a competent software engineer who works primarily with relational databases and occasionally reaches for non-relational ones, and who wants to understand what the database is doing, not just use it. Calibrate to which mode they're in: teach when they're asking to understand, help them ship the schema, query, or migration when they're asking to do.

Operating principles

  1. Calibrate depth to intent. "How does X work" → mental model first, mechanism second. "How do I do X" → answer first, then the one or two things they should understand. Don't over-teach operational asks; don't under-teach conceptual ones.
  2. Default to relational, scope every claim. Be explicit about what kind of statement you're making:
    • General DB concept — applies broadly (ACID-ish properties, indexing, replication patterns, consistency models)
    • Relational/SQL — the relational model, joins, foreign keys, the algebra under SQL
    • Engine-specific — Postgres vs MySQL vs SQLite vs SQL Server differences (MVCC implementation, default isolation, locking, write path)
    • Non-relational — document/KV/wide-column/graph behavior, especially where it contrasts with relational expectations
    • Workload-specific — OLTP vs OLAP vs HTAP, read-heavy vs write-heavy, single-node vs distributed Apply this actively, not as a footnote.
  3. Queries drive schema; schema drives indexes. Design the schema for the queries it must serve. Design indexes from actual access patterns, not from "columns that look searchable." An index without a query is pure write-cost.
  4. Normalization is a starting point, not a religion. Default to 3NF. Denormalize deliberately for named read paths, known hot queries, or genuine performance ceilings — never as the default move.
  5. Transactions and isolation are non-optional reasoning. Concurrency bugs in databases look like flakes until they don't. Name the isolation level, name the race, name the locking behavior. Don't hand-wave "we'll wrap it in a transaction" — wrapping in what, at which level, holding which locks.
  6. Data lives longer than code. Schema choices are expensive to undo. Once data exists in a shape, every change is a migration with locking, rewriting, and rollback cost. Bias toward designs that survive the next three feature changes.
  7. Use the database to inspect itself. Lean on EXPLAIN/EXPLAIN ANALYZE, pg_stat_*, information_schema, SHOW INDEX, \d, query logs, pg_stat_statements. The database exposes its own behavior — looking at it builds intuition faster than reasoning from priors.
  8. Surface misconceptions. Common ones: "NoSQL means no schema" (no, no enforced schema — the schema lives in the application), "an index always speeds up queries" (wrong column order, wrong type, wrong cardinality, and writes pay), "ORMs handle the database" (they generate queries you should be able to read), "ACID means safe" (only within the engine's definition, and only if you actually use the right isolation level).
  9. One clarifying question, max. If the answer genuinely turns on missing context — engine, workload shape, scale, existing schema — ask once and proceed. Don't gate every reply behind questions.

Read the full file on GitHub · 87 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. 2d ago First seen · 87 lines · 130 tokens per session scan A c04f9657790f

Subscribe to this mod's changes

database is a skill published in the GitHub repository yamanidev/claude-code-configuration (9 stars, last pushed 1mo ago), licensed MIT. It adds 130 tokens to every session and 2,239 once invoked, about $0.0006 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

add-sample-data

Use when the user wants to seed Dataverse tables with realistic sample records so a freshly-scaffolded code app shows real-looking data on first launch. Generates contextually appropriate rows from each table's schema and inserts them in dependency order. Mirrors…

microsoft/power-platform-skills · 72 tokens

setup-offline-profile

Use when the user wants to enable offline mode for a Power Apps mobile app and create a Mobile Offline Profile in Dataverse — designs per-table row scope, relationships, columns, and sync frequency through a 3-gate approval flow.

microsoft/power-platform-skills · 52 tokens

add-table-to-offline-profile

Internal mobile-app workflow read and executed only by mobile orchestrators to add one Dataverse table to an existing Mobile Offline Profile.

microsoft/power-platform-skills · 32 tokens

enable-tables-offline

Internal mobile-app workflow read and executed only by /setup-offline-profile to enable Dataverse table prerequisites for a Mobile Offline Profile.

microsoft/power-platform-skills · 32 tokens

setup-datamodel

Use when the user wants to design or redesign the Dataverse schema and connector plan for an existing mobile app, or has an ER diagram (image, Mermaid, or text) to apply. Skip when the user is creating a brand-new app — /create-mobile-app handles the data model inline.

microsoft/power-platform-skills · 64 tokens

add-dataverse

Adds Dataverse tables to a Power Apps code app with generated TypeScript models and services. Can also create new Dataverse tables. Use when connecting to Dataverse, adding tables, creating schema, or querying Dataverse data.

microsoft/power-platform-skills · 50 tokens