database-architect

A database-design guide covering how to structure data, queries, indexes, transactions, migrations, scaling, and high availability across common database systems.

In plain words
What is it for?
Planning schemas and relationships, choosing indexes, optimizing queries, designing replication and partitioning, handling multiple customers, and building safer migrations.
Why use it?
It helps prevent slow queries, unsafe schema changes, locking problems, and designs that fail as data or traffic grows.

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/code-saurabh/openskills/database-architect
Any agent
npx skills add CODE-SAURABH/OpenSkills --skill database-architect
Clone the repo
git clone --depth 1 https://github.com/CODE-SAURABH/OpenSkills

Made for: Claude Code, Codex.

Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,773 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.00126 $0.03773
Opus 5 $0.00063 $0.01886
Sonnet 5 $0.00025 $0.00755
Haiku 4.5 $0.00013 $0.00377

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

Security

Grade A, and why

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

database-architect/SKILL.md · 254 lines

How it starts

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

Database Architecture

Approach every database task as the engineer who has debugged a production outage caused by a missing index at 2am, and a data-loss incident caused by a migration with no rollback plan. The database is the most durable part of the system — it outlives every framework, every language, and every application rewrite. Design it with that lifespan in mind, not the lifespan of this sprint.


Step 0: Understand the Data Before Touching the Schema

Before designing any schema or query, answer:

  1. What are the read patterns? What queries run most frequently, and what does a typical one look like?
  2. What are the write patterns? Insert-heavy? Update-heavy? Append-only? Bulk loads?
  3. What's the read/write ratio? 80/20 read-heavy changes storage and indexing decisions completely from 20/80 write-heavy.
  4. What are the consistency requirements? Can the system tolerate stale reads? Does any path need serializable transactions?
  5. What's the expected data volume and growth rate? A schema that's fine at 1M rows can fall over at 1B — but over-engineering for scale you'll never hit wastes real effort too.

Design for the actual access patterns, not the entity relationships in isolation — a textbook-perfect 3NF schema that requires five joins for the one query that runs 10,000 times a second is not a well-designed schema.


Choosing the Right Database

Use Case Database Why
Relational data with ACID transactions PostgreSQL Best-in-class open-source RDBMS; rich feature set (JSONB, window functions, extensions); strong community
Simple relational, read-heavy, broad ecosystem MySQL Widely supported; performant for read-heavy workloads
Document store, flexible schema, horizontal scale MongoDB Good for hierarchical, variable-structure data; native sharding
Cache, session store, rate limiting, pub/sub Redis In-memory; sub-millisecond latency; rich data structures
Full-text search Elasticsearch Inverted index; powerful query DSL; aggregations
Time-series data TimescaleDB / InfluxDB Optimized for time-ordered inserts and range queries
Graph relationships Neo4j / Amazon Neptune When relationship traversal is the primary access pattern, not a rare join

Read the full file on GitHub · 254 lines

Files

What ships with it

1 file 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. 2d ago First seen · 254 lines · 126 tokens per session scan A 5de29b4b998a

Subscribe to this mod's changes

database-architect is a skill published in the GitHub repository CODE-SAURABH/OpenSkills (2 stars, last pushed 1mo ago), licensed MIT. It adds 126 tokens to every session and 3,773 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

seo-image-gen

AI image generation for SEO assets: OG/social preview images, blog hero images, schema images, product photography, infographics. Powered by Gemini via nanobanana-mcp. Requires banana extension installed. Use when user says "generate image", "OG image", "social preview", "hero image", "blog image", "product photo"…

AgriciDaniel/claude-seo · 111 tokens

seo-audit

Full website SEO audit with parallel subagent delegation. Crawls up to 500 pages, detects business type, delegates to up to 15 specialists (8 always + 7 conditional), generates health score. Use when user says audit, full SEO check, analyze my site, or website health check.

AgriciDaniel/claude-seo · 64 tokens

obsidian-markdown

Explain, draft, or validate Obsidian Flavored Markdown syntax: properties, wikilinks, embeds, callouts, tags, comments, highlights, block references, math, and Mermaid. Use when the user explicitly requests Obsidian note formatting or syntax help, not for general Markdown or broad vault operations.

AgriciDaniel/claude-obsidian · 68 tokens

wiki-lint

Run a deterministic, read-only health check on an Obsidian wiki. Use for lint, vault health check, audit wiki health, find orphans, find dead links, frontmatter audit, provenance audit, or wiki audit. Reports graph, link, frontmatter, provenance-ledger, empty-section, and stale-index findings; it does not reason…

AgriciDaniel/claude-obsidian · 79 tokens

ecommerce-landing-page

Audit and optimize e-commerce landing pages for conversion. CTA placement, trust signals, page structure, copy optimization, and A/B testing strategy for product pages, collection pages, and campaign landing pages.

nexscope-ai/eCommerce-Skills · 45 tokens

blog-google

Google API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature…

AgriciDaniel/claude-blog · 155 tokens