c4-model

c4-model is a skill for Claude Code from ulises-jeremias/agent-toolkit. It costs 56 tokens per session (650 once invoked), scanned A, original, MIT.

Guidance for using the C4 model, a way to describe software architecture at four levels: the overall system, its major applications and data stores, its modules, and its code. It explains what belongs in each view and how to represent the diagrams with Mermaid.

In plain words
What is it for?
Use it to create context, container, component, or code views of a system, usually as Mermaid diagrams, when documenting architecture or making design decisions.
Why use it?
It removes uncertainty about how much detail an architecture diagram should contain and keeps diagrams focused on the right audience and level. It also separates the method for planning diagrams from the tool that draws them.

Skill for Claude Code

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

Part of the agent-toolkit-complete plugin — 118 skills, 6 agents shipped together

Good fit Use it to create context, container, component, or code views of a system, usually as Mermaid diagrams, when documenting architecture or making design decisions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ulises-jeremias/agent-toolkit/c4-model
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 ulises-jeremias/agent-toolkit --skill c4-model
Clone the repo
git clone --depth 1 https://github.com/ulises-jeremias/agent-toolkit

Made for: Claude Code.

Or install agent-toolkit-complete, the plugin that ships this one along with the rest of its 118 skills, 6 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/ulises-jeremias/agent-toolkit/c4-model/github.svg)](https://agentmods.dev/skills/ulises-jeremias/agent-toolkit/c4-model)
Your own site
<a href="https://agentmods.dev/skills/ulises-jeremias/agent-toolkit/c4-model"><img src="https://agentmods.dev/badge/skills/ulises-jeremias/agent-toolkit/c4-model/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ulises-jeremias/agent-toolkit/c4-model"><img src="https://agentmods.dev/badge/skills/ulises-jeremias/agent-toolkit/c4-model.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 650 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00056 $0.00650
Opus 5.5 $0.00022 $0.00260
Sonnet 5.5 $0.00011 $0.00130
Haiku 4.5 $0.00006 $0.00065

Measured 3mo ago against content hash 65b2d4c2f03c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

c4-model 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 3mo 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.

plugins/agent-toolkit-complete/.github/skills/c4-model/SKILL.md · 50 lines

What it actually says

C4 Model — Methodology Overlay (WHAT → HOW via Mermaid)

Sources (2026-08-12): Simon Brown C4 https://c4model.com/ (Context, Container, Component, Code); Structurizr DSL https://github.com/structurizr/dsl (open-source DSL, paid cloud) + structurizr-mcp https://github.com/cubical6/structurizr-mcp + go-structurizr; C4-PlantUML https://github.com/plantuml-stdlib/C4-PlantUML; overarch https://github.com/soulspace-org/overarch (PlantUML/Structurizr generation); rendering via Mermaid mermaid-js/mermaid MIT per §44.

Pack: architecture core (architect + ADR + TRD + threat-model + mermaid (+ C4 via mermaid)) — c4-model teaches what to draw; mermaid renders it. See docs/architecture/research-385-diagram.md for C4 vs Mermaid vs PlantUML/Structurizr decision (Excalidraw/draw.io REJECT).

When to use

  • Need system Context / Container / Component / Code views.

Instructions

  1. Select level: Context (system + actors) → Container (apps/data stores) → Component (modules) → Code (classes, optional).
  2. Render via Mermaid (C4-inspired): flowchart TD with subgraph for boundaries, e.g.:
    flowchart TD
      user([User]) --> web[Web Container]
      web --> api[API Container]
      api --> db[(Database Container)]
      subgraph System Context
        user; web; api; db
      end
    
  3. Advanced (optional): For consistency checks across views, use Structurizr DSL (structurizr-cli + workspace.dsl → PlantUML/Mermaid) or C4-PlantUML (@startuml + !include C4_Context.puml); note structurizr CLI requires DSL file and is heavier.

Collaboration

  • architect defines system → c4-model selects C4 level → mermaid renders → ADR records decision.

Anti-patterns

  • Do not mandate Structurizr DSL for every diagram — Mermaid suffices for most.
  • Do not dump PlantUML infra as separate skill — keep as optional note.
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. 3mo ago First seen · 50 lines · 56 tokens per session scan A 65b2d4c2f03c

Subscribe to this mod's changes

c4-model is a skill published in the GitHub repository ulises-jeremias/agent-toolkit (28 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 650 once invoked, about $0.0002 per session on Opus 5.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.

Related

c4-model compared with skills from other repositories

c4-model next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
c4-modelulises-jeremias/agent-toolkitSkill28yesterdayMITA56Claude Code
verifyyha9806/academic-writing-toolkitSkill573d agoMITA26Claude Code
vibeflow-quickpe-menezes/vibeflowSkill348d agoMITA63Claude Code, Codex
publish-websiteoborseth/Porkbun-MCPSkill37yesterdayMITA65Claude Code
evaluate-dependencypaultyng/skill-issueSkill8todayMITA149Claude Code, Codex
create-rulepaultyng/skill-issueSkill8todayMITA48Claude Code, Codex
initialize-taskplannersmekai/taskplannerSkill26yesterdayMITA53Claude Code, Codex