c4-model-diagram

c4-model-diagram is a skill for Claude Code from sethdford/claude-skills. It costs 36 tokens per session (616 once invoked), scanned A, original, MIT.

A guide for creating C4 architecture diagrams, which show a software system at increasing levels of detail: its surroundings, major building blocks, internal parts, and code.

In plain words
What is it for?
It is for documenting users, external systems, applications, databases, services, components, and the data flowing between them.
Why use it?
It gives teams a consistent way to explain system structure to both technical and non-technical readers.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the communication plugin — 7 skills shipped together

Good fit It is for documenting users, external systems, applications, databases, services, components, and the data flowing between them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sethdford/claude-skills/c4-model-diagram
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sethdford/claude-skills --skill c4-model-diagram
Clone the repo
git clone --depth 1 https://github.com/sethdford/claude-skills

Made for: Claude Code.

Or install communication, the plugin that ships this one along with the rest of its 7 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for c4-model-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/sethdford/claude-skills/c4-model-diagram/github.svg)](https://agentmods.dev/skills/sethdford/claude-skills/c4-model-diagram)
Your own site
<a href="https://agentmods.dev/skills/sethdford/claude-skills/c4-model-diagram"><img src="https://agentmods.dev/badge/skills/sethdford/claude-skills/c4-model-diagram/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for c4-model-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/sethdford/claude-skills/c4-model-diagram"><img src="https://agentmods.dev/badge/skills/sethdford/claude-skills/c4-model-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 616 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00616
Opus 5 $0.00018 $0.00308
Sonnet 5 $0.00007 $0.00123
Haiku 4.5 $0.00004 $0.00062

Measured 11d ago against content hash f6f3eebeaa68, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

c4-model-diagram scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

architect/communication/skills/c4-model-diagram/SKILL.md · 47 lines

How it starts

The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.

C4 Model Diagram

Create C4 diagrams to communicate architecture at multiple abstraction levels.

Context

You are creating architecture diagrams. Use C4 model for consistent representation. Start at highest level (context), zoom in progressively (container, component, code). Read architecture decisions and system structure.

Domain Context

Based on Simon Brown's C4 model:

  • Context Diagram: System in environment. Shows external systems, users, data flows. Answers: "What is this system?"
  • Container Diagram: Major building blocks (web app, database, API, message queue). Answers: "What's inside the system?"
  • Component Diagram: Internal structure of container. Shows responsibilities, communication. Answers: "How is [container] organized?"
  • Code Diagram: Class diagram for specific component. Shows classes, methods, relationships. Answers: "What does [component] contain?"

Instructions

  1. Draw Context Diagram: Rectangle for your system. External systems (payment provider, email service). Actors (user, admin). Label data flows. Answers "What does this system do?"

  2. Draw Container Diagram: Inside system rectangle, show containers (web app, API, database, cache). Interfaces between containers. Technology choices (PostgreSQL, Redis). Answers "What technology?"

  3. Draw Component Diagram: Pick one container (API). Inside, show components (auth service, payment service, order service). Responsibilities, communication patterns.

  4. Draw Code Diagram: For complex component, show classes, methods. Use standard UML or pseudo-code. Limit to critical logic; don't over-document.

  5. Keep Diagrams Current: As architecture evolves, update diagrams. Outdated diagrams mislead teams. Use tools (draw.io, Structurizr, Miro) that allow collaboration and versioning.

Anti-Patterns

  • One Massive Diagram: Try to show everything in one diagram. Result: unreadable, overwhelming. Guard: Use C4 levels; zoom progressively.
  • Diagrams Without Legend: Assume readers know what symbols mean. Result: confusion. Guard: Label technologies, responsibilities, data flows clearly.
  • Outdated Diagrams: Never update as system evolves. Result: teams follow wrong architecture. Guard: Update during architecture reviews; treat as living document.
  • Too Much Detail Too Early: Start with code diagram. Result: lost in details before understanding system shape. Guard: Start at context; zoom in gradually; leave code diagram optional.

Read the full file on GitHub · 47 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 47 lines · 36 tokens per session scan A f6f3eebeaa68

Subscribe to this mod's changes

c4-model-diagram is a skill published in the GitHub repository sethdford/claude-skills (40 stars, last pushed 6mo ago), licensed MIT. It adds 36 tokens to every session and 616 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.