architecture-database-scaling

architecture-database-scaling is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 138 tokens per session (2,137 once invoked), scanned A, original, MIT.

A guide to expanding a database beyond one machine by adding resources or splitting its data across several servers.

In plain words
What is it for?
Use it to understand vertical and horizontal scaling, choose a shard key, and design data routing with consistent hashing.
Why use it?
It explains how to handle growing data and avoid moving large amounts of data whenever servers are added or removed.

Skill for Claude CodeCodex

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

Good fit Use it to understand vertical and horizontal scaling, choose a shard key, and design data routing with consistent hashing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/j4flmao/agent-skills/scaling-and-sharding
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 j4flmao/agent-skills --skill scaling-and-sharding
Clone the repo
git clone --depth 1 https://github.com/j4flmao/agent-skills

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 architecture-database-scaling

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/scaling-and-sharding/github.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/scaling-and-sharding)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/scaling-and-sharding"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/scaling-and-sharding/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 architecture-database-scaling

Your own site · 80×15
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/scaling-and-sharding"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/scaling-and-sharding.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 138 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,137 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00138 $0.02137
Opus 5.5 $0.00055 $0.00855
Sonnet 5.5 $0.00028 $0.00427
Haiku 4.5 $0.00014 $0.00214

Measured 9d ago against content hash 6575803b41b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

architecture-database-scaling 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 9d 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/architecture/databases/scaling-and-sharding/SKILL.md · 172 lines

How it starts

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

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.
  • Shard key covers the dominant queries and distributes load evenly.
  • Resharding approach defined (logical buckets, online move).
  • Cross-shard queries and transactions explicitly handled.

The Scaling Ladder

Step Fixes Cost
1. Query + index tuning Most "DB is slow" cases Low
2. Connection pooling (PgBouncer, RDS Proxy) Connection exhaustion Low
3. Vertical scaling CPU/RAM/IOPS limits Money; has a ceiling
4. Caching (cache-aside) Read-heavy hot keys Invalidation complexity
5. Read replicas Read throughput Replication lag: stale reads
6. Partitioning (single node) Huge tables, retention (drop old partitions) Partition key in queries
7. Functional split Separate DBs per domain/service Cross-domain joins move to app
8. Horizontal sharding Write throughput, data beyond one node High, permanent

Read the full file on GitHub · 172 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. 9d ago Changed · +135 lines · +138 tokens per session 6575803b41b7
  2. 2mo ago First seen · 37 lines · 0 tokens per session scan A 09dab4cb4d50

Subscribe to this mod's changes

architecture-database-scaling is a skill published in the GitHub repository j4flmao/agent-skills (38 stars, last pushed 3d ago), licensed MIT. It adds 138 tokens to every session and 2,137 once invoked, about $0.0006 per session on Opus 5.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-30.

Related

architecture-database-scaling compared with skills from other repositories

architecture-database-scaling next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
architecture-database-scalingj4flmao/agent-skillsSkill383d agoMITA138Claude Code, Codex
multi-tenancycamilooscargbaptista/cto-toolkitSkill87mo agoMITA22Claude Code
database-management-patternsmanutej/luxor-claude-marketplaceSkill634mo agononeA31Claude Code
partitioning-strategy-advisorbookforge-ai/bookforge-skillsSkill426mo agoCC-BY-SA-4.0A248Claude Code
database-advanced-optimizationwilliamzujkowski/standardsSkill192mo agoMITA15Claude Code, Codex
mysqlericrisco/rsc-harnessSkill5032d agoMITA116Claude Code, Codex
architecture-paradigm-cqrs-esathola/claude-night-marketSkill348yesterdayMITA39Claude Code