agentleFS
hemapriyan-rkhemapriyan-rk/claude-rigor-skills/skills/architecture-design/SKILL.md

architecture-design

Skill1 starsChanged 2 months agoMITView on GitHub

Design or review system architecture for distributed systems, AI/ML infrastructure, edge-cloud pipelines, or AI agent systems — with mandatory trade-off decisions, failure-mode analysis, and a security/adversarial pass, not just a component diagram. Use whenever the user is designing a new system, refactoring an existing one, or asks "how should I architect X" for anything involving scaling, observability, distributed state, or ML components. Do not use for simple single-service app scaffolding with no distributed or ML complexity — that doesn't need this level of rigor.

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use api-design, git-workflow and 3 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.
  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 5 projects that use this

  • Microsoft AzureSkill

    git-workflow

    Squad branching model: dev-first workflow with insiders preview channel

    Also in 5 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 7 projects that use this

  • StrayDragonSkill

    ui-ux-pro-max

    UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

    Also in 3 projects that use this

  • VercelSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every non-trivial system has to pick a side on things that can't be maximized simultaneously.

    line 17
  2. Distinctive:

    If the design avoids naming any of these, that's a sign the trade-offs weren't actually decided — just deferred to production.

    line 23
  3. Distinctive:

    Every design gets an explicit threat-model pass, not a bolted-on "add auth" line:

    line 39
  4. Distinctive:

    Call out the weakest part of the design explicitly at the end — every architecture has one, and naming it beats letting it surface in …

    line 66

“Common” is measured: kept by at least 6 in 10 of the 18 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

A diagram of boxes and arrows is not an architecture. An architecture is a set of trade-off decisions that someone was forced to make explicitly, plus a description of how the system fails. This skill forces both.

Step 1 — Requirements framing (get this explicit before designing anything)

  • Functional: what the system actually has to do.
  • Non-functional, with numbers where possible: latency budget, throughput, consistency requirement, availability target, cost ceiling, and — for edge/embedded components — power and thermal budget. Vague non-functional requirements ("fast," "scalable") are not requirements; push for numbers or explicit ranges.

Step 2 — Force the trade-off decisions, don't hide them

Every non-trivial system has to pick a side on things that can't be maximized simultaneously. Make each decision explicit and state what's being given up:

  • Consistency vs. availability under partition, and where in the system this boundary actually sits.
  • Synchronous vs. asynchronous boundaries between components, and what breaks if a downstream service is slow.
  • Where compute is placed — edge vs. cloud — and what happens when connectivity to the other side is lost.
  • Who owns which piece of state, and what the source of truth is when two components disagree.

If the design avoids naming any of these, that's a sign the trade-offs weren't actually decided — just deferred to production.

Step 3 — Component decomposition and data flow

Produce a diagram (Mermaid, in a mermaid code fence) showing components and data flow, plus a written description of what data crosses each boundary and in what format/protocol.

Step 4 — Failure-mode analysis (mandatory, not optional)

Enumerate the top failure modes and what actually happens for each — not just the happy path:

  • What happens when each individual component is unavailable?
  • What happens under load beyond the stated capacity?
  • What happens with corrupted, delayed, or out-of-order data?
  • For any ML/inference component: what happens on a low-confidence or out-of-distribution input — does the system have a defined fallback, or does it silently do the wrong thing?

Step 5 — Security and adversarial pass

Every design gets an explicit threat-model pass, not a bolted-on "add auth" line:

  • Attack surface: every external input, every trust boundary.
  • For ML components specifically: adversarial input risk (evasion), poisoning risk if the system retrains on live data, model/IP extraction risk if the model is exposed as a service, and — for physical sensing systems — sensor spoofing risk (relevant for any sensor-fusion or cyber-physical system).
  • What's actually protected by each control, and what's still exposed after it.

Step 6 — Observability

What's measured, what triggers an alert, and how a failure in Step 4 is actually detected in practice — not just logged and ignored.

Step 7 — Stress-test the design before calling it done

Generate at least three concrete break scenarios and state what happens in each — not a hand-wave, actual scenarios: 10x the expected load, one core component down, a malicious/adversarial input on the ML path. If the answer to any of these is "undefined," that's the actual weak point in the design and should be named as such, not smoothed over.

Output structure

# Architecture: [system name]

## Requirements (functional / non-functional with numbers)
## Trade-off decisions made (and what each gives up)
## Component diagram + data flow (mermaid)
## Failure modes and behavior under each
## Threat model / security pass
## Observability
## Stress-test scenarios and what breaks first

Call out the weakest part of the design explicitly at the end — every architecture has one, and naming it beats letting it surface in production.

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.