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.
npx skills add j4flmao/agent-skills --skill scaling-and-shardinggit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote 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.
[](https://agentmods.dev/skills/j4flmao/agent-skills/scaling-and-sharding)<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.
<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>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once 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 |
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.
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 |
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.
- 9d ago Changed · +135 lines · +138 tokens per session 6575803b41b7
- 2mo ago First seen · 37 lines · 0 tokens per session scan A 09dab4cb4d50
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.
architecture-database-scaling compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| architecture-database-scalingj4flmao/agent-skills | Skill | 38 | 3d ago | MIT | A | 138 | Claude Code, Codex |
| multi-tenancycamilooscargbaptista/cto-toolkit | Skill | 8 | 7mo ago | MIT | A | 22 | Claude Code |
| database-management-patternsmanutej/luxor-claude-marketplace | Skill | 63 | 4mo ago | none | A | 31 | Claude Code |
| partitioning-strategy-advisorbookforge-ai/bookforge-skills | Skill | 42 | 6mo ago | CC-BY-SA-4.0 | A | 248 | Claude Code |
| database-advanced-optimizationwilliamzujkowski/standards | Skill | 19 | 2mo ago | MIT | A | 15 | Claude Code, Codex |
| mysqlericrisco/rsc-harness | Skill | 503 | 2d ago | MIT | A | 116 | Claude Code, Codex |
| architecture-paradigm-cqrs-esathola/claude-night-market | Skill | 348 | yesterday | MIT | A | 39 | Claude Code |