9 Best Claude Skills for System Design
Claude skills, commands, and agents for system design: specs, design docs, ADRs, diagrams from code, threat models, idempotency, rate limits, caching, and migrations.
By Imtiaz RayhanUpdated 10 min read
On this page
- The summary table
- 1. spec-writer: requirements, design, and tasks before code
- 2. /write-design-doc: an RFC grounded in the code
- 3. adr-writer: record the decision and its costs
- 4. architecture-diagram-generator: draw what exists
- 5. threat-model-builder: stress the design before shipping
- 6. idempotency-designer: retries that cannot double-charge
- 7. rate-limiter-designer: limits that hold behind replicas
- 8. cache-policy-designer: caching as a correctness contract
- 9. strangler-fig-migrator: replace the old system in slices
- API contract skills for designs that expose an API
- Agents and commands that pair with them
- Recommended system design stacks
- Continue exploring
Frame the change with spec-writer or /write-design-doc, record it with adr-writer, and draw the current system with architecture-diagram-generator. Stress it with threat-model-builder, settle retries, limits, and caching with idempotency-designer, rate-limiter-designer, and cache-policy-designer, and plan legacy replacement with strangler-fig-migrator.
Key takeaways
- Ground design work in the repository: the design-doc command, the ADR skill, and the diagram skill all read the code before proposing or drawing anything.
- A design is not finished without rejected alternatives; /write-design-doc, adr-writer, and the system-architect agent each require rejected alternatives and the reason each lost.
- Draw one diagram per question (container, sequence, ER, or state), using only the nodes and edges found in code or config.
- Retries, traffic spikes, and stale data are design decisions: idempotency keys, rate-limit algorithms, and cache invalidation belong in the design, not in a later patch.
- Replace a legacy system through an interception seam and shadow traffic, and delete old code only after it shows zero traffic over a full usage cycle.
The best Claude skills for system design write the artifacts a design review actually reads: a spec or design doc with honest alternatives, a decision record, a diagram drawn from the code, and a threat model. Around those sit the cross-cutting decisions that most often go wrong in production (retries that double-charge, rate limits that fail behind several replicas, caches that serve stale or cross-tenant data) and the plan for replacing what already exists.
Two habits set these apart from asking Claude to "design a system". Most read the repository first, so the design fits the code it changes. And the design-doc, ADR, and architect picks require rejected alternatives with reasons, which is what separates a design from a plan. For per-endpoint contracts such as error envelopes and pagination, the API development roundup goes deeper; this list stays at the level of the system.
The summary table
| Pick | Type | Stage | Main artifact |
|---|---|---|---|
| spec-writer | Skill | Frame | Requirements, design, and tasks documents |
| /write-design-doc | Command | Decide | Design doc or RFC, read-only |
| adr-writer | Skill | Record | Numbered ADR with considered alternatives |
| architecture-diagram-generator | Skill | Explain | Mermaid diagram with a scope caption |
| threat-model-builder | Skill | Stress | Data-flow diagram, STRIDE table, accepted risks |
| idempotency-designer | Skill | Cross-cutting | Key scheme, atomic dedup, retention policy |
| rate-limiter-designer | Skill | Cross-cutting | Algorithm, key, tier limits, 429 contract |
| cache-policy-designer | Skill | Cross-cutting | Layer-by-layer cache policy |
| strangler-fig-migrator | Skill | Evolve | Seam design and slice-by-slice migration plan |
1. spec-writer: requirements, design, and tasks before code
spec-writer writes a requirements document with EARS acceptance criteria, a design document, and a task list, in whichever layout the repository already uses: Kiro's requirements.md, design.md, and tasks.md, or Spec Kit's spec.md, plan.md, and tasks.md. The split is useful for system design because it forces agreement on what the change must do before anyone decides how, and it ends in a task list rather than a block of prose. The /spec command drafts the same files from a one-line feature description and stops for your review; once the spec is approved, the spec-implementer agent builds it one task at a time, checking off a task only when its acceptance criteria pass.
The spec-driven development guide covers the workflow, the spec-driven development glossary entry defines it, and the spec-driven tools roundup compares the tools.
2. /write-design-doc: an RFC grounded in the code
/write-design-doc is read-only: it does not modify the repository, run migrations, or scaffold code, and if you give it no subject it asks one question instead of inventing a problem. It frames what is broken or missing, who is affected, and what is out of scope, then maps the real code: README.md, the manifest, and CLAUDE.md for conventions, a search for every module, route, model, and config the change touches, and a full read of the closest existing subsystem to decide whether the design follows that pattern or departs from it.
The doc it returns has context, goals and non-goals, the proposed design, alternatives each marked "Rejected because", trade-offs and risks, a rollout plan with a rollback path, an observability section (the observability skills fill it in), and open questions. Its own rule is the useful one: a design doc without honest alternatives is a plan in disguise.
3. adr-writer: record the decision and its costs
adr-writer locates the existing log (docs/adr/, docs/decisions/, and similar), reads a record or two to match the local format, and assigns the next zero-padded number. It mines the repository for the constraints behind the decision (manifests, wired-up libraries, docker-compose.yml, Terraform files, CI config) rather than writing generic pros and cons, then writes Michael Nygard's sections, Status, Context, Decision, and Consequences, plus a Considered Alternatives section listing each rejected option and why it lost.
Two rules keep the log useful. Consequences must include the negatives you are accepting, because a record with only upsides is a sales pitch. And a merged ADR is never edited: a new record supersedes it, and the old one's status changes to point at the replacement. The skill reports any section it filled from assumption so you can correct it before merging.
4. architecture-diagram-generator: draw what exists
architecture-diagram-generator picks the view before drawing: container or component for "who calls whom", sequence for one request over time, ER for the data model, and state for an entity's lifecycle. If a question spans two of those, it draws two small diagrams. It finds evidence first, from entry points, docker-compose.yml and manifests, HTTP clients, queue names, *_URL environment variables, ORM models, and migrations, and a node or edge goes in only if it was found in code or config.
It splits a container view past about a dozen nodes into a map and a zoom-in, validates the Mermaid so GitHub does not render an error box, and captions each diagram with what it does and does not show. Use it to document the current system before proposing changes to it.
5. threat-model-builder: stress the design before shipping
threat-model-builder works from a design, before code exists if need be. It draws a data-flow diagram of external entities, processes, data stores, and labeled flows, then marks trust boundaries (internet to API, API to database, tenant to tenant, user input to an interpreter) and numbers each crossing. STRIDE is applied only at those crossings, and each threat is written as a concrete attack, such as a GET /users/:id that returns any tenant's record, rather than a category.
Threats are scored on likelihood and impact and sorted into priorities, mitigations are specific enough to become work items, and every threat not mitigated now is recorded as accepted, with a rationale and an owner, or deferred, with the trigger that reopens it. Its note on where to start is practical: authorization and information disclosure cause more real breaches than exotic failures, so check those two at every boundary first.
6. idempotency-designer: retries that cannot double-charge
idempotency-designer handles the case where a timeout means the client does not know whether the operation ran. The client mints one key per logical operation and sends it in an Idempotency-Key header; the server scopes it as (account, endpoint, key) and claims it in a single atomic step, a unique-constraint insert or a conditional write, before doing the work. Check-then-act is called out as a race that two concurrent retries win together.
The completed response is stored with the key, ideally in the same transaction as the side effect, and replayed on repeats. A retry that arrives mid-flight gets a 409 with Retry-After, downstream calls such as a payment processor get a derived key of their own, and keys expire on a deliberate TTL. The idempotency keys guide covers the pattern in full.
7. rate-limiter-designer: limits that hold behind replicas
rate-limiter-designer chooses the algorithm from the traffic shape: a token bucket for legitimate bursts, a sliding-window counter for smooth enforcement in front of a fragile dependency, and a fixed window only when simplicity beats correctness, since it can admit twice the limit across a window boundary. It picks the limiting key per route class (IP for unauthenticated traffic, API key or user once authenticated) and writes the limits per tier as a table.
The design-level warning is about state. An in-memory counter behind N replicas enforces roughly N times the limit, so the counter lives in shared storage with an atomic increment or a single Lua script. Responses carry 429 with Retry-After and RateLimit-* headers, and fail-open versus fail-closed is chosen deliberately for when the store is unreachable.
8. cache-policy-designer: caching as a correctness contract
cache-policy-designer treats a cache as a correctness decision first. It inventories the object (source, readers, writers, sensitivity, cost of serving it stale), maps every layer from browser and CDN to application and database caches, and defines the full key, including tenant and authorization class. Freshness comes from the business tolerance, not a round number, and invalidation is tied to every write or event that changes the value.
It adds stampede controls, outage behavior, and privacy rules, and it will not drop authorization from a cache key to raise the hit rate: serving one user's data to another is a security failure, not a tuning trade-off.
9. strangler-fig-migrator: replace the old system in slices
strangler-fig-migrator plans the evolution half of system design: replacing a load-bearing legacy module or service without a big-bang rewrite. Its first deliverable is the interception seam, a facade, proxy route, or flag that can send each call to old or new code and be flipped at runtime. If callers reach into the legacy code in many ways, building that facade comes before any new implementation.
It then orders capability slices from smallest and safest, shadow-runs new code against old with a concrete definition of equivalence, and ramps traffic with rollback one flip away. Legacy code is deleted only after a full usage cycle on the new path with zero calls to the old one. The refactoring roundup covers its code-level neighbors.
API contract skills for designs that expose an API
Three API skills fill in the contract once the system design is settled. pagination-designer chooses keyset or offset paging, appends a unique tiebreaker so no row is skipped or repeated, makes the cursor opaque, and names the composite index the sort needs. graphql-schema-designer models the graph around domain types rather than endpoints, sets nullability field by field, uses Relay connections for unbounded lists, and lists every field that needs a DataLoader. api-error-contract-designer defines one error envelope with stable machine codes, safe messages, field errors, and request IDs, backed by contract tests.
Agents and commands that pair with them
The system-architect agent runs a full design: it writes down quantified constraints first and asks when they are missing, maps the domain and data flow, chooses components and names the alternative rejected for each, walks failure modes, states the first expected bottleneck, and returns a design document with a Mermaid diagram, a trade-offs table, ADRs, and open questions. It produces design artifacts, not code.
Two specialists take narrower slices. The database-architect agent designs storage from the access patterns, chooses between relational, document, key-value, wide-column, and graph models, and includes a table mapping each access pattern to the schema element and index that serve it. The api-architect agent models resources, chooses REST, GraphQL, or RPC with a stated reason, and writes OpenAPI 3.1 or SDL with versioning and deprecation plans. Once the design is built, monorepo-boundary-auditor checks whether the code still respects the package boundaries and dependency direction the design drew.
Recommended system design stacks
For design reviews on an existing codebase:
npx agentscamp add commands/write-design-doc
npx agentscamp add skills/adr-writer
npx agentscamp add skills/architecture-diagram-generator
npx agentscamp add skills/threat-model-builder
npx agentscamp add agents/system-architectFor a backend that takes payments, public traffic, or heavy reads, add the cross-cutting designers:
npx agentscamp add skills/idempotency-designer
npx agentscamp add skills/rate-limiter-designer
npx agentscamp add skills/cache-policy-designerEach command installs into the current project's .claude/ directory; add -g for ~/.claude/. Manual copying, plugins, and team distribution are covered in how to install Claude skills.
Whichever you install, ask for the evidence: the file paths a design doc cites, the rejected alternatives, and the assumptions the ADR flagged.
Continue exploring
- 10 Best Claude Skills for API Development — Error contracts, idempotency, pagination, rate limits, webhooks, CORS, GraphQL, and OpenAPI.
- Spec-Driven Development with AI Agents — Writing specs an agent can build from, and keeping code tied to them.
- 10 Best Claude Skills for Refactoring — Module extraction, import cycles, dead code, upgrades, and strangler-fig migrations.
- 7 Best Claude Skills for Documentation — READMEs, OpenAPI docs, runbooks, onboarding guides, ADRs, and diagrams.
- How to install Claude skills — Every install path: manual copy, the agentscamp CLI, GitHub repos, plugins, and team distribution.
Sources and further reading
Primary documentation used to verify this guide.
- Documenting Architecture Decisions — Cognitect
- Strangler Fig — martinfowler.com
- About Mermaid — Mermaid
- Threat Modeling Cheat Sheet — OWASP
- The Idempotency-Key HTTP Header Field — IETF
- RateLimit header fields for HTTP — IETF
- GraphQL Cursor Connections Specification — Relay
Frequently asked questions
- What is the best Claude skill for system design?
- It depends on the stage. Use spec-writer or the /write-design-doc command to frame a change, adr-writer to record the decision, architecture-diagram-generator to draw what exists, and threat-model-builder to stress the design. For cross-cutting behavior, idempotency-designer, rate-limiter-designer, and cache-policy-designer each own one decision. The system-architect agent runs the whole design and returns a document with ADRs.
- Can Claude Code write an architecture decision record?
- Yes. adr-writer finds the existing ADR log or starts one in docs/adr/, assigns the next four-digit number, mines the repository for the constraints behind the decision, and writes Status, Context, Decision, Consequences, and Considered Alternatives, with honest negative consequences. It flags any section filled from assumption rather than repository evidence.
- Can Claude generate architecture diagrams from my codebase?
- architecture-diagram-generator does. It chooses one view per question (container or component, sequence, ER, or state), reads entry points, HTTP clients, queue names, connection strings, and migrations, and draws only nodes and edges it found. The output is validated Mermaid with a caption saying what the diagram does and does not show.
- Should I use the system-architect agent or the /write-design-doc command?
- Use /write-design-doc for one feature or change in an existing codebase: it is read-only, grounds the design in the current code, and returns an RFC with alternatives, trade-offs, a rollout plan with a rollback path, and open questions. Use the system-architect agent for a new system or a structural change, such as a monolith-to-services split, where constraints, failure modes, and the scaling path need working out first.
- How is this different from the API development skills list?
- The API development list covers per-endpoint contracts in depth: error envelopes, pagination, CORS, webhooks, GraphQL schemas, and OpenAPI documents. This list stays at the level of the system: how a change is framed, decided, recorded, drawn, attacked, and migrated, plus the three cross-cutting designers that most affect system behavior.
Filed under
claude-skills · system-design · architecture · adr · design-docs · best-of
Related
- 10 Best Claude Skills for API DevelopmentChoose Claude skills for error contracts, idempotency, pagination, limits, webhooks, CORS, GraphQL, OpenAPI, tools, and MCP servers.
- Adr WriterWrite an Architecture Decision Record capturing a decision the user describes, in Michael Nygard ADR format (Status, Context, Decision, Consequences) with an added Considered Alternatives section. Use when recording a significant architectural or technology choice.
- API ArchitectUse this agent to design APIs — resource modeling, versioning, pagination, error contracts, REST vs GraphQL. Examples — designing a public API, reviewing an API spec, planning a breaking change.
- API Error Contract DesignerDesign or normalize an API's error contract so clients get stable machine-readable codes, safe human messages, field-level validation details, correlation IDs, and consistent HTTP semantics. Use when adding endpoints, replacing ad hoc error strings, documenting SDK behavior, or fixing clients that branch on fragile message text.
- Architecture Diagram GeneratorGenerate accurate architecture diagrams as Mermaid — straight from the codebase, not from imagination — by first choosing which view answers the question (container/component, sequence, ER, or state) and then reading the real entry points, module boundaries, service calls, and schema. Use when onboarding to an unfamiliar repo, documenting a system, or visualizing one complex flow.
- Database ArchitectUse this agent to design data models and storage strategy from access patterns — schema design, normalization vs deliberate denormalization, relational vs document vs key-value vs wide-column vs graph selection, indexing, partitioning/sharding, transaction boundaries, and consistency models. Examples — modeling a new feature's schema, choosing a database for a write-heavy event workload, reviewing a schema for missing indexes or scaling cliffs, planning how to shard a table that no longer fits one node.
- System ArchitectUse this agent for high-level system design — service boundaries, data flow, scaling, trade-offs. Examples — designing a new system, evaluating a monolith-to-services split, a scalability review.
- Write Design DocExplore the codebase and write a decision-oriented design doc / RFC for a feature or system change.