architecture-designer
Skill6 starsChanged 8 months agoMITView on GitHub
Use this skill when designing system architecture, making technology stack decisions, evaluating trade-offs between architectural patterns, or writing Architecture Decision Records (ADRs). Trigger phrases: 'design a system for', 'what architecture should I use', 'monolith vs microservices', 'how should I structure this'. Not for implementation-level code design or UI/UX design.
21 other projects use a version of this.
Adopted by
Most recently taken up by
- santiago-migoni/claude-skillstheir own version, first seen Nov 8, 2026
- zhanguoliang715/architecture-designertheir own version, first seen Nov 8, 2026
- zhanguoliang715/agent-pipeline-skillstheir own version, first seen Nov 8, 2026
- AxlZero21/Skillstheir own version, first seen Nov 8, 2026
- dirien/yet-another-agent-harnesstheir own version, first seen Nov 8, 2026
- lsyamsiar/claude-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use architecture-patterns and security-audit.
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.
nilecuiSkillarchitecture-patterns
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use when architecting complex backend systems or refactoring existing applications for better maintainability.
Also in 3 projects that use this
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 3 projects that use this
Other versions21 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 21
- Jeffallan/claude-skills★ 12ksame name
- dirien/yet-another-agent-harness★ 19same name
- codeApe-7/ai-agent-workflowGroup★ 18same name
- PIXARTSeu/Synapse★ 9same name
- HK-hub/AgentSkills★ 6same name
- nicholyx/ai-skills★ 6same name
- zacklecon/claude-skills★ 3same name
- liushikuan63/Qoder-Optimization★ 2same name
- rcdelfin/agentkit★ 2same name
- salmandev/everything-gemini★ 2same name
11 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository68 other files it gives its agents.
- dataset-curatorSkill
- eval-designerSkill
- model-comparatorSkill
- prompt-engineerSkill
- business-analystSkill
- competitor-analystSkill
- market-researcherSkill
- meeting-facilitatorSkill
- okr-plannerSkill
- pitch-deck-writerSkill
- product-managerSkill
- ux-researcherSkill
- api-designerSkill
- code-reviewerSkill
- debuggerSkill
- documentation-writerSkill
- refactorerSkill
- regex-masterSkill
- security-auditorSkill
- sql-expertSkill
- test-writerSkill
- chart-builderSkill
- dashboard-designerSkill
- data-analystSkill
- data-cleanerSkill
- excel-expertSkill
- sql-analystSkill
- color-paletteSkill
- design-critiquerSkill
- frontend-designSkill
- ux-writerSkill
- ci-cd-helperSkill
- docker-expertSkill
- kubernetes-helperSkill
- monitoring-setupSkill
- flashcard-makerSkill
- lesson-plannerSkill
- quiz-creatorSkill
- tutorSkill
- docxSkill
- pdfSkill
- pptxSkill
- xlsxSkill
- budget-plannerSkill
- financial-analystSkill
- invoice-generatorSkill
- contract-reviewerSkill
- legal-summarizerSkill
- terms-of-serviceSkill
- decision-makerSkill
- habit-builderSkill
- journalingSkill
- note-takerSkill
- task-plannerSkill
- citation-formatterSkill
- fact-checkerSkill
- literature-reviewerSkill
- summarizerSkill
- web-researcherSkill
- academic-essaySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 11 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 19 edited versions we read keep these.
11
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
- Distinctive: line 55
Microservices: only when the organizational and operational maturity exists to support them.
- Distinctive: line 56
Event-driven: when you need to decouple producers and consumers or process async workflows.
- Distinctive: line 71
Use a simple scoring matrix if the team is divided.
- Distinctive: line 72
Document the decision in an ADR.
- Distinctive: line 75
Use the template below for every significant architectural decision.
- Distinctive: line 129
Read >> Write: feed reads outnumber posts ~50:1 — optimize for reads
- Distinctive: line 172
Add read replicas for Post DB as read traffic grows
- Distinctive: line 283
Keep the operational burden in scope — microservices are operationally expensive
- Distinctive: line 290
Not writing ADRs — future team members have no context for past decisions
- Distinctive: line 295
Use the C4 model (Context → Container → Component → Code) for layered architecture diagrams
- Distinctive: line 297
Treat ADRs as living documents — update them when decisions are revisited
“Common” is measured: kept by at least 6 in 10 of the 19 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.
Files
Architecture Designer
Overview
The Architecture Designer skill guides the creation of well-structured, scalable, and maintainable software systems. It covers selecting the right architectural pattern for the problem (monolith, microservices, event-driven, layered/hexagonal), conducting trade-off analysis using established frameworks, writing Architecture Decision Records (ADRs) to document decisions, and reasoning about scalability, reliability, and operational complexity. Good architecture serves the current and anticipated needs of the system without over-engineering for hypothetical future scale.
When to Use
- Starting a new system or service and choosing the overall structure
- Evaluating whether to split a monolith into microservices
- Designing the data flow between components (sync vs. async, events vs. REST)
- Making technology choices with lasting consequences (messaging, database type, framework)
- Documenting architectural decisions for team alignment and future reference
When NOT to Use
- Implementation-level code structure within a single service (use refactorer skill)
- Database schema design for a single service (use sql-expert skill)
- API endpoint design (use api-designer skill)
- Infrastructure and DevOps decisions (deployment, networking, cloud IAM)
Quick Reference
| Pattern | Best For | Trade-off |
| Monolith | Small teams, early product, CRUD-heavy | Simple to develop; harder to scale independently |
| Microservices | Large teams, independent scaling, different tech stacks | Complex operations; network overhead; distributed tracing needed |
| Modular Monolith | Growing team, future microservice migration | Best of both worlds at moderate scale |
| Event-Driven | Async workflows, decoupled producers/consumers | Eventual consistency; harder to debug; ordering issues |
| Layered (N-tier) | Standard CRUD apps with clear separation | Can create rigid coupling between layers |
| Hexagonal (Ports & Adapters) | Testable, domain-first design; framework-agnostic core | More boilerplate; learning curve |
| CQRS | Read-heavy systems where reads/writes have different models | Complexity; sync challenges between command and query sides |
| Saga | Distributed transactions across services | Complex compensation logic; eventual consistency |
Instructions
- Gather requirements
- Functional: What does the system do? Core use cases, user types, integrations.
- Non-functional: Expected load (requests/sec, users), latency targets (p99 < 200ms?), availability (99.9%?), data volume, compliance requirements.
- Constraints: Team size, existing infrastructure, budget, deployment environment, time to market.
- Identify the key architectural drivers
- Which non-functional requirements most constrain the design? (Scale? Latency? Consistency? Compliance?)
- What are the riskiest unknowns? Spike those first.
- Apply the "It Depends" rule — the right architecture depends on specific context, not on trends.
- Choose the primary architectural style
- Start with a monolith unless you have a clear, proven need for microservices (independent scaling of components, truly independent teams, different runtime requirements).
- Modular monolith is often the right middle ground — enforce module boundaries inside one deployable unit.
- Microservices only when the organizational and operational maturity exists to support them.
- Event-driven when you need to decouple producers and consumers or process async workflows.
- Design the component diagram
- Identify major components: client, API gateway, services, data stores, external integrations.
- Define communication patterns: synchronous (REST/gRPC) for request-response; asynchronous (message queue/event bus) for fire-and-forget and fan-out.
- Assign data ownership: each component owns its data; never share a database between services.
- Address cross-cutting concerns
- Authentication/Authorization: Who authenticates? (API Gateway, each service?) JWT vs. session.
- Observability: Structured logging, distributed tracing (OpenTelemetry), metrics (Prometheus).
- Resilience: Circuit breakers, retries with exponential backoff, bulkheads, timeouts.
- Data consistency: Strong (single DB) vs. eventual (events). Choose based on business requirements.
- Analyze trade-offs explicitly
- For each major decision, list pros, cons, and alternatives considered.
- Use a simple scoring matrix if the team is divided.
- Document the decision in an ADR.
- Write an Architecture Decision Record (ADR) Use the template below for every significant architectural decision.
- Plan for evolution
- What would need to change as the system grows 10x? 100x?
- How hard would it be to swap a component (e.g., change the database)?
- Can the architecture absorb new requirements without a full rewrite?
ADR Template
# ADR-001: [Short Decision Title]
**Date:** YYYY-MM-DD
**Status:** Proposed | Accepted | Deprecated | Superseded by ADR-XXX
## Context
[Describe the situation, problem, or question that forced a decision.
Include relevant constraints and goals.]
## Decision
[State the decision clearly and concisely.
"We will use X because Y."]
## Alternatives Considered
| Option | Pros | Cons |
|--------|------|------|
| Option A | ... | ... |
| Option B | ... | ... |
| Option C | ... | ... |
## Consequences
**Positive:**
- ...
**Negative:**
- ...
**Risks:**
- ...
## References
- [Link to relevant RFC, blog post, or prior art]Examples
Example 1: Design a social media feed system
Input: "Design the architecture for a social media feed — users post content, follow each other, and see a personalized feed of posts from followed users. Target: 10M users, 1M daily active, 100K peak requests/sec."
Output:
Key Drivers:
- Scale: 100K rps at peak — must horizontally scale reads
- Read >> Write: feed reads outnumber posts ~50:1 — optimize for reads
- Latency: feed load < 200ms p99
- Eventual consistency acceptable: a 1–2 second delay in feed is fine
Architecture: Hybrid Fan-out
┌──────────────┐ ┌─────────────┐ ┌─────────────────┐
│ Client │────▶│ API Gateway │────▶│ Post Service │
│ (Web/Mobile)│ │ (Auth, TLS)│ │ (Write path) │
└──────────────┘ └─────────────┘ └────────┬────────┘
│ publishes
┌────────▼────────┐
│ Message Queue │
│ (Kafka/SQS) │
└────────┬────────┘
│ consumes
┌────────▼────────┐
│ Feed Fanout │
│ Worker │
└────────┬────────┘
┌─────────────┐ │ writes to
│ Feed Cache │◀───────┘
│ (Redis) │ per-user inbox
└────────┬────┘
│
┌──────────────┐ ┌─────────────▼─┐
│ Client │────▶│ Feed Service │ (Read path — hits cache first)
└──────────────┘ └───────────────┘Key Decisions:
Posts DB: PostgreSQL (for ACID, relational queries). Shard by user_id.
Feed fanout strategy:
- Fan-out on write (push): when a user posts, push to followers' Redis inboxes. Fast reads; expensive writes for celebrity accounts.
- Fan-out on read (pull): compute feed on request. Slow reads; simple writes.
- Decision: Hybrid — push to regular followers' inboxes; pull celebrity posts at read time.
Feed Cache: Redis sorted set per user, scored by timestamp. Store last 200 posts.
Scalability path:
- Add read replicas for Post DB as read traffic grows
- Kafka partitioning by
user_idensures ordered events per user - Redis Cluster for horizontal cache scaling
ADR for Feed Strategy:
# ADR-001: Feed Fanout Strategy
**Date:** 2024-01-15
**Status:** Accepted
## Context
Feed reads vastly outnumber writes. We need feed load < 200ms.
Celebrity accounts (>100K followers) make fan-out on write expensive.
## Decision
Use hybrid fanout: fan-out on write for users with <10K followers;
fan-out on read for celebrity accounts, merged at read time.
## Alternatives Considered
| Option | Pros | Cons |
|--------|------|------|
| Fan-out on write only | Fast reads | Celebrity posts spike write load |
| Fan-out on read only | Simple writes | Slow feed loads for followed-many accounts |
| Hybrid (chosen) | Balances read speed and write cost | More complex implementation |
## Consequences
Positive: p99 feed load < 200ms; write path scales independently.
Negative: Two code paths to maintain; requires follower count metadata.Example 2: Design a payment processing service
Input: "Design a payment processing microservice that handles charges, refunds, and webhooks from Stripe."
Output:
Key Drivers:
- Correctness over performance — a missed payment or double charge is a business-critical failure
- Idempotency — retries must not cause duplicate charges
- Auditability — every state transition must be logged
- Compliance — PCI-DSS scope must be minimized
Architecture: Event-Sourced Saga
┌──────────────┐ ┌──────────────────┐ ┌────────────────┐
│ Order Service│────▶│ Payment Service │────▶│ Stripe API │
│ │ │ │◀────│ (external) │
└──────────────┘ │ - Idempotency │ └────────────────┘
│ - State machine │
│ - Audit log │ ┌────────────────┐
└────────┬─────────┘ │ Webhook Handler│
│ events │ (Stripe →us) │
┌────────▼─────────┐ └────────┬───────┘
│ Payment Events │ │
│ DB (append-only)│◀─────────────┘
└──────────────────┘Idempotency pattern:
# Every charge request includes an idempotency key
def charge(order_id: str, amount_cents: int, idempotency_key: str):
existing = db.payments.find_by_idempotency_key(idempotency_key)
if existing:
return existing # Return cached result, don't re-charge
result = stripe.charge.create(
amount=amount_cents,
idempotency_key=idempotency_key
)
db.payments.create(
order_id=order_id,
stripe_charge_id=result.id,
idempotency_key=idempotency_key,
status='succeeded'
)
return resultPayment state machine:
PENDING → PROCESSING → SUCCEEDED
↘ FAILED
SUCCEEDED → REFUND_PENDING → REFUNDEDWebhook handling (idempotent):
@app.route('/webhooks/stripe', methods=['POST'])
def stripe_webhook():
event = stripe.Webhook.construct_event(
request.data,
request.headers['Stripe-Signature'],
WEBHOOK_SECRET # Verify authenticity
)
# Idempotent: process only if not already handled
if not db.webhook_events.exists(event.id):
handle_event(event)
db.webhook_events.mark_processed(event.id)
return '', 200Best Practices
- Match the architecture to the team, not to the trend — a two-person startup doesn't need Kubernetes and 20 microservices
- Data consistency requirements drive architecture more than anything else: identify them early
- Design for the failure case — every network call can fail; every service can be slow
- Make services independently deployable from day one if you're doing microservices
- Keep the operational burden in scope — microservices are operationally expensive
Common Mistakes
- Jumping to microservices before the domain is well understood (premature decomposition)
- Sharing a database between services (creates tight coupling at the data layer)
- Ignoring operations: who deploys, monitors, and debugs this in production?
- Building for 100x current scale on day one (over-engineering adds real cost and complexity now)
- Not writing ADRs — future team members have no context for past decisions
Tips & Tricks
- Draw the architecture on a whiteboard first; validate with the team before writing code
- "You must be this tall to use microservices" — start with a modular monolith; extract services when team/scaling pain is concrete
- Use the C4 model (Context → Container → Component → Code) for layered architecture diagrams
- Martin Fowler's "Strangler Fig" pattern is the safest way to migrate a monolith incrementally
- Treat ADRs as living documents — update them when decisions are revisited
Related Skills
- api-designer
- sql-expert
- security-auditor
- refactorer
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
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.

