
c4-architecture
Architecture documentation skill that generates C4 model Mermaid diagrams for software systems.
- GitHub stars
- 2.7K
What it does
- Adds a
c4-architectureskill that produces context, container, component, and deployment diagrams - Covers system architecture documentation and software structure visualization in Mermaid syntax
- Triggers on requests such as "architecture diagram," "document system architecture," and "create C4 diagrams"
Generate architecture documentation using C4 model Mermaid diagrams. Use when asked to create architecture diagrams, document system architecture, visualize software structure.
Add marketplace
/plugin marketplace add softaworks/agent-toolkitRun it inside Claude Code once, then install the plugin below.
Install
/plugin install c4-architecture@agent-toolkitRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceC4 Architecture Documentation
Generate software architecture documentation using C4 model diagrams in Mermaid syntax.
Workflow
- Understand scope - Determine which C4 level(s) are needed based on audience
- Analyze codebase - Explore the system to identify components, containers, and relationships
- Generate diagrams - Create Mermaid C4 diagrams at appropriate abstraction levels
- Document - Write diagrams to markdown files with explanatory context
C4 Diagram Levels
Select the appropriate level based on the documentation need:
| Level | Diagram Type | Audience | Shows | When to Create |
|---|---|---|---|---|
| 1 | C4Context | Everyone | System + external actors | Always (required) |
| 2 | C4Container | Technical | Apps, databases, services | Always (required) |
| 3 | C4Component | Developers | Internal components | Only if adds value |
| 4 | C4Deployment | DevOps | Infrastructure nodes | For production systems |
| - | C4Dynamic | Technical | Request flows (numbered) | For complex workflows |
Key Insight: "Context + Container diagrams are sufficient for most software development teams." Only create Component/Code diagrams when they genuinely add value.
Quick Start Examples
System Context (Level 1)
C4Context
title System Context - Workout Tracker
Person(user, "User", "Tracks workouts and exercises")
System(app, "Workout Tracker", "Vue PWA for tracking strength and CrossFit workouts")
System_Ext(browser, "Web Browser", "Stores data in IndexedDB")
Rel(user, app, "Uses")
Rel(app, browser, "Persists data to", "IndexedDB")
Container Diagram (Level 2)
C4Container
title Container Diagram - Workout Tracker
Person(user, "User", "Tracks workouts")
Container_Boundary(app, "Workout Tracker PWA") {
Container(spa, "SPA", "Vue 3, TypeScript", "Single-page application")
Container(pinia, "State Management", "Pinia", "Manages application state")
ContainerDb(indexeddb, "IndexedDB", "Dexie", "Local workout storage")
}
Rel(user, spa, "Uses")
Rel(spa, pinia, "Reads/writes state")
Rel(pinia, indexeddb, "Persists", "Dexie ORM")
Component Diagram (Level 3)
C4Component
title Component Diagram - Workout Feature
Container(views, "Views", "Vue Router pages")
Container_Boundary(workout, "Workout Feature") {
Component(useWorkout, "useWorkout", "Composable", "Workout execution state")
Component(useTimer, "useTimer", "Composable", "Timer state machine")
Component(workoutRepo, "WorkoutRepository", "Dexie", "Workout persistence")
}
Rel(views, useWorkout, "Uses")
Rel(useWorkout, useTimer, "Controls")
Rel(useWorkout, workoutRepo, "Saves to")
Dynamic Diagram (Request Flow)
C4Dynamic
title Dynamic Diagram - User Sign In Flow
ContainerDb(db, "Database", "PostgreSQL", "User credentials")
Container(spa, "Single-Page App", "React", "Banking UI")
Container_Boundary(api, "API Application") {
Component(signIn, "Sign In Controller", "Express", "Auth endpoint")
Component(security, "Security Service", "JWT", "Validates credentials")
}
Rel(spa, signIn, "1. Submit credentials", "JSON/HTTPS")
Rel(signIn, security, "2. Validate")
Rel(security, db, "3. Query user", "SQL")
UpdateRelStyle(spa, signIn, $textColor="blue", $offsetY="-30")
Deployment Diagram
C4Deployment
title Deployment Diagram - Production
Deployment_Node(browser, "Customer Browser", "Chrome/Firefox") {
Container(spa, "SPA", "React", "Web application")
}
Deployment_Node(aws, "AWS Cloud", "us-east-1") {
Deployment_Node(ecs, "ECS Cluster", "Fargate") {
Container(api, "API Service", "Node.js", "REST API")
}
Deployment_Node(rds, "RDS", "db.r5.large") {
ContainerDb(db, "Database", "PostgreSQL", "Application data")
}
}
Rel(spa, api, "API calls", "HTTPS")
Rel(api, db, "Reads/writes", "JDBC")
Element Syntax
People and Systems
Person(alias, "Label", "Description")
Person_Ext(alias, "Label", "Description") # External person
System(alias, "Label", "Description")
System_Ext(alias, "Label", "Description") # External system
SystemDb(alias, "Label", "Description") # Database system
SystemQueue(alias, "Label", "Description") # Queue system
Containers
Container(alias, "Label", "Technology", "Description")
Container_Ext(alias, "Label", "Technology", "Description")
ContainerDb(alias, "Label", "Technology", "Description")
ContainerQueue(alias, "Label", "Technology", "Description")
Components
Component(alias, "Label", "Technology", "Description")
Component_Ext(alias, "Label", "Technology", "Description")
ComponentDb(alias, "Label", "Technology", "Description")
Boundaries
Enterprise_Boundary(alias, "Label") { ... }
System_Boundary(alias, "Label") { ... }
Container_Boundary(alias, "Label") { ... }
Boundary(alias, "Label", "type") { ... }
Relationships
Rel(from, to, "Label")
Rel(from, to, "Label", "Technology")
BiRel(from, to, "Label") # Bidirectional
Rel_U(from, to, "Label") # Upward
Rel_D(from, to, "Label") # Downward
Rel_L(from, to, "Label") # Leftward
Rel_R(from, to, "Label") # Rightward
Deployment Nodes
Deployment_Node(alias, "Label", "Type", "Description") { ... }
Node(alias, "Label", "Type", "Description") { ... } # Shorthand
Styling and Layout
Layout Configuration
UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="1")
$c4ShapeInRow- Number of shapes per row (default: 4)$c4BoundaryInRow- Number of boundaries per row (default: 2)
Element Styling
UpdateElementStyle(alias, $fontColor="red", $bgColor="grey", $borderColor="red")
Relationship Styling
UpdateRelStyle(from, to, $textColor="blue", $lineColor="blue", $offsetX="5", $offsetY="-10")
Use $offsetX and $offsetY to fix overlapping relationship labels.
Best Practices
Essential Rules
- Every element must have: Name, Type, Technology (where applicable), and Description
- Use unidirectional arrows only - Bidirectional arrows create ambiguity
- Label arrows with action verbs - "Sends email using", "Reads from", not just "uses"
- Include technology labels - "JSON/HTTPS", "JDBC", "gRPC"
- Stay under 20 elements per diagram - Split complex systems into multiple diagrams
Clarity Guidelines
- Start at Level 1 - Context diagrams help frame the system scope
- One diagram per file - Keep diagrams focused on a single abstraction level
- Meaningful aliases - Use descriptive aliases (e.g.,
orderServicenots1) - Concise descriptions - Keep descriptions under 50 characters when possible
- Always include a title - "System Context diagram for [System Name]"
What to Avoid
See references/common-mistakes.md for detailed anti-patterns:
- Confusing containers (deployable) vs components (non-deployable)
- Modeling shared libraries as containers
- Showing message brokers as single containers instead of individual topics
- Adding undefined abstraction levels like "subcomponents"
- Removing type labels to "simplify" diagrams
Microservices Guidelines
Single Team Ownership
Model each microservice as a container (or container group):
C4Container
title Microservices - Single Team
System_Boundary(platform, "E-commerce Platform") {
Container(orderApi, "Order Service", "Spring Boot", "Order processing")
ContainerDb(orderDb, "Order DB", "PostgreSQL", "Order data")
Container(inventoryApi, "Inventory Service", "Node.js", "Stock management")
ContainerDb(inventoryDb, "Inventory DB", "MongoDB", "Stock data")
}
Multi-Team Ownership
Promote microservices to software systems when owned by separate teams:
C4Context
title Microservices - Multi-Team
Person(customer, "Customer", "Places orders")
System(orderSystem, "Order System", "Team Alpha")
System(inventorySystem, "Inventory System", "Team Beta")
System(paymentSystem, "Payment System", "Team Gamma")
Rel(customer, orderSystem, "Places orders")
Rel(orderSystem, inventorySystem, "Checks stock")
Rel(orderSystem, paymentSystem, "Processes payment")
Event-Driven Architecture
Show individual topics/queues as containers, NOT a single "Kafka" box:
C4Container
title Event-Driven Architecture
Container(orderService, "Order Service", "Java", "Creates orders")
Container(stockService, "Stock Service", "Java", "Manages inventory")
ContainerQueue(orderTopic, "order.created", "Kafka", "Order events")
ContainerQueue(stockTopic, "stock.reserved", "Kafka", "Stock events")
Rel(orderService, orderTopic, "Publishes to")
Rel(stockService, orderTopic, "Subscribes to")
Rel(stockService, stockTopic, "Publishes to")
Rel(orderService, stockTopic, "Subscribes to")
Output Location
Write architecture documentation to docs/architecture/ with naming convention:
c4-context.md- System context diagramc4-containers.md- Container diagramc4-components-{feature}.md- Component diagrams per featurec4-deployment.md- Deployment diagramc4-dynamic-{flow}.md- Dynamic diagrams for specific flows
Audience-Appropriate Detail
| Audience | Recommended Diagrams |
|---|---|
| Executives | System Context only |
| Product Managers | Context + Container |
| Architects | Context + Container + key Components |
| Developers | All levels as needed |
| DevOps | Container + Deployment |
References
- references/c4-syntax.md - Complete Mermaid C4 syntax
- references/common-mistakes.md - Anti-patterns to avoid
- references/advanced-patterns.md - Microservices, event-driven, deployment
From the softaworks/agent-toolkit README
Softaworks Agent Skills
Opinionated skills shared by @leonardocouy for improving daily work efficiency with Claude Code. Skills are packaged instructions and scripts that extend agent capabilities across development, documentation, planning, and professional workflows.
Skills follow the Agent Skills format.
๐งญ Quick Navigation
๐ Installation โข ๐ Available Skills โข ๐ค Agents & Commands โข ๐ Skill Structure โข ๐ค Contributing โข ๐ License โข ๐ Links
๐ Installation
Quick Install (Recommended)
npx skills add softaworks/agent-toolkit
This method works with multiple AI coding agents (Claude Code, Codex, Cursor, AdaL, etc.)
Register as Plugin Marketplace
Run the following commands in Claude Code:
/plugin marketplace add softaworks/agent-toolkit
/plugin
Install Plugins
Option 1: Via Browse UI
- Switch to Marketplaces tab (use arrow keys or Tab)
- Select agent-toolkit, press Enter
- Browse and select the plugin(s) you want to install
- Select Install now
Option 2: Direct Install
# Install specific skill
/plugin install codex@agent-toolkit
/plugin install humanizer@agent-toolkit
# Install specific agent
/plugin install agent-codebase-pattern-finder@agent-toolkit
# Install specific command
/plugin install command-codex-plan@agent-toolkit
Option 3: Ask the Agent
Simply tell Claude Code:
Please install Skills from github.com/softaworks/agent-toolkit
Available Plugins
Each skill, agent, and command is an individual plugin that can be installed separately:
- Skills โ See Available Skills for the full list
- Agents โ See Agents (install as
agent-<name>@agent-toolkit) - Commands โ See Slash Commands (install as
command-<name>@agent-toolkit)
Update Plugins
To update plugins to the latest version:
- Run
/pluginin Claude Code - Switch to Marketplaces tab
- Select agent-toolkit
- Choose Update marketplace
You can also Enable auto-update to get the latest versions automatically.
Manual Installation
For Claude Code (Manual) โ Skills only
cp -r skills/<skill-name> ~/.claude/skills/
For claude.ai โ Skills only
Add skills to project knowledge or paste SKILL.md contents into the conversation.
๐ Available Skills
| Category | Skill | Description |
|---|---|---|
| ๐ค AI Tools | codex | Advanced code analysis with GPT-5.2 |
| ๐ค AI Tools | gemini | Large-scale review (200k+ context) |
| ๐ค AI Tools | perplexity | Web search & research |
| ๐ฎ Meta | agent-md-refactor | Refactor bloated agent instruction files |
| ๐ฎ Meta | command-creator | Create Claude Code slash commands |
| ๐ฎ Meta | plugin-forge | Build Claude Code plugins & manifests |
| ๐ฎ Meta | skill-judge | Evaluate skill design quality |
| ๐ Documentation | backend-to-frontend-handoff-docs | API handoff docs for frontend |
| ๐ Documentation | c4-architecture | C4 architecture diagrams with Mermaid |
| ๐ Documentation | crafting-effective-readmes | Write effective README files |
| ๐ Documentation | draw-io | Create & edit draw.io diagrams |
| ๐ Documentation | excalidraw | Work with Excalidraw diagrams |
| ๐ Documentation | frontend-to-backend-requirements | Document API requirements |
| ๐ Documentation | marp-slide | Professional presentation slides |
| ๐ Documentation | mermaid-diagrams | Software diagrams with Mermaid |
| ๐ Documentation | writing-clearly-and-concisely | Clear, professional writing |
| ๐จ Design & Frontend | design-system-starter | Create design systems |
| ๐จ Design & Frontend | mui | Material-UI v7 patterns |
| ๐จ Design & Frontend | openapi-to-typescript | Convert OpenAPI to TypeScript |
| ๐จ Design & Frontend | react-dev | Type-safe React 18-19 with TypeScript |
| ๐จ Design & Frontend | react-useeffect | React useEffect best practices |
| ๐ ๏ธ Development | database-schema-designer | Design robust database schemas |
| ๐ ๏ธ Development | dependency-updater | Smart dependency management |
| ๐ ๏ธ Development | naming-analyzer | Suggest better variable/function names |
| ๐ ๏ธ Development | lesson-learned | Extract SE lessons from recent code changes |
| ๐ ๏ธ Development | reducing-entropy | Minimize codebase size |
| ๐ ๏ธ Development | session-handoff | Seamless AI session transfers |
| ๐ฏ Planning | game-changing-features | Find 10x product opportunities |
| ๐ฏ Planning | gepetto | Detailed implementation planning |
| ๐ฏ Planning | requirements-clarity | Clarify requirements before coding |
| ๐ฏ Planning | ship-learn-next | Turn learning into actionable reps |
| ๐ Professional | daily-meeting-update | Interactive daily standup generator |
| ๐ Professional | difficult-workplace-conversations | Navigate difficult conversations |
| ๐ Professional | feedback-mastery | Deliver constructive feedback |
| ๐ Professional | professional-communication | Technical communication guide |
| ๐งช Testing | qa-test-planner | Comprehensive QA test planning |
| ๐ฆ Git | commit-work | High-quality git commits |
| ๐ง Utilities | datadog-cli | Debug with Datadog logs & metrics |
| ๐ง Utilities | domain-name-brainstormer | Generate & check domain names |
| ๐ง Utilities | humanizer | Remove AI writing patterns |
| ๐ง Utilities | meme-factory | Generate memes with API |
| ๐ง Utilities | jira | Natural language Jira interaction |
| ๐ง Utilities | web-to-markdown | Convert webpages to Markdown |
๐ค Agents & Commands
Requires Claude Code CLI โ These agents and commands are exclusive to Claude Code users.
For full access, add the marketplace and install plugins:
/plugin marketplace add softaworks/agent-toolkit /plugin install codex@agent-toolkit
Agents
Specialized sub-agents that Claude Code can delegate tasks to:
| Agent | Description |
|---|---|
| ascii-ui-mockup-generator | Visualize UI concepts through ASCII mockups |
| codebase-pattern-finder | Find similar implementations and patterns |
| communication-excellence-coach | Email refinement, tone calibration, roleplay |
| general-purpose | Default agent for complex multi-step tasks |
| mermaid-diagram-specialist | Create flowcharts, sequence diagrams, ERDs |
| ui-ux-designer | Research-backed UI/UX design feedback |
Slash Commands
Reusable workflows invoked with /command-name:
| Command | Description |
|---|---|
/codex-plan | Create implementation plans using Codex 5.2 |
/compose-email | Draft professional emails |
/explain-changes-mental-model | Build mental model of code changes |
/explain-pr-changes | Generate PR summaries |
/sync-branch | Sync feature branch with main |
/sync-skills-readme | Update README skills table |
/viral-tweet | Optimize tweet ideas for X engagement |
๐ Skill Structure
Each skill contains:
SKILL.md- Detailed instructions for the agent (with YAML frontmatter)README.md- User-friendly documentation with examplesscripts/- Helper scripts for automation (optional)references/- Supporting documentation (optional)
๐ค Contributing
Contributions are welcome! When adding new skills:
- Follow the Agent Skills format
- Include both
SKILL.md(for agents) andREADME.md(for users) - Add YAML frontmatter to
SKILL.mdwithname:anddescription:fields - Update this README.md with a link to your skill
๐ License
MIT
๐ Links
Details
- Marketplace
- softaworks/agent-toolkit
- Source
- dist/plugins/c4-architecture
- Category
- Documentation
- Keywords
- documentation, architecture, c4, mermaid, diagrams
- Listed since
- Apr 6, 2026
More from softaworks/agent-toolkit
All 56- codex
- command-codex-plan
- command-compose-email
- command-creator
- command-explain-changes-mental-model
- command-explain-pr-changes
- command-sync-branch
- command-sync-skills-readme
- command-viral-tweet
- commit-work
- crafting-effective-readmes
- daily-meeting-update
- database-schema-designer
- datadog-cli
- dependency-updater
- design-system-starter
- difficult-workplace-conversations
- domain-name-brainstormer
- draw-io
- excalidraw
- feedback-mastery
- frontend-to-backend-requirements
- game-changing-features
- gemini
Similar to c4-architecture
More Technical Documentation
c4-architectureSkillsoftaworks/agent-toolkit4.3K installsGenerates C4 model architecture diagrams in Mermaid for system context, containers, components, deployment, and request flows.
mermaid-diagramsSkillsoftaworks/agent-toolkit5.3K installsComprehensive Mermaid guide for creating diagrams of software, databases, architecture, and processes as text.
deep-wikiPluginmicrosoft/skills3.2K starsAI-powered wiki generator for code repositories. Generates comprehensive, Mermaid-rich structured documentation with architecture diagrams, component analysis,
draw.ioMCP serverjgraph5.9K starsCreate and display interactive draw.io diagrams from Mermaid or draw.io XML, with 10,000+ library shapes.
cartographPluginathola/claude-night-market350 starsCodebase visualization: architecture, data flow, dependency, call chains, community detection, and class diagrams via Mermaid Chart MCP
code-architectPluginrohitg00/awesome-claude-code-toolkit2.8K starsGenerate architecture diagrams and technical design documents