Architecture Database Scaling

Use when the user asks how to scale the database, read replicas, table partitioning, sharding, choosing a shard key, Citus, Vitess, resharding or hot partitions. Produces a scaling ladder plan, shard key and routing design. Not for PostgreSQL engine internals (use architecture-postgresql-internals) or NoSQL selection (use data-nosql-database).

45 stars 6 forksDatabases

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add j4flmao/agent-skills --skill architecture-database-scaling
Manual install
git clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/architecture/databases/scaling-and-sharding ~/.claude/skills/architecture-database-scaling

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Database Scaling & Sharding

## Purpose
Sharding is the most expensive scaling step: it complicates queries, transactions, schema changes, and operations forever. Exhaust cheaper steps first, then, if write volume or data size truly exceeds one node, pick a shard key that keeps most queries single-shard and plan resharding from day one.

## Agent Protocol

### Trigger
"database scaling", "sharding", "shard key", "consistent hashing", "read replica", "table partitioning", "Citus", "Vitess", "resharding", "hot shard".

### Input Context
- Current size, growth rate, read/write QPS, p99 latency, top queries.
- Bottleneck evidence: CPU, I/O, storage, connections, lock contention.
- Access patterns: which key most queries filter by; cross-entity queries/transactions.
- Consistency needs (read-your-writes, cross-entity transactions).

### Output Artifact
Scaling plan: next step on the ladder with evidence, or shard design (key, strategy, routing, resharding, cross-shard handling).

### Response Format
```
Bottleneck: {resource} evidence: {metric}
Step: {index/query|vertical|cache|replicas|partitioning|sharding}
Shard key: {column} (cardinality, distribution, query coverage {x}%)
Strategy: {hash|range|directory|geo}  Routing: {app lib|proxy (Vitess/Citus)}
Cross-shard: {fan-out|denormalize|saga}  Resharding: {virtual buckets → move}
```

### Completion Criteria
- [ ] Bottleneck proven with metrics before choosing a step.
Read the full skill on GitHub

Details

Skill name
architecture-database-scaling
Path
skills/architecture/databases/scaling-and-sharding/SKILL.md
License
MIT
Repo updated
17 November 2026

FAQ

What does the Architecture Database Scaling skill do?

Use when the user asks how to scale the database, read replicas, table partitioning, sharding, choosing a shard key, Citus, Vitess, resharding or hot partitions. Produces a scaling ladder plan, shard key and routing design. Not for PostgreSQL engine internals (use architecture-postgresql-internals) or NoSQL selection (use data-nosql-database).

How do I install the Architecture Database Scaling skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add j4flmao/agent-skills --skill architecture-database-scaling. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Architecture Database Scaling popular?

It lives in j4flmao/agent-skills, which has 45 GitHub stars and 6 forks.

Related skills

Agent Observability

45

j4flmao/agent-skills

Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking per agent, agent audit logs or hallucination/eval monitoring in production. Produces instrumentation config, trace schema, dashboards, alerts and cost attribution. Not for generic service tracing without LLMs (use devops-opentelemetry).

DevOps & Cloud

AI Agent Architectures

45

j4flmao/agent-skills

Use when the user asks to build an AI agent, design an agent that calls tools and keeps memory, write an agent system prompt or pick an agent framework (Claude Agent SDK, OpenAI Agents SDK, LangGraph). Produces an architecture brief covering loop, tools, memory, guardrails and evals, routing depth to child skills. Not for workflow patterns (use ai-agentic-workflows).

AI, LLMs & Agents

AI Agent Core Loop

45

j4flmao/agent-skills

Use when the user asks about the agent loop, ReAct vs plan-and-solve, re-planning, Reflexion, an agent stuck in a loop, max iterations or termination conditions. Produces a loop spec or patch with state, success predicate, caps and no-progress detection. Not for overall agent design (use ai-agent-architectures) or tool schemas (use tool-calling-principles).

AI, LLMs & Agents

Backend Database Patterns

45

j4flmao/agent-skills

Use when the user asks about database schema design, slow queries, indexes, EXPLAIN ANALYZE, N+1 problems, transactions, keyset pagination, connection pooling or repository pattern. Produces schema, index and query fixes. Not for engine internals (use architecture-postgresql-internals) or migrations tooling (use database-migration).

Databases

Storage Selection

48

sethdford/claude-skills

Choose the right database technology for specific workloads. Evaluate relational, NoSQL, data warehouses, and search engines. Use when selecting storage systems for new features or optimizing existing ones.

Databases10

Cloud Native GCP Bigquery

45

j4flmao/agent-skills

Use when the user asks about BigQuery cost, bytes scanned, partitioning and clustering, slots and editions, slow BigQuery queries, or Dremel and Capacitor internals. Produces table designs, query fixes and a pricing-model choice. Not for warehouse vendor comparison (use data-data-warehouse) or dbt projects (use data-science-analytics-engineering).

Databases

Browse the most popular Claude skills, all databases skills, or write your own with the skills generator.