architecture-docs
Create and maintain architecture documentation with Mermaid diagrams. Use when writing technical documentation, system diagrams, or updating the implementation plan.
Best use case
architecture-docs is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create and maintain architecture documentation with Mermaid diagrams. Use when writing technical documentation, system diagrams, or updating the implementation plan.
Teams using architecture-docs should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/architecture-docs/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How architecture-docs Compares
| Feature / Agent | architecture-docs | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create and maintain architecture documentation with Mermaid diagrams. Use when writing technical documentation, system diagrams, or updating the implementation plan.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Architecture Documentation Skill
## Overview
This skill provides patterns for creating clear, maintainable architecture documentation with properly formatted Mermaid diagrams.
## When to Use
- Creating system architecture diagrams
- Documenting data flows
- Writing implementation plans
- Creating entity relationship diagrams
- Updating `docs/implementation-plan/`
---
## Mermaid Diagram Best Practices
### CRITICAL: Quote Special Characters
Mermaid will break on unquoted special characters. **ALWAYS quote node labels containing:**
| Character | Example | Wrong | Correct |
|-----------|---------|-------|---------|
| Parentheses | `(info)` | `A[Label (info)]` | `A["Label (info)"]` |
| Brackets | `[0]` | `A[Array [0]]` | `A["Array [0]"]` |
| Angle brackets | `<table>` | `A[Id<table>]` | `A["Id<table>"]` |
| Colon | `:` | `A[Key: Value]` | `A["Key: Value"]` |
| Ampersand | `&` | `A[A & B]` | `A["A & B"]` |
| Greater/Less | `>`, `<` | `A[x > 5]` | `A["x > 5"]` |
| Pipe | `\|` | `A[A \| B]` | `A["A \| B"]` |
| Question mark | `?` | `A[Is valid?]` | `A["Is valid?"]` |
### Flowchart Template
```mermaid
flowchart TD
subgraph Input["📥 Input Layer"]
A["SAM.gov API"]
B["eMMA Scraper"]
C["RFPMart API"]
end
subgraph Processing["⚙️ Processing"]
D["Canonical Schema"]
E["Deduplication"]
F{"Eligibility Gate"}
end
subgraph Output["📤 Output"]
G["ELIGIBLE"]
H["PARTNER_REQUIRED"]
I["REJECTED"]
end
A --> D
B --> D
C --> D
D --> E
E --> F
F -->|"Pass"| G
F -->|"Partner needed"| H
F -->|"Fail"| I
```
### Sequence Diagram Template
```mermaid
sequenceDiagram
participant U as "User"
participant FE as "React Frontend"
participant BE as "Convex Backend"
participant AI as "Gemini AI"
U->>FE: Click "Evaluate"
FE->>BE: mutation("evaluations.run")
BE->>BE: Check eligibility first
alt Eligible
BE->>AI: Send evaluation prompt
AI-->>BE: Return JSON result
BE-->>FE: Evaluation complete
else Not Eligible
BE-->>FE: Return rejection reason
end
FE-->>U: Show result
```
### Entity Relationship Diagram Template
```mermaid
erDiagram
OPPORTUNITY ||--o{ EVALUATION : "has"
OPPORTUNITY ||--o| PURSUIT : "may have"
EVALUATION ||--|| ELIGIBILITY : "contains"
EVALUATION ||--o{ DIMENSION_SCORE : "contains"
PURSUIT ||--o{ NOTE : "has"
PURSUIT ||--o| BRIEF : "has"
USER ||--o{ PURSUIT : "owns"
OPPORTUNITY {
string id PK
string title
string source
number dueDate
}
EVALUATION {
string id PK
string opportunityId FK
string eligibilityStatus
number totalScore
}
```
### State Diagram Template
```mermaid
stateDiagram-v2
[*] --> New
New --> Triage: Review
Triage --> Bid: Decide to pursue
Triage --> NoBid: Decide to skip
Bid --> Capture: Start capture
Capture --> Draft: Begin writing
Draft --> Review: Submit for review
Review --> Draft: Request changes
Review --> Submitted: Approve
Submitted --> Won: Award received
Submitted --> Lost: Not selected
NoBid --> [*]
Won --> [*]
Lost --> [*]
```
---
## Documentation Structure
### Implementation Plan Structure
```
docs/implementation-plan/
├── README.md # Executive summary
│ - High-level architecture diagram
│ - Phase timeline table
│ - Success metrics
│ - Approval checklist
│
├── phase-N-[name]/README.md # Phase details
│ - Objectives
│ - Data model changes
│ - Code examples
│ - Implementation checklist
│ - Files to create/modify
│
└── architecture/
├── README.md # Multi-level architecture
│ - Executive view (business flow)
│ - Technical view (system components)
│ - Implementation view (file structure)
│
└── DATABASE-SCHEMA.md # Complete schema
- Entity relationship diagram
- Table definitions
- Index definitions
- Complete schema.ts code
```
### Feature Documentation Structure
```
docs/features/[feature-name]/
├── README.md # Problem, solution, success criteria
├── ARCHITECTURE.md # Technical design with diagrams
└── IMPLEMENTATION.md # Step-by-step plan with checklists
```
---
## ASCII Diagrams
For inline documentation or simpler contexts, use ASCII art:
### Box Diagram
```
┌─────────────────────────────────────────────────────────┐
│ PROCESSING PIPELINE │
├─────────────────────────────────────────────────────────┤
│ INGEST → DEDUPE → ELIGIBILITY → SCORE → PIPELINE │
└─────────────────────────────────────────────────────────┘
```
### Flow Diagram
```
┌──────────┐ ┌──────────┐ ┌──────────┐
│ INPUT │───▶│ PROCESS │───▶│ OUTPUT │
└──────────┘ └──────────┘ └──────────┘
```
### Decision Tree
```
┌─────────────┐
│ START │
└──────┬──────┘
│
┌──────▼──────┐
│ Eligible? │
└──────┬──────┘
Yes │ No
┌────────────┴────────────┐
▼ ▼
┌──────────┐ ┌──────────┐
│ SCORE │ │ REJECT │
└──────────┘ └──────────┘
```
---
## Quick Reference
### Audience-Specific Diagrams
| Audience | Diagram Type | Focus |
|----------|--------------|-------|
| Executive | Flowchart | Business value flow |
| Architect | Component diagram | System boundaries |
| Developer | Sequence diagram | API interactions |
| DBA | ERD | Data relationships |
### Diagram Checklist
- [ ] All special characters are quoted
- [ ] Subgraph labels are descriptive
- [ ] Arrows have labels where helpful
- [ ] Colors/styles are consistent
- [ ] Diagram renders without errorsRelated Skills
architecture
Comprehensive system architecture design and implementation workflow that orchestrates expert analysis, technical decision-making, and architectural pattern selection using the integrated toolset. Handles everything from initial system analysis to implementation-ready technical specifications.
architecture-workshop
Framework for designing new architectural mechanisms when existing patterns don't fit
architecture-validator
Validate hexagonal architecture (Domain, Application, Infrastructure, Presentation). Use when creating new files in src/, reorganizing code, or when the user requests architecture validation.
architecture-validation
Dynamically validate codebase compliance with architectural decisions and constraints
architecture-to-json
Guide for extracting architectural diagrams, flowcharts, and sequence diagrams into a structured JSON format. Use this skill when you need to transform a visual or textual description of a system architecture or workflow into a clear, structured JSON representation.
architecture-tech-lead
This skill should be used when the user asks to 'review my architecture', 'improve testability', 'refactor for testing', 'reduce mocking in tests', 'too many mocks', 'extract pure functions', 'functional core imperative shell', 'design a feature', 'evaluate approaches', 'make code more testable', 'domain modeling', 'DDD design', 'bounded contexts', 'too much coupling', or needs architectural validation for Java/Spring Boot or TypeScript/Next.js codebases. Use for design decisions, not implementation.
architecture-synthesis
Generate a reference architecture specification from analyzed frameworks. Use when (1) designing a new agent framework based on prior art, (2) defining core primitives (Message, State, Tool types), (3) specifying interface protocols, (4) creating execution loop pseudocode, or (5) producing architecture diagrams and implementation roadmaps.
architecture-strategist
Use this agent when analyzing code changes from an architectural perspective, evaluating system design decisions, or ensuring changes align with established architectural patterns. Triggers on requests like "architecture review", "design evaluation", "system architecture analysis".
architecture-status
Reports on the health and state of architecture documentation (counts of ADRs, reviews, activity levels, documentation gaps). Use when the user asks "What's our architecture status?", "Show architecture documentation", "How many ADRs do we have?", "What decisions are documented?", "Architecture health check", or wants an overview/summary of documentation state. Do NOT use for listing team members (use list-members), creating new documents (use create-adr), or conducting reviews (use architecture-review or specialist-review).
architecture-spec
Generates technical architecture specification from PRD. Covers architecture pattern, tech stack, data models, and app structure. Use when creating ARCHITECTURE.md or designing system architecture.
architecture-selection
System architecture patterns including monolith, microservices, event-driven, and serverless, with C4 modeling, scalability strategies, and technology selection criteria. Use when designing system architectures, evaluating patterns, or planning scalability.
architecture-reviewer
Review software architecture for SOLID principles, design patterns, scalability, and maintainability. Use when evaluating system design or planning refactoring.