database-scaling

database-scaling is a command for Claude Code from navraj007in/architecture-cowork-plugin. It costs 15 tokens per session (1,196 once invoked), scanned A, original, Apache-2.0.

A command that designs ways to handle a database as its data and traffic grow. It considers replicas, connection pooling, partitioning, sharding, and caching for databases such as PostgreSQL, MySQL, and MongoDB.

In plain words
What is it for?
Use it to plan read replicas, route database connections, split large tables into partitions, divide data across servers, size a cache, and produce a design document with configuration examples.
Why use it?
It turns database size and growth information into specific scaling recommendations, so teams do not have to plan capacity from general advice alone.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the architect plugin — 48 skills, 63 commands, 19 agents, 7 MCP servers shipped together

Good fit Use it to plan read replicas, route database connections, split large tables into partitions, divide data across servers, size a cache, and produce a design document with configuration examples.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/navraj007in/architecture-cowork-plugin/database-scaling
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.

Clone the repo
git clone --depth 1 https://github.com/navraj007in/architecture-cowork-plugin

Made for: Claude Code.

Or install architect, the plugin that ships this one along with the rest of its 48 skills, 63 commands, 19 agents, 7 MCP servers.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/navraj007in/architecture-cowork-plugin/database-scaling"><img src="https://agentmods.dev/badge/commands/navraj007in/architecture-cowork-plugin/database-scaling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,196 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.00015 $0.01196
Opus 5 $0.00008 $0.00598
Sonnet 5 $0.00003 $0.00239
Haiku 4.5 $0.00002 $0.00120

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

Security

Grade A, and why

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 11d 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.

commands/database-scaling.md · 146 lines

How it starts

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

/architect:database-scaling

Trigger

/architect:database-scaling [options]

Options:

  • [non_interactive:true] — generate from _state.json

Purpose

Databases hit limits. This command designs a scaling strategy with specific recommendations: read replicas (connection routing), connection pooling (PgBouncer, Prisma), table partitioning (for large entities), horizontal sharding (if needed), caching layer sizing. Tailored to your database type and entity sizes. Outputs design document + config stubs for immediate use.

Workflow

Quick Navigation

Phase Steps
Setup Step 1
Analysis Step 2
Generation Step 3
Completion Step 4 · Step 5

Step 1: Read Context

ℹ️ CONTEXT LOADING: _state.json → SDL

Read:

  • _state.json.entities[] with field counts (to estimate row size)
  • _state.json.tech_stack.database (PostgreSQL, MySQL, MongoDB, etc.)
  • SDL data section (databases, indexes, types)
  • Scaffolded infrastructure (docker-compose.yml, k8s configs)

Step 2: Analyze Scaling Needs

For each entity, estimate:

  • Current size: rows × average row size
  • Growth rate: rows/month (from personas, industry benchmarks)
  • Query patterns: how many reads vs writes
  • Hot data: what percent accessed frequently vs historical

Example analysis:

  • Users table: 100K rows × 1 KB = 100 MB, 10% growth/month
  • Orders table: 1M rows × 2 KB = 2 GB, 20% growth/month
  • Posts table: 10M rows × 500 B = 5 GB, 5% growth/month

Step 3: Generate Scaling Strategy

Create architecture-output/database-scaling.md:

By database size and growth:

Entity Current Monthly Growth Scaling Approach Timeline
users 100 MB 10 MB Connection pooling (PgBouncer) Immediate
orders 2 GB 400 MB Read replicas (2 replicas) 3–6 months
posts 5 GB 250 MB Table partitioning by date 6–12 months
events 50 GB 5 GB Sharding by user_id (4 shards) 12+ months

Read the full file on GitHub · 146 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. 11d ago First seen · 146 lines · 15 tokens per session scan A 284b29d7663a

Subscribe to this mod's changes

database-scaling is a command published in the GitHub repository navraj007in/architecture-cowork-plugin (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 15 tokens to every session and 1,196 once invoked, about $0.0001 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.