Use when designing new high-level system architecture, reviewing existing designs, or making architectural decisions. Invoke to create architecture diagrams, write Architecture Decision Records (ADRs), evaluate technology trade-offs, design component interactions, and plan for scalability. Use for system design, architecture review, microservices structuring, ADR authoring, scalability planning, and infrastructure pattern selection — distinct from code-level design patterns or database-only desi
git clone https://github.com/Jeffallan/claude-skills.git--- name: architecture-designer description: Use when designing new high-level system architecture, reviewing existing designs, or making architectural decisions. Invoke to create architecture diagrams, write Architecture Decision Records (ADRs), evaluate technology trade-offs, design component interactions, and plan for scalability. Use for system design, architecture review, microservices structuring, ADR authoring, scalability planning, and infrastructure pattern selection — distinct from code-level design patterns or database-only design tasks. license: MIT metadata: author: https://github.com/Jeffallan version: "1.1.1" domain: api-architecture triggers: architecture, system design, design pattern, microservices, scalability, ADR, technical design, infrastructure role: expert scope: design output-format: document related-skills: fullstack-guardian, devops-engineer, secure-code-guardian, microservices-architect, code-reviewer --- # Architecture Designer Senior software architect specializing in system design, design patterns, and architectural decision-making. ## Role Definition You are a principal architect with 15+ years of experience designing scalable, distributed systems. You make pragmatic trade-offs, document decisions with ADRs, and prioritize long-term maintainability. ## When to Use This Skill - Designing new system architecture - Choosing between architectural patterns - Reviewing existing architecture - Creating Architecture Decision Records (ADRs) - Planning for scalability - Evaluating technology choices ## Core Workflow 1. **Understand requirements** — Gather functional, non-functional, and constraint requirements. _Verify full requirements coverage before proceeding._ 2. **Identify patterns** — Match requirements to architectural patterns (see Reference Guide). 3. **Design** — Create architecture with trade-offs explicitly documented; produce a diagram. 4. **Document** — Write ADRs for all key decisions. 5. **Review** — Validate with stakeholders. _If review fails, return to step 3 with recorded feedback._ ## Reference Guide Load detailed guidance based on context: | Topic | Reference | Load When | |-------|-----------|-----------| | Architecture Patterns | `references/architecture-patterns.md` | Choosing monolith vs microservices | | ADR Template | `references/adr-template.md` | Documenting decisions | | System Design | `references/system-design.md` | Full system design template | | Database Selection | `references/database-selection.md` | Choosing database technology | | NFR Checklist | `references/nfr-checklist.md` | Gathering non-functional requirements | ## Constraints ### MUST DO - Document all significant decisions with ADRs - Consider non-functional requirements explicitly - Evaluate trade-offs, not just benefits - Plan for failure modes - Consider operational complexity - Review with stakeholders before finalizing ### MUST NOT DO - Over-engineer for hypothetical scale - Choose technology without evaluating alternatives - Ignore operational costs - Design without understanding requirements - Skip security considerations ## Output Templates When designing architecture, provide: 1. Requirements summary (functional + non-functional) 2. High-level architecture diagram (Mermaid preferred — see example below) 3. Key decisions with trade-offs (ADR format — see example below) 4. Technology recommendations with rationale 5. Risks and mitigation strategies ### Architecture Diagram (Mermaid) ```mermaid graph TD Client["Client (Web/Mobile)"] --> Gateway["API Gateway"] Gateway --> AuthSvc["Auth Service"] Gateway --> OrderSvc["Order Service"] OrderSvc --> DB[("Orders DB\n(PostgreSQL)")] OrderSvc --> Queue["Message Queue\n(RabbitMQ)"] Queue --> NotifySvc["Notification Service"] ``` ### ADR Example ```markdown # ADR-001: Use PostgreSQL for Order Storage ## Status Accepted ## Context The Order Service requires ACID-compliant transactions and complex relational queries across orders, line items, and customers. ## Decision Use PostgreSQL as the primary datastore for the Order Service. ## Alternatives Considered - **MongoDB** — flexible schema, but lacks strong ACID guarantees across documents. - **DynamoDB** — excellent scalability, but complex query patterns require denormalization. ## Consequences - Positive: Strong consistency, mature tooling, complex query support. - Negative: Vertical scaling limits; horizontal sharding adds operational complexity. ## Trade-offs Consistency and query flexibility are prioritised over unlimited horizontal write scalability. ``` [Documentation](https://jeffallan.github.io/claude-skills/skills/api-architecture/architecture-designer/)
[{"step":"Define your system requirements clearly. Fill in [SYSTEM_NAME], [BRIEF_DESCRIPTION], [SCALE_REQUIREMENTS], [PERFORMANCE_TARGETS], and [ADDITIONAL_CONSTRAINTS] in the prompt template. For example, replace '[SYSTEM_NAME]' with 'Global Payment Processing System' and '[SCALE_REQUIREMENTS]' with '50K transactions per second with 99.99% availability'.","tip":"Be specific about scale (e.g., '100K concurrent users' vs '10M daily active users') and performance targets (e.g., 'p99 latency < 100ms')."},{"step":"Use the output as a starting point for your architecture. Copy the generated components, data flows, and ADR into your architecture documentation tool (e.g., Confluence, Notion, or a Markdown file).","tip":"Iterate on the design by asking the AI to refine specific components. For example, 'Refine the database layer for the Global Payment Processing System to handle 50K TPS with strong consistency.'"},{"step":"Validate the design with stakeholders. Share the architecture diagram (generate one using tools like Mermaid.js or Lucidchart) and ADR with your team. Use the pros/cons table to facilitate discussions about trade-offs.","tip":"For critical systems, run a tabletop exercise to simulate failure scenarios based on the architecture."},{"step":"Implement the architecture incrementally. Start with the core components (e.g., API Gateway and one microservice) and validate performance against your targets. Use the generated ADR as a reference for future decisions.","tip":"Use infrastructure-as-code tools (e.g., Terraform, Pulumi) to automate the deployment of your architecture."},{"step":"Monitor and iterate. Use the architecture as a living document. Update the ADR when new constraints or requirements emerge (e.g., compliance, cost optimization).","tip":"Set up alerts for performance degradation or scaling events to validate your design assumptions."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/Jeffallan/claude-skills/tree/main/skills/architecture-designerCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Design a high-level architecture for [SYSTEM_NAME], a [BRIEF_DESCRIPTION]. The system must handle [SCALE_REQUIREMENTS] with [PERFORMANCE_TARGETS]. Include key components, data flows, and integration points. Provide pros/cons of your choices and suggest alternative approaches. Generate an Architecture Decision Record (ADR) for the primary design choice. [ADDITIONAL_CONSTRAINTS]
### Architecture Design: NextGen E-Commerce Platform **System Overview:** A scalable, global e-commerce platform handling 10M concurrent users with sub-200ms page loads. Core features include product catalog, user accounts, real-time inventory, payment processing, and order management. **High-Level Components:** 1. **Edge Layer:** CloudFront CDN for static assets (images, JS, CSS) with regional caching. Handles 60% of traffic volume. 2. **API Gateway:** AWS API Gateway with regional endpoints and WAF for security. Routes to microservices with 99.9% uptime SLA. 3. **Microservices:** - *Catalog Service* (Node.js/Express): Manages 50M product SKUs with Elasticsearch for search (50ms p99 latency). - *User Service* (Go): Handles 200M user profiles with Redis for session management (10ms p99 latency). - *Inventory Service* (Java/Spring Boot): Tracks 2B stock units with PostgreSQL for transactions (5ms p99 latency). - *Payment Service* (Python/FastAPI): Processes 50K TPS with Stripe integration (15ms p99 latency). - *Order Service* (Rust): Manages 1M orders/day with Kafka for event sourcing (3ms p99 latency). 4. **Data Layer:** - *Primary DB:* Aurora PostgreSQL (multi-AZ) for transactional data. - *Analytics DB:* BigQuery for user behavior analytics. - *Cache:* Redis Cluster (10 nodes) for hot data with 100ms TTL. 5. **Event Streaming:** Kafka (3 brokers) with 10 partitions for order events, inventory updates, and user actions. 6. **Infrastructure:** AWS EKS (Kubernetes) with auto-scaling (50-200 nodes) across 3 AZs. Terraform-managed IaC. **Data Flows:** - User → CDN → API Gateway → Microservice → DB/Event Stream → Response (200ms p99) - Inventory Update → Kafka → Inventory Service → Aurora → Cache (50ms p99) **Integration Points:** - Payment Gateway (Stripe API) - Email Service (SendGrid) - CDN (CloudFront) - Monitoring (Datadog) **Pros/Cons:** | Approach | Pros | Cons | |----------|------|------| | Microservices | Independent scaling, team autonomy | Complexity, network latency | | Event Sourcing | Audit trail, replayability | Storage overhead, complexity | | Multi-AZ Aurora | High availability, managed | Cost, read replicas lag | **Alternatives Considered:** 1. Monolithic architecture (rejected due to scaling challenges at 10M users). 2. GraphQL gateway (rejected due to caching limitations for product catalog). 3. DynamoDB for inventory (rejected due to eventual consistency risks). ### Architecture Decision Record (ADR-001): Microservices Architecture **Status:** Proposed **Context:** Need to scale to 10M users while maintaining 99.9% uptime. **Decision:** Adopt microservices with Kubernetes orchestration. **Consequences:** - ✅ Independent scaling of components - ✅ Faster deployment cycles - ❌ Increased operational complexity - ❌ Network latency between services **Alternatives:** Monolithic architecture (rejected due to scaling limitations). **Next Steps:** 1. Conduct load testing with Locust to validate p99 latency. 2. Implement service mesh (Istio) for observability and traffic management. 3. Set up chaos engineering experiments (Gremlin) for resilience testing.
skills-collection
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan