agentleFS
monishwar007monishwar007/clean-code/skills/system-design-foundation/SKILL.md

system-design-foundation

Skill0 starsChanged 3 months agoMITView on GitHub

System-design analysis and architecture guidance for distributed systems. Use when explaining system-design concepts, analyzing a design, preparing a system-design interview answer, selecting scalability/reliability patterns, or creating an architecture with explicit trade-offs across APIs, storage, messaging, consistency, resilience, observability, and disaster recovery.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to turn a product or architecture question into a clear, measurable, failure-aware system design.

    line 8
  2. Very specific:

    Read references/decision_framework.md for any new design, architecture review, interview answer, or trade-off question.

    line 12
  3. Very specific:

    Read references/concept_catalog.md when the request names one or more of the 40 topics, or when a component needs a concise definition, use …

    line 13
  4. Very specific:

    Read references/source_inventory.md when the user asks to audit, trace, or preserve the shortened URLs from the screenshots.

    line 14
  5. Very specific:

    Read references/research_notes.md when source verification, citation provenance, or limitations of the screenshot links matter.

    line 15
  6. Distinctive:

    Draw the critical path: Start with the smallest architecture that satisfies the targets: client, DNS/edge, proxy or gateway, stateless …

    line 22
  7. Distinctive:

    Select the communication model: Use synchronous request/response for immediate results within the latency budget.

    line 24
  8. Distinctive:

    Select storage by access pattern and invariants: Use indexes for query shape, replicas for read scale or availability, caches for reusable …

    line 25
  9. Distinctive:

    Prefer the simplest architecture that meets measured requirements.

    line 32
  10. Distinctive:

    Use a CDN or cache to reduce demand before adding database capacity, but define freshness and invalidation behavior.

    line 33
  11. Distinctive:

    Add an index before sharding when the bottleneck is query work rather than total data or write capacity.

    line 34
  12. Distinctive:

    Treat replication as a consistency and failover decision, not as a synonym for backup.

    line 37
  13. Distinctive:

    Use consensus or distributed locking only when a shared decision or exclusive ownership is truly required.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

System Design Foundation

Use this skill to turn a product or architecture question into a clear, measurable, failure-aware system design. Treat the 40-topic catalog in references/concept_catalog.md as a vocabulary and the workflow in references/decision_framework.md as the default method.

Load the right reference

  • Read references/decision_framework.md for any new design, architecture review, interview answer, or trade-off question.
  • Read references/concept_catalog.md when the request names one or more of the 40 topics, or when a component needs a concise definition, use case, rationale, and caution.
  • Read references/source_inventory.md when the user asks to audit, trace, or preserve the shortened URLs from the screenshots.
  • Read references/research_notes.md when source verification, citation provenance, or limitations of the screenshot links matter.

Apply the design workflow

  1. Clarify the goal. State functional requirements, non-functional requirements, scope, exclusions, user journeys, and the failure domains that matter.
  2. Quantify the workload. Estimate users, requests per second, peak factor, read/write ratio, payload size, data growth, retention, fan-out, and geographic distribution. Label assumptions and show simple capacity math.
  3. Set targets. Define availability, p50/p95/p99 latency, throughput, freshness, durability, RPO, RTO, consistency, security, and cost objectives.
  4. Draw the critical path. Start with the smallest architecture that satisfies the targets: client, DNS/edge, proxy or gateway, stateless service, cache when justified, durable store, and asynchronous workers only where needed.
  5. Choose boundaries and contracts. Assign data ownership, transaction boundaries, API or event schemas, authentication and authorization boundaries, versioning, and compatibility rules.
  6. Select the communication model. Use synchronous request/response for immediate results within the latency budget. Use queues or streams for decoupling, burst absorption, retries, and asynchronous work. Use WebSockets for long-lived bidirectional interaction and push updates.
  7. Select storage by access pattern and invariants. Use indexes for query shape, replicas for read scale or availability, caches for reusable hot data, and sharding only when a single node cannot meet capacity or data-placement requirements. Make consistency, ordering, duplicate handling, and conflict resolution explicit.
  8. Design failure behavior. For every dependency specify timeout, retry eligibility, retry budget, jitter, circuit-breaker behavior, fallback, health signal, queue/dead-letter behavior, failover target, and data-loss risk. Separate transient, permanent, overload, and corruption failures.
  9. Add operational controls. Define logs, metrics, distributed traces, correlation/context propagation, SLO alerts, audit events, rate limits, abuse controls, encryption, secret handling, backup, restore, and disaster-recovery procedures.
  10. Validate and explain evolution. Load-test peak and tail behavior, inject dependency failures, exercise duplicate/out-of-order delivery, perform failover and restore drills, and state the threshold that justifies the next layer of complexity.

Enforce these selection rules

  • Prefer the simplest architecture that meets measured requirements; do not add microservices, sharding, a service mesh, or distributed locks as status symbols.
  • Use a CDN or cache to reduce demand before adding database capacity, but define freshness and invalidation behavior.
  • Add an index before sharding when the bottleneck is query work rather than total data or write capacity.
  • Pair asynchronous delivery with idempotent consumers, replay policy, backpressure, and dead-letter handling.
  • Pair retries with timeouts, bounded budgets, jitter, and circuit breakers; never retry indefinitely during overload.
  • Treat replication as a consistency and failover decision, not as a synonym for backup. Treat redundancy as a failure-domain choice, not as proof of disaster recovery.
  • Use consensus or distributed locking only when a shared decision or exclusive ownership is truly required; use leases and fencing where stale owners could cause harm.
  • Measure tail latency and user-visible reliability, not only averages and component uptime.

Produce the answer in this structure

  1. Problem and assumptions. State the scope, workload, targets, and unknowns.
  2. High-level architecture. Show a readable text diagram and describe the request/data flows.
  3. Component decisions. Explain the role of each chosen pattern and why alternatives were rejected.
  4. Data and API design. Define ownership, schema or resource model, transactions, consistency, idempotency, pagination, errors, and versioning.
  5. Scale and capacity. Show bottlenecks, rough capacity math, partitioning, caching, load balancing, and growth thresholds.
  6. Reliability and failure handling. Cover timeouts, retries, circuit breakers, health checks, queues, replication, failover, graceful degradation, RPO, RTO, and recovery.
  7. Observability and security. Specify logs, metrics, traces, alerts, authentication, authorization, encryption, privacy, and abuse controls.
  8. Trade-offs and evolution. State what the design gives up, what is intentionally omitted, and how it can evolve.
  9. Risks and validation plan. Identify unproven assumptions and tests or drills needed before production.

When explaining an individual concept, define it in one sentence, describe where it is used, explain why it matters, give one concrete example, and name the main trade-off or failure mode. Cite stable standards or official documentation when making externally verifiable claims. Use the source catalog for the screenshot's topic labels, but do not treat a shortened blog link as a normative specification.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.