This skill helps you document architecture and high-level system design, emphasizing interfaces, data flows, and decision rationale.
npx playbooks add skill mcouthon/agents --skill architecture
High-level design and system understanding.
> "Interfaces in; interfaces out. Data in; data out. Major flows, contracts, behaviors, and failure modes only."
If you find yourself describing implementation details, STOP. Zoom out.
✅ Include:
❌ Never Include:
| ❌ Don't Do This | ✅ Do This Instead |
| --------------------------------------- | ---------------------------------------- |
| "The function iterates over items..." | "Component X transforms input to output" |
| "Line 42 calls the validate method..." | "Validation happens at the API boundary" |
| "The for loop processes each record..." | "Records flow from A → B → C" |
| "This uses a HashMap with..." | "State is cached in memory" |
## Architecture Overview
### Purpose
[What this system does in 1-2 sentences]
### Components
| Component | Responsibility | Dependencies |
| --------- | ---------------- | ------------ |
| `api` | HTTP interface | auth, db |
| `auth` | Authentication | db |
| `db` | Data persistence | - |
### Data Flow
[Mermaid diagram - see below]
### Key Decisions
| Decision | Rationale | Tradeoffs |
| -------- | --------- | ----------- |
| [choice] | [why] | [pros/cons] |
graph LR
Client --> API
API --> Auth
API --> Service
Service --> DB
Service --> Cache
sequenceDiagram
participant C as Client
participant A as API
participant S as Service
participant D as Database
C->>A: POST /orders
A->>S: create_order()
S->>D: INSERT order
D-->>S: order_id
S-->>A: Order
A-->>C: 201 Created
## API: /orders
### POST /orders
Create a new order.
**Request**:
{
"items": [{ "sku": "ABC", "qty": 2 }],
"customer_id": "cust_123"
}
Response (201):
{
"order_id": "ord_456",
"status": "pending",
"total": 49.99
}
Errors:
400 Bad Request - Invalid input401 Unauthorized - Missing auth422 Unprocessable Entity - Business rule violation
## Guidelines
- Focus on **what** and **why**, not **how**
- Use diagrams liberally - they communicate structure better than prose
- Document decision rationale, not just the decision
- Identify failure modes and how they're handled
- Keep documentation close to the code it describesWeekly roundup of top Claude Code skills, MCP servers, and AI coding tips.