Software architecture skill. Activates when user needs to design system architecture, select architecture patterns, create C4 diagrams, or apply domain-driven design at the strategic level. Evaluates trade-offs across monolith, microservices, serverless, event-driven, CQRS, and hexagonal architectures. Produces architecture decision records, C4 diagrams, and bounded context maps. Triggers on: /godmode:architect, "design the architecture", "system design", "how should I structure this", or when the orchestrator detects architecture-level decisions.
From godmodenpx claudepluginhub arbazkhan971/godmodeThis skill uses the workspace's default tool permissions.
references/architecture-patterns.mdreferences/system-design-patterns.mdDesigns and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
/godmode:architect/godmode:think identifies architecture as the primary concernUnderstand the system before recommending architecture:
ARCHITECTURE CONTEXT:
System: <name and purpose>
Stage: <greenfield | evolving | rewrite | migration>
Evaluate candidate patterns against the requirements. Always evaluate at least 3 patterns:
For each candidate (evaluate at least 3), fill:
PATTERN: <Name>
├── Structure: <one-line architecture summary>
├── Strengths: <key advantages for this system>
├── Weaknesses: <key disadvantages and operational cost>
└── Best when: <conditions where this pattern wins>
Candidate patterns: Modular Monolith, Microservices, Serverless/FaaS, Event-Driven, CQRS, Hexagonal (Ports & Adapters). Evaluate the top 3-6 for the system.
Present a structured comparison:
ARCHITECTURE COMPARISON — <system name>
Produce diagrams at all four C4 levels for the chosen architecture:
Who uses the system and what external systems does it interact with?
C4 CONTEXT DIAGRAM:
Users / Actors
What are the major deployable units?
C4 CONTAINER DIAGRAM:
<<System>> <System Name>
What are the major components within each container?
C4 COMPONENT DIAGRAM — <Container Name>:
<<Container>> API Service
What are the key classes/modules and their relationships?
C4 CODE DIAGRAM — <Component>:
Show key interfaces, classes, and their relationships.
Use the codebase's actual language idioms (classes for Java/C#,
Map bounded contexts and their relationships:
BOUNDED CONTEXT MAP:
For the recommended architecture, analyze non-functional requirements:
QUALITY ATTRIBUTES:
| Attribute | How the architecture addresses it |
Document the decision formally:
# ADR-<number>: <Architecture Decision Title>
## Status
docs/architecture/<system>-architecture.mddocs/adr/<number>-<decision>.md"architect: <system> — <pattern> architecture with C4 diagrams and ADR"/godmode:ddd to define domain boundaries and aggregates."/godmode:plan to decompose into implementation tasks."/godmode:api to design the API layer."Never ask to continue. Loop autonomously until architecture comparison matrix, C4 diagrams, and ADR are complete.
# Analyze architecture dependencies and coupling
npx madge --circular --extensions ts src/
npx dependency-cruiser --validate .dependency-cruiser.cjs src/
IF team size < 5: prefer modular monolith over microservices. WHEN afferent coupling > 10 on any module: refactor to reduce. IF circular dependencies > 0: break cycles before adding features.
Print on completion:
ARCHITECTURE: {system_name}
Pattern: {selected_pattern} (scored {weighted_total} vs {runner_up_score} for {runner_up})
C4 diagrams: {levels_produced} levels produced
Log every architecture session to .godmode/architect-results.tsv:
timestamp system pattern_selected patterns_compared c4_levels bounded_contexts quality_attrs adr_number verdict
Append one row per session. Create the file with headers on first run.
After EACH architecture decision:
1. MEASURE: Score the decision against the weighted comparison matrix.
2. COMPARE: Does the recommended pattern score highest? Are trade-offs documented honestly?
STOP when ANY of these are true:
- At least 3 patterns compared in weighted matrix with clear winner
- C4 Level 1 and Level 2 diagrams produced
Continuously audit architecture health with coupling metrics, dependency analysis, and SOLID violation detection:
ARCHITECTURE REVIEW LOOP:
current_iteration = 0
COUPLING ANALYSIS:
| Metric | Threshold | Measured | Status |
DEPENDENCY ANALYSIS:
| Check | Status | Details |
SOLID VIOLATION SCAN:
| Principle | Detection Signal | Count |
ARCHITECTURE HEALTH SCORECARD:
| Dimension | Score (1-10) | Weight | Weighted |
| Failure | Action |
|---|---|
| Architecture decision contested | Document tradeoffs in ADR. Prototype if needed. |
| Pattern doesn't fit after start | If < 30% done: pivot. If > 30%: adapt. Document. |
| Vendor lock-in risk | Add adapter/port layer. Abstract behind interface. |
| Performance bottleneck | Profile first. Add caching/async before restructuring. |