# c4

> Scaffold, model, and export C4 architecture diagrams using Structurizr DSL and Nygard ADRs.

c4 is a subscription AI agent skill on Agensi by Alex Cristea, in Technical Documentation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5/mo (subscription, cancel anytime)
- Creator: [Alex Cristea](https://www.agensi.io/creators/alexcristea)
- Category: [Technical Documentation](https://www.agensi.io/skills/technical-documentation)
- Version: 1.0
- Last updated: 2026-10-13
- Security: scan passed (2026-10-13); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/c4
- Tags: documentation, c4-model, structurizr, adr, software-architecture

## About this skill

Architecture diagrams often rot because the friction of updating DSLs or manual drawing is too high. This skill automates the creation and maintenance of C4 model architecture using the Structurizr DSL, ensuring your system design stays in sync with your implementation.

### What it does
- **Scaffold workspaces** by generating the initial Structurizr DSL structure, ADR folders, and documentation templates.
- **Model infrastructure** to map codebases, AWS environments, or Kubernetes clusters into C4 containers and components.
- **Manage ADRs** using the Nygard format to record, supersede, and track architectural decisions alongside the model.
- **Export diagrams** into multiple formats including Mermaid, PlantUML, JSON, and static HTML sites for documentation.
- **Live preview** diagrams in a local browser with auto-reload capabilities during the editing process.
- **Validate syntax** to catch Structurizr DSL errors before they break your CI/CD or documentation pipeline.

### How it works
1. **Dispatch** by identifying if the project needs a new workspace, an update to an existing model, or a validation check.
2. **Apply conventions** to ensure ADR numbering, naming, and style guides match the project's architectural standards.
3. **Execute workflows** to modify `workspace.dsl`, add views, or update deployment environments.
4. **Render and export** the final visual assets for use in READMEs, wikis, or stakeholder presentations.

### Frameworks & tools
This tool uses the Structurizr DSL, Nygard Architecture Decision Records (ADRs), PlantUML, and Mermaid. It interacts with the local filesystem and Docker for rendering and validation.

### Why this beats prompting it yourself
Generic LLMs often hallucinate DSL syntax or ignore strict ADR numbering conventions. This skill follows specific workflows for validation and style consistency, preventing the broken relationships and syntax errors common in manual prompting.

### Use cases
- Scaffold a new architecture-as-code repository for a microservices project.
- Update a C4 container diagram after adding a new database or message queue.
- Export Mermaid diagrams from a DSL to embed directly into GitHub READMEs.
- Track a major technology shift by recording a Nygard ADR that supersedes a previous decision.

### Known limitations
Requires a local environment capable of running Bash and Docker for full rendering and validation features. DSL files must be structured according to the tool's expected workspace layout.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the c4 skill from Agensi" and describe your task.
3. Subscribe on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does the c4 skill help maintain system architecture documentation?

This skill automates the creation of C4 model diagrams using Structurizr DSL and tracks architectural evolution through Nygard ADRs, preventing 'documentation rot' by keeping your visual models in sync with your codebase.

### What diagram formats can I export using this skill?

The skill exports to several industry-standard formats, including Mermaid, PlantUML, JSON, and static HTML, making it easy to embed your diagrams directly into GitHub READMEs, wikis, or internal presentations.

### Can this skill manage Architecture Decision Records (ADRs) alongside my diagrams?

Yes, the skill is designed to manage Nygard-style ADRs, allowing you to record new decisions, track historical changes, and automatically handle the 'superseded' status of older architectural records.

### What are the technical requirements for running the c4 skill locally?

You will need a local environment capable of running Bash and Docker, as these are required for the full rendering, syntax validation, and live preview functionalities.

### Why should I use this skill instead of manually prompting an LLM to write Structurizr DSL?

Unlike generic prompts, this skill uses specific validation workflows and strict style guides to prevent syntax hallucinations and broken relationships within your Structurizr DSL files.

### Which AI agents are compatible with this architectural scaffolding skill?

The skill is compatible with most major AI agent platforms that support filesystem access and command-line tool execution, allowing it to interact with your local workspace.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
