make-arch-diag
Skill5 starsChanged 6 months agoMITView on GitHub
Generate architecture diagram for a specific component or system. Prompts user to select which area to document, then creates comprehensive mermaid diagrams.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Trecek/useful-claude-skillsword for word, first seen Mar 26, 2026
Other versions1 project uses a version of this.
Word for word · 1
- Trecek/useful-claude-skills★ 1100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- audit-archSkill
- audit-bugsSkill
- audit-cohesionSkill
- audit-defense-standardsSkill
- audit-testsSkill
- chart-courseSkill
- check-bearingSkill
- design-guardsSkill
- elaborate-phaseSkill
- id-slopSkill
- make-reqSkill
- make-scenariosSkill
- promote-to-mainSkill
- render-recipeSkill
- review-promotionSkill
- update-architectureSkill
- update-reqsSkill
- update-specsSkill
- validate-auditSkill
- verify-diagSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 17 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Before making significant architectural changes
- Distinctive: line 21
Ask user which component/system to diagram
- Very specific: line 22
Use the /mermaid skill for diagram creation
- Distinctive: line 25
Use consistent color coding across all diagrams
- Distinctive: line 28
Create diagrams without understanding the code
- Distinctive: line 30
Use generic placeholder names
- Distinctive: line 31
Create diagrams that contradict the code
- Distinctive: line 39
Ask the user which area they want diagrammed:
- Very specific: line 97
Use /mermaid skill to create each diagram:
- Distinctive: line 98
Follow standard color palette
- Distinctive: line 100
Add clear labels and descriptions
- Distinctive: line 292
Use consistent colors for component types
- Distinctive: line 321
Use component diagram with horizontal layers.
- Distinctive: line 327
Use data flow diagram showing transformations.
- Distinctive: line 333
Use sequence diagram showing event flow.
- Distinctive: line 339
Use deployment diagram showing runtime structure.
- Distinctive: line 346
Read the code, don't guess
- Distinctive: line 348
Verify assumptions with code inspection
- Distinctive: line 356
Update diagrams when code changes
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Make-Arch-Diag: Architecture Diagram Generation
Creates comprehensive architecture diagrams for selected components or systems using mermaid syntax.
When to Use
- Documenting a new feature or component
- Updating architecture documentation after changes
- Onboarding new team members
- Explaining complex system interactions
- Before making significant architectural changes
Critical Constraints
ALWAYS:
- Ask user which component/system to diagram
- Use the
/mermaidskill for diagram creation - Include multiple views (data flow, component structure, sequence diagrams)
- Save diagrams to
temp/make-arch-diag/{component-name}/ - Use consistent color coding across all diagrams
NEVER:
- Create diagrams without understanding the code
- Skip reading the actual implementation
- Use generic placeholder names
- Create diagrams that contradict the code
Workflow
Step 1: Component Selection
Ask the user which area they want diagrammed:
Which component or system would you like to diagram?
Examples:
- Authentication system
- Database layer
- API endpoints
- Message queue processing
- State management
- Specific feature (e.g., "user registration flow")
Please specify the component/system:Step 2: Scope Definition
Based on user input, determine:
- Boundaries: What's in scope vs out of scope
- Level of Detail: High-level architecture vs detailed implementation
- Audience: Developers, architects, stakeholders
Step 3: Code Exploration
Investigate the codebase:
- Find entry points (main, CLI, API routes)
- Trace execution flows
- Identify components and their relationships
- Map data flows
- Document external dependencies
Step 4: Diagram Types Selection
Choose appropriate diagram types:
Component Diagram (Always include)
- Shows major components and their relationships
- Good for: Understanding system structure
Data Flow Diagram (Include if data transformation is central)
- Shows how data moves through the system
- Good for: Understanding pipelines, ETL, processing
Sequence Diagram (Include if interactions are complex)
- Shows step-by-step execution flow
- Good for: Understanding request/response, async operations
State Diagram (Include if state management is central)
- Shows states and transitions
- Good for: Understanding lifecycle, workflows
Deployment Diagram (Include for infrastructure docs)
- Shows how system is deployed
- Good for: Understanding runtime environment
Step 5: Create Diagrams
Use /mermaid skill to create each diagram:
- Follow standard color palette
- Include legends
- Add clear labels and descriptions
- Group related components in subgraphs
Step 6: Write Architecture Description
Create temp/make-arch-diag/{component}/architecture.md:
# {Component} Architecture
## Overview
[2-3 paragraph overview of the component]
## Diagrams
### Component Structure
[Embed component diagram]
### Data Flow
[Embed data flow diagram]
### Sequence Diagrams
[Embed sequence diagrams for key operations]
## Components
### Component 1: {Name}
- **Purpose**: [What it does]
- **Responsibilities**: [What it's responsible for]
- **Dependencies**: [What it depends on]
- **Interface**: [How others interact with it]
### Component 2: {Name}
[Repeat for each component]
## Key Flows
### Flow 1: {Operation}
1. [Step 1]
2. [Step 2]
3. [Step 3]
### Flow 2: {Operation}
[Repeat for each key operation]
## Design Decisions
### Decision 1: {Topic}
- **Context**: [Why this decision was needed]
- **Options Considered**: [Alternatives]
- **Chosen**: [What was chosen]
- **Rationale**: [Why]
- **Tradeoffs**: [Costs and benefits]
## Constraints and Invariants
- [Constraint 1]
- [Constraint 2]
- [Invariant 1]
- [Invariant 2]
## Extension Points
- [Where/how to extend functionality]
## Related Documentation
- [Links to other architecture docs]
- [Links to API documentation]
- [Links to design documents]Example: Authentication System
Component Diagram
%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60}}}%%
graph TB
classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;
classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef integration fill:#c62828,stroke:#ef9a9a,stroke-width:2px,color:#fff;
classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;
subgraph API ["API Layer"]
Login["/login endpoint<br/>━━━━━━━━━━<br/>POST credentials"]
Refresh["/refresh endpoint<br/>━━━━━━━━━━<br/>POST refresh token"]
Logout["/logout endpoint<br/>━━━━━━━━━━<br/>POST token"]
end
subgraph Auth ["Authentication Service"]
AuthService["AuthService<br/>━━━━━━━━━━<br/>authenticate()<br/>generate_token()<br/>verify_token()"]
TokenManager["TokenManager<br/>━━━━━━━━━━<br/>create_access_token()<br/>create_refresh_token()<br/>validate_token()"]
end
subgraph Storage ["Data Layer"]
UserDB[(User Database)]
TokenCache[(Token Cache<br/>Redis)]
end
Login --> AuthService
Refresh --> TokenManager
Logout --> TokenManager
AuthService --> UserDB
AuthService --> TokenManager
TokenManager --> TokenCache
class Login,Refresh,Logout handler;
class UserDB,TokenCache stateNode;
class AuthService,TokenManager integration;Color Legend:
| Color | Category | Description |
| Orange | Handler | API endpoints |
| Teal | State | Data storage |
| Red | Integration | Service components |
Sequence Diagram: Login Flow
sequenceDiagram
participant Client
participant API as /login endpoint
participant Auth as AuthService
participant DB as User Database
participant TM as TokenManager
participant Cache as Redis
Client->>API: POST /login {username, password}
API->>Auth: authenticate(username, password)
Auth->>DB: query user by username
DB-->>Auth: User record
Auth->>Auth: verify password hash
alt Valid credentials
Auth->>TM: generate_tokens(user_id)
TM->>Cache: store refresh token
Cache-->>TM: OK
TM-->>Auth: {access_token, refresh_token}
Auth-->>API: Success + tokens
API-->>Client: 200 OK + tokens
else Invalid credentials
Auth-->>API: AuthenticationError
API-->>Client: 401 Unauthorized
endData Flow Diagram
%%{init: {'flowchart': {'nodeSpacing': 40, 'rankSpacing': 50}}}%%
flowchart LR
classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;
classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;
classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;
Input["Credentials<br/>━━━━━━━━━━<br/>username<br/>password"]
subgraph Processing
Hash["Hash Password<br/>━━━━━━━━━━<br/>bcrypt"]
Compare["Compare<br/>━━━━━━━━━━<br/>stored vs provided"]
Generate["Generate Tokens<br/>━━━━━━━━━━<br/>JWT + Refresh"]
end
Output["Response<br/>━━━━━━━━━━<br/>access_token<br/>refresh_token<br/>expires_in"]
Input --> Hash --> Compare --> Generate --> Output
class Input phase;
class Hash,Compare,Generate handler;
class Output output;Color Legend:
| Color | Category | Description |
| Purple | Phase | Input/stages |
| Orange | Handler | Processing steps |
| Dark Teal | Output | Final output |
Diagram Best Practices
1. Component Diagrams
- Group related components in subgraphs
- Show only direct dependencies (avoid clutter)
- Use consistent colors for component types
- Label interfaces/contracts
2. Data Flow Diagrams
- Flow left-to-right or top-to-bottom
- Show transformations clearly
- Indicate data format at each stage
- Highlight validation points
3. Sequence Diagrams
- Include all actors/systems
- Show both success and error paths
- Annotate with actual function/method names
- Include timing constraints if relevant
4. State Diagrams
- Show all valid states
- Show all valid transitions
- Annotate transitions with trigger conditions
- Highlight error/terminal states
Common Patterns to Diagram
Layered Architecture
Presentation Layer → Business Logic Layer → Data Access LayerUse component diagram with horizontal layers.
Pipeline Architecture
Input → Stage 1 → Stage 2 → Stage 3 → OutputUse data flow diagram showing transformations.
Event-Driven Architecture
Event Source → Event Bus → Handlers → Side EffectsUse sequence diagram showing event flow.
Microservices Architecture
Service A ↔ API Gateway ↔ Service B ↔ DatabaseUse deployment diagram showing runtime structure.
Tips
Understand Before Diagramming
- Read the code, don't guess
- Trace actual execution paths
- Verify assumptions with code inspection
Choose Right Level of Detail
- Executive overview: High-level components only
- Developer docs: Show classes/modules
- Implementation guide: Show methods/functions
Keep It Current
- Update diagrams when code changes
- Include diagram generation date
- Link diagrams to specific code versions/commits
Make It Useful
- Diagrams should answer questions
- Diagrams should reveal structure
- Diagrams should not just be pretty pictures
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.

