agentleFS
RealDougEubanksRealDougEubanks/ClaudeMarketplace/skills/architecture-design/SKILL.md

architecture-design

Skill1 starsChanged 2 months agoMITView on GitHub

Designs new systems from requirements: C4 model diagrams, service boundaries, API contracts, data design, failure modes, and cross-cutting concerns.

32 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use results-report, daily-coding and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Galaxy-DawnSkill

    results-report

    This skill should be used when the user asks to "write an experiment report", "summarize experimental results", "do experiment retrospection", "write a results report", "写实验总结报告", "写实验复盘", or mentions turning completed experiment artifacts into a structured, decision-oriented research report. It assumes strict analysis should come from `results-analysis` first.

    Also in 3 projects that use this

  • Clay-HHKSkill

    daily-coding

    Daily coding assistant that auto-triggers when writing/modifying code, providing a core checklist.

    Also in 3 projects that use this

  • Clay-HHKSkill

    kaggle-learner

    This skill should be used when the user asks to "learn from Kaggle", "study Kaggle solutions", "analyze Kaggle competitions", or mentions Kaggle competition URLs. Provides access to extracted knowledge from winning Kaggle solutions across NLP, CV, time series, tabular, and multimodal domains.

    Also in 3 projects that use this

  • kharlamenkodevSkill

    bug-detective

    Also in 4 projects that use this

  • gclmSkill

    observability-design

    Design logs, metrics, traces, alerts, and debugging signals so systems can be operated and diagnosed before incidents expose blind spots.

    Also in 3 projects that use this

  • Google CloudSkill

    citation-verification

    Verify that citations in a document resolve to real records and that claimed titles match. Use before trusting a document's reference list.

    Also in 4 projects that use this

  • +2 more from Clay-HHK

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 26 edited versions we read keep these.

  • 2

    Distinctive

    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:

    Ask the user for (or read from existing artifacts):

    line 25
  2. Very specific:

    If docs/requirements/ exists, use Glob and Read to load relevant requirements documents.

    line 32
  3. Distinctive:

    Ask the user to confirm the pattern before proceeding.

    line 50
  4. Very specific:

    If C4 Mermaid syntax is not supported, use graph LR with clear labels.

    line 74
  5. Very specific:

    Use Write to save the full design to docs/architecture/<feature-or-system-name>-design.md.

    line 146
  6. Very specific:

    If handoffs/designs/ exists (ABD workflow), also write a JSON artifact to handoffs/designs/{taskId}_design_{unixTimestamp}.json using the …

    line 148

“Common” is measured: kept by at least 6 in 10 of the 26 edited versions of this file we could read. “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

architecture-design

Purpose

Guide the design of a system or feature from requirements to a documented architecture. Produces C4-model diagrams (Context → Container → Component), service boundary definitions, API contracts, data flow diagrams, failure mode analysis, and an ADR for the key decisions made. Works standalone or as the /abd-design agent in the ABD workflow.

Quick mode (/architecture-design --quick): for single-feature or small-scope designs. Skip Step 5 (C4 Level 3), make the Step 8 failure-mode table optional (include only externally-dependent paths), and keep Steps 1–2 to a single confirmation exchange.

Emit as you go: output each step's section immediately as you complete it rather than composing the whole document at the end. Step 10 assembles the already-emitted sections into the saved file. This keeps quality even across sections.


Instructions

Step 1 — Gather inputs

Ask the user for (or read from existing artifacts):

  • What are we building? (description or link to requirements doc / Jira epic)
  • What are the key constraints? (team size, existing systems to integrate with, cloud provider, language preference, compliance requirements)
  • What is the expected scale? (users/day, requests/second, data volume)
  • What is the timeline? (affects how complex a solution is appropriate)
  • Are there existing systems this must integrate with or replace?

If docs/requirements/ exists, use Glob and Read to load relevant requirements documents.


Step 2 — Propose architecture style

Based on the inputs, recommend and justify one of these patterns. Explain the tradeoffs in the context of the stated constraints:

PatternBest ForAvoid When
Monolith (Modular)Small teams, early stage, unclear domain boundariesTeam > 10, independent scaling needed
MicroservicesLarge teams, independent scaling, polyglotSmall team, immature domain model
Event-DrivenAsync workflows, loose coupling, audit trail neededSimple CRUD, low latency required
Hexagonal (Ports & Adapters)Complex domain logic, testability, multiple I/O adaptersSimple CRUD apps
CQRS + Event SourcingComplex queries, audit history, high write/read ratio differenceSimple domains, small teams
ServerlessUnpredictable traffic, low ops overhead, event-drivenLong-running jobs, high cold-start sensitivity
BFF (Backend for Frontend)Multiple client types with different data needsSingle client type

Ask the user to confirm the pattern before proceeding.


Step 3 — C4 Model — Level 1: System Context

Produce a Mermaid diagram showing the system in context:

  • The system being built (center)
  • External users/actors
  • External systems it integrates with
  • Data flows between them
C4Context
  title System Context — <System Name>
  Person(user, "End User", "Uses the system via web/mobile")
  System(system, "<System Name>", "The system being designed")
  System_Ext(auth, "Auth Provider", "OAuth2/OIDC — e.g. Auth0")
  System_Ext(email, "Email Service", "Transactional email — e.g. SendGrid")
  Rel(user, system, "Uses", "HTTPS")
  Rel(system, auth, "Authenticates via", "HTTPS/OIDC")
  Rel(system, email, "Sends email via", "HTTPS/API")

If C4 Mermaid syntax is not supported, use graph LR with clear labels.


Step 4 — C4 Model — Level 2: Container Diagram

Decompose the system into containers (deployable units):

  • Web frontend (SPA, SSR, mobile app)
  • API server(s)
  • Background workers / queues
  • Databases (type: relational, document, cache, search)
  • Message broker (if event-driven)
  • CDN / static assets

For each container specify: technology choice, responsibility, and communication protocol with other containers.


Step 5 — C4 Model — Level 3: Component Diagram (key containers only)

For the most complex container (usually the API server), decompose into components:

  • Router / Controller layer
  • Service / Use Case layer
  • Repository / Data Access layer
  • Domain Model
  • External adapters (email, payment, auth)
  • Shared utilities (logging, validation, config)

Step 6 — Data Design

  • Identify the core entities and their relationships (ER diagram in Mermaid)
  • Recommend database type for each store: relational (normalized, ACID), document (flexible schema), key-value (cache/session), time-series (metrics/events), search (full-text)
  • Flag any PII/sensitive data and where encryption at rest is required
  • Identify high-read vs high-write data and caching strategy

Step 7 — API Contract Sketch

For each major API surface, define:

  • Protocol: REST, GraphQL, gRPC, WebSocket, or event/message
  • Key endpoints/operations (resource name, method, brief description)
  • Authentication mechanism (JWT, API key, OAuth2 scopes)
  • Pagination strategy (cursor vs offset)
  • Error response format

Step 8 — Failure Mode Analysis

For each external dependency and critical path, define:

  • What happens if this fails?
  • Mitigation: retry with backoff, circuit breaker, graceful degradation, fallback, queue
  • Recovery time objective (RTO) — how quickly must this recover?

Step 9 — Cross-Cutting Concerns

Address explicitly:

  • Authentication & Authorization: where auth is enforced, which framework/library
  • Observability: structured logging, distributed tracing (trace IDs), metrics, alerting
  • Configuration: how env vars / secrets are managed per environment
  • Deployment: container/serverless, CI/CD pipeline shape, blue/green vs rolling
  • Testing strategy: unit (domain logic), integration (adapters), contract (API), E2E (critical flows)

Step 10 — Write Design Artifact

Use Write to save the full design to docs/architecture/<feature-or-system-name>-design.md.

If handoffs/designs/ exists (ABD workflow), also write a JSON artifact to handoffs/designs/{taskId}_design_{unixTimestamp}.json using the ABD envelope schema.

Offer to run /adr to capture the key architectural decisions as ADRs.


Output Format

The design document should contain all diagrams inline as Mermaid fenced code blocks, all tables, and a "Key Decisions" section summarising the choices made and why. End with "Open Questions" — any decisions that need stakeholder input before implementation begins.

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.