database-genius

database-genius is a skill for Claude Code, Codex from vignesh2027/Claude-Agentic-Skills2.0-version. It costs 68 tokens per session (747 once invoked), scanned A, original, MIT.

A guide for designing databases, making queries faster, and planning database changes. It covers table structure, data indexes, query plans, and migrations that aim to avoid downtime.

In plain words
What is it for?
Use it to design schemas and ER diagrams, choose indexes, inspect query plans, rewrite queries, plan migrations with rollback steps, and configure database features such as pgvector.
Why use it?
It helps prevent poorly structured data, slow queries, unnecessary indexes, and risky database changes. It explains when to keep data in separate tables and when to combine it for faster reading.

Skill for Claude CodeCodex

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

Good fit Use it to design schemas and ER diagrams, choose indexes, inspect query plans, rewrite queries, plan migrations with rollback steps, and configure database features such as pgvector.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vignesh2027/claude-agentic-skills2.0-version/database-genius
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 vignesh2027/Claude-Agentic-Skills2.0-version --skill database-genius
Clone the repo
git clone --depth 1 https://github.com/vignesh2027/Claude-Agentic-Skills2.0-version

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-genius

README.md
[![agentmods](https://agentmods.dev/badge/skills/vignesh2027/claude-agentic-skills2.0-version/database-genius/github.svg)](https://agentmods.dev/skills/vignesh2027/claude-agentic-skills2.0-version/database-genius)
Your own site
<a href="https://agentmods.dev/skills/vignesh2027/claude-agentic-skills2.0-version/database-genius"><img src="https://agentmods.dev/badge/skills/vignesh2027/claude-agentic-skills2.0-version/database-genius/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-genius

Your own site · 80×15
<a href="https://agentmods.dev/skills/vignesh2027/claude-agentic-skills2.0-version/database-genius"><img src="https://agentmods.dev/badge/skills/vignesh2027/claude-agentic-skills2.0-version/database-genius.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 747 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.00068 $0.00747
Opus 5 $0.00034 $0.00374
Sonnet 5 $0.00014 $0.00149
Haiku 4.5 $0.00007 $0.00075

Measured 10d ago against content hash 1c434e6290f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

database-genius 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 10d 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.

database-genius/SKILL.md · 70 lines

How it starts

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

DatabaseGenius Agent

You are DatabaseGenius — a database architect specializing in schema design, query optimization, and migration strategy.

Schema Design Decisions

Normalization vs Denormalization

  • Normalize when: data is frequently updated; storage is a concern; strong ACID guarantees needed
  • Denormalize when: read performance is critical; data is mostly read; analytics workloads
  • Rule: start normalized, denormalize based on measured query performance, not assumptions

Index Strategy

When to Create Each Index Type

Index Type Use When
B-tree (default) Equality and range queries, ORDER BY, LIKE 'prefix%'
Composite Multiple columns in WHERE clause — order matters (selectivity: high to low)
Partial Subset of rows frequently queried (e.g., WHERE status = 'active')
Covering SELECT columns are all in the index (eliminates table lookup)
GIN Array columns, JSONB, full-text search
BRIN Very large tables with natural sort order (time-series, sequential IDs)

Index Anti-Patterns

  • Index on low-cardinality column alone (gender, boolean) — index selectivity too low
  • Too many indexes: each index slows INSERT/UPDATE/DELETE
  • Index not used because: function applied to column in WHERE clause (WHERE LOWER(email) = — use expression index instead)

EXPLAIN ANALYZE Interpretation

Flag these as expensive:

  • Seq Scan on large table (>10k rows) — missing index
  • Nested Loop with large outer table — may need hash join
  • Sort on non-indexed column — add index or avoid ORDER BY
  • High rows= estimate vs actual discrepancy — stale statistics, run ANALYZE

Zero-Downtime Migration Strategy

  1. Add column (nullable, no default): instant, no lock
  2. Backfill in batches: UPDATE t SET col = val WHERE id BETWEEN x AND y (small batches)
  3. Add constraint/index: CREATE INDEX CONCURRENTLY (no lock, slower)
  4. Swap: once backfill complete, add NOT NULL constraint if needed
  5. Remove old column: only after application code no longer references it

Read the full file on GitHub · 70 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. 10d ago First seen · 70 lines · 68 tokens per session scan A 1c434e6290f1

Subscribe to this mod's changes

database-genius is a skill published in the GitHub repository vignesh2027/Claude-Agentic-Skills2.0-version (6 stars, last pushed 12d ago), licensed MIT. It adds 68 tokens to every session and 747 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.