A skill your agent uses when explaining existing code architecture, visualizing a new system before detailed design, mapping software boundaries, or creating C4-style diagrams in ASCII or Mermaid.

MITAuto-check passedDevelopment

Install C4 Diagrams

skills CLI
$ npx skills add intent-driven-dev/intent-driven-template --skill c4-diagrams -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install intent-driven-dev/intent-driven-template c4-diagrams --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/intent-driven-dev/intent-driven-template.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/c4-diagrams .claude/skills/c4-diagrams && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
c4-diagrams
GitHub stars
160
Token cost
~1k tokens
SKILL.md length
510 words
Files
2
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when explaining existing code architecture, visualizing a new system before detailed design, mapping software boundaries, or creating C4-style diagrams in ASCII or Mermaid.

  • Works in 6 steps: Establish purpose, format, and rigor. → For existing code, inspect entry points,… → Pick the smallest useful diagram set.… → …
  • Explaining existing code architecture
  • SKILL.md covers Overview, First Gates, Workflow and C4 Level Selection, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

C4 Diagrams is an agent skill from intent-driven-dev/intent-driven-template. Use when explaining existing code architecture, visualizing a new system before detailed design, mapping software boundaries, or creating C4-style diagrams in ASCII or Mermaid.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `templates.md`).

It sits in Development, covering Diagrams. It works with Mermaid. The repository describes itself as: OpenSpec and OpenCode template for intent-driven development with specs, ADRs, C4 diagrams, Gherkin, TDD, Multi-Model Adversarial Spec Authoring, Glossary for Domain Terms, and… The licence is MIT.

When your agent uses it

  • Explaining existing code architecture
  • Visualizing a new system before detailed design
  • Mapping software boundaries
  • Creating C4-style diagrams in ASCII

Example prompts

  • “/c4-diagrams”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Establish purpose, format, and rigor.
  2. For existing code, inspect entry points, runtime boundaries, integrations, and persistence before drawing. For a quick pass, inspect…
  3. Pick the smallest useful diagram set. Start with system context or container; add component, dynamic, or deployment only when it answers a…
  4. Draw the diagram using ASCII or plain Mermaid.
  5. Explain the diagram in 3-6 bullets: boundaries, responsibilities, key relationships, assumptions, and open questions.
  6. Stop before detailed design unless the user approves the diagram and asks to continue.

What it can do on your machine

Read from SKILL.md and the folder at commit 73f54d5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

C4 Diagrams loads about 1k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 510 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from intent-driven-dev/intent-driven-template at commit 73f54d5, republished under its MIT licence (© intent-driven-dev). 510 words, ~1,026 tokens.

Download SKILL.mdSave it as .claude/skills/c4-diagrams/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
c4-diagrams
description
Use when explaining existing code architecture, visualizing a new system before detailed design, mapping software boundaries, or creating C4-style diagrams in ASCII or Mermaid.

C4 Diagrams

Overview

Use C4 diagrams to clarify software architecture before detailed design. Focus on boundaries, responsibilities, actors, dependencies, and data flow; draw only the levels that add value.

First Gates

Before diagramming, determine these choices. If the user already specified one, honor it. If multiple choices are ambiguous, ask one concise combined question.

ChoiceOptionsDefault behavior
PurposeExisting code, new system, design reviewExisting code requires codebase exploration first; new systems require assumptions called out.
FormatASCII, MermaidAsk the user. Mermaid means plain Mermaid syntax, not C4-specific Mermaid.
RigorStrict C4, lightweight C4-inspired, hybridAsk the user. Do not decide silently.

If the user asks to skip questions for speed, still preserve unresolved choices as explicit assumptions and keep the first diagram lightweight.

Workflow

  1. Establish purpose, format, and rigor.
  2. For existing code, inspect entry points, runtime boundaries, integrations, and persistence before drawing. For a quick pass, inspect enough to identify language/framework, launch entry points, major directories, external integrations, and data stores; label anything else as unknown.
  3. Pick the smallest useful diagram set. Start with system context or container; add component, dynamic, or deployment only when it answers a real question.
  4. Draw the diagram using ASCII or plain Mermaid.
  5. Explain the diagram in 3-6 bullets: boundaries, responsibilities, key relationships, assumptions, and open questions.
  6. Stop before detailed design unless the user approves the diagram and asks to continue.

C4 Level Selection

LevelUse whenAvoid when
System contextIdentifying users, external systems, and scopeThe scope is already obvious and local.
ContainerShowing deployable/runnable units, data stores, APIs, CLIs, queuesYou only need code-level call flow.
ComponentExplaining internals of one containerThe container has few meaningful internal parts.
CodeRarely, for critical classes/modulesA normal component diagram would be enough.
DynamicShowing request, event, or workflow sequenceStatic structure is the actual question.
DeploymentShowing infrastructure, nodes, networks, runtime placementDeployment is unknown or irrelevant.

For small systems, challenge requests for all four C4 levels and offer a smaller set. If the user still wants all four, produce them but mark low-value levels as lightweight sketches and explain why they may not be worth maintaining.

Show full SKILL.md (147 more words)Show less

Output Rules

  • Mermaid diagrams must use plain flowchart or sequenceDiagram syntax for portability.
  • ASCII diagrams should favor readable boxes and arrows over decorative complexity.
  • Keep labels concrete: actor, system, container, component, database, queue, external service.
  • Do not mix levels accidentally: containers are runnable/deployable units; components live inside one container.
  • Always include assumptions when diagramming a future system or incomplete codebase.
  • Always include open questions when boundaries, ownership, data flow, or deployment are uncertain.

Templates

Use templates.md in this skill directory for compact ASCII and Mermaid starting points.

Common Mistakes

MistakeFix
Drawing all four C4 levels by defaultDraw only levels that answer the current question.
Jumping into detailed design immediatelyValidate context/container boundaries first.
Using C4-specific Mermaid syntaxUse plain Mermaid flowchart or sequenceDiagram.
Treating modules as containersContainers are runnable/deployable units; modules are usually components.
Hiding uncertaintyState assumptions and open questions after the diagram.

© intent-driven-dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/c4-diagrams of intent-driven-dev/intent-driven-template.

  • SKILL.md
  • templates.md

Open the folder on GitHubat commit 73f54d5

Compare with similar skills

C4 Diagrams next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

C4 Diagrams compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
C4 Diagrams this skillintent-driven-dev/intent-driven-template160—~1kAutomated safety check: PassMIT
Archify Diagramstt-a1i/archify79k—~2.9kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design45k1 repos~7.5kAutomated safety check: PassMIT
Draw.io Diagram StudioAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT
Code Graph Mermaid Diagramstrailofbits/skills7.4k1 repos~1.7kAutomated safety check: PassCC-BY-SA-4.0
Pretty Mermaid Rendererimxv/Pretty-mermaid-skills1.5k—~2kAutomated safety check: PassMIT

Similar skills

  • Archify Diagrams

    tt-a1i/archify

    Creates interactive architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone HTML with inline SVG, themes and image or video export.

    79k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    45k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 6 days ago
    DevelopmentAuto-check: notes
  • Code Graph Mermaid Diagrams

    trailofbits/skills

    Official

    Generates Mermaid diagrams from Trailmark code graphs, including call graphs, class hierarchies, module dependency maps, complexity heatmaps and attack surface data flows.

    7.4k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed
  • Pretty Mermaid Renderer

    imxv/Pretty-mermaid-skills

    Writes and renders Mermaid diagrams as themed SVG, PNG or terminal ASCII and Unicode art with a bundled Node.js CLI that needs no browser.

    1.5k GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Archify Diagram Builder

    Unclecheng-li/AI_Animation

    Builds validated architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone interactive HTML from a small JSON spec, with optional motion and image export.

    1.5k GitHub starsUsed in 2 repos~4.1k tokens
    DevelopmentAuto-check passed

More from intent-driven-dev/intent-driven-template

All 10 skills in this repo
  • Acceptance Test Authoring

    intent-driven-dev/intent-driven-template

    A skill your agent uses when creating or modifying acceptance tests, configuring cucumber-js or behave runners, writing or refactoring step definitions, linting executable Gherkin specs, choosing an…

    160 GitHub stars~2k tokensUpdated 4 days ago
    Auto-check passed
  • Adversarial Authoring

    intent-driven-dev/intent-driven-template

    A skill your agent uses when rules or instructions mention "adversarial-authoring", "adversarial authoring", "must use adversarial-authoring skill", "model council", "cross-model review", or…

    160 GitHub stars~1k tokensUpdated 4 days ago
    Auto-check passed
  • Architectural Decision Records

    intent-driven-dev/intent-driven-template

    A skill your agent uses when documenting, drafting, reviewing, or updating architectural decisions, ADRs, decision logs, tradeoffs, rationale, consequences, alternatives, or architecture decision…

    160 GitHub stars~1k tokensUpdated 4 days ago
    Auto-check passed
  • Gherkin Authoring

    intent-driven-dev/intent-driven-template

    A skill your agent uses when drafting, reviewing, or improving Gherkin, Cucumber scenarios, BDD acceptance criteria, feature examples, Scenario Outlines, Backgrounds, Rules, Doc Strings, Data…

    160 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check passed
  • Glossary

    intent-driven-dev/intent-driven-template

    A skill your agent uses when authoring or reviewing specs, requirements, design docs, ADRs, tasks, glossary entries, domain terms, technical terms, or wording consistency across artifacts

    160 GitHub stars~767 tokensUpdated 4 days ago
    Auto-check passed
  • Openspec Bulk Apply Change

    intent-driven-dev/intent-driven-template

    A skill your agent uses when multiple active OpenSpec changes should be applied concurrently in isolated worktrees with delegated verification and no merge.

    160 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check passed

Works with

Categories

Questions about C4 Diagrams

What does C4 Diagrams do?

A skill your agent uses when explaining existing code architecture, visualizing a new system before detailed design, mapping software boundaries, or creating C4-style diagrams in ASCII or Mermaid. C4 Diagrams is an agent skill from intent-driven-dev/intent-driven-template. Use when explaining existing code architecture, visualizing a new system before detailed design, mapping software boundaries, or creating C4-style diagrams in ASCII or Mermaid.

When should I use C4 Diagrams?

C4 Diagrams fits situations like: explaining existing code architecture; visualizing a new system before detailed design; mapping software boundaries; creating C4-style diagrams in ASCII.

How do I install C4 Diagrams in Claude Code?

Run `npx skills add intent-driven-dev/intent-driven-template --skill c4-diagrams -a claude-code`. Or copy the skill folder (.agents/skills/c4-diagrams in intent-driven-dev/intent-driven-template) into .claude/skills/c4-diagrams in your project. Claude Code loads it when a task matches its description.

How do I install C4 Diagrams in Codex?

Run `npx skills add intent-driven-dev/intent-driven-template --skill c4-diagrams -a codex`. Or copy the skill folder (.agents/skills/c4-diagrams in intent-driven-dev/intent-driven-template) into .agents/skills/c4-diagrams in your project. Codex loads it when a task matches its description.

Can I use C4 Diagrams in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add intent-driven-dev/intent-driven-template --skill c4-diagrams -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/c4-diagrams, .gemini/skills/c4-diagrams, .github/skills/c4-diagrams and .opencode/skills/c4-diagrams in your project.

What does C4 Diagrams need to run?

SKILL.md names no scripts, command-line tools or credentials: C4 Diagrams is instructions for the agent only.

Does C4 Diagrams access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is C4 Diagrams safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does C4 Diagrams use?

C4 Diagrams is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does C4 Diagrams use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to C4 Diagrams?

Skills that share tags, products or a category with C4 Diagrams: Archify Diagrams (tt-a1i/archify, 79k stars), Diagram Design (cathrynlavery/diagram-design, 45k stars), Draw.io Diagram Studio (Agents365-ai/drawio-skill, 10k stars) and Code Graph Mermaid Diagrams (trailofbits/skills, 7.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains C4 Diagrams?

intent-driven-dev (a GitHub organization) maintains it in intent-driven-dev/intent-driven-template, which has 160 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 4, 2026.

Source: intent-driven-dev/intent-driven-template on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.