draw-c4

draw-c4 is a skill for Claude Code from ShibaInu0817/draw-c4-skill. It costs 180 tokens per session (3,085 once invoked), scanned A, original, MIT.

A tool that turns a codebase into an interactive C4-style architecture diagram. C4 is a way to show software structure at several levels, from the whole system down to its parts.

In plain words
What is it for?
Use it to document architecture in a self-contained HTML file with drill-down views, pan and zoom, an inspector and step-through runtime flows.
Why use it?
It helps people understand how code components fit together and follow how the system operates at runtime.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT variable. Also seen: reads .claude/ paths.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the draw-c4 plugin — 1 skill shipped together

Good fit Use it to document architecture in a self-contained HTML file with drill-down views, pan and zoom, an inspector and step-through runtime flows.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ShibaInu0817/draw-c4-skill
Claude Code
/plugin install draw-c4

Made for: Claude Code.

Or install draw-c4, the plugin that ships this one along with the rest of its 1 skill.

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 draw-c4

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/shibainu0817/draw-c4-skill/draw-c4"><img src="https://agentmods.dev/badge/skills/shibainu0817/draw-c4-skill/draw-c4.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 180 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,085 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.00180 $0.03085
Opus 5 $0.00090 $0.01543
Sonnet 5 $0.00036 $0.00617
Haiku 4.5 $0.00018 $0.00309

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

Security

Grade A, and why

draw-c4 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 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/plot.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/draw-c4/SKILL.md · 243 lines

How it starts

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

draw-c4 — interactive C4 architecture diagrams

Turns a codebase into an explorable diagram: a single HTML file with no build step and no dependencies, holding up to four levels of detail and a set of animated runtime flows.

Find the skill directory first

Do this once, before any other step. This skill's files sit wherever it was installed, which is never the user's working directory. Resolve that location and use absolute paths from then on — bare relative paths like scripts/plot.py will not resolve:

SKILL="$(dirname "$(dirname "$(find "${CLAUDE_PLUGIN_ROOT:-/nonexistent}" \
  ~/.claude/skills ~/.agents/skills "$PWD/.claude/skills" \
  -name plot.py -path '*draw-c4*' 2>/dev/null | head -1)")")"

That covers every install route — plugin, npx skills, and a hand-copied skill folder at user or project level. Sanity-check it resolved:

ls "$SKILL/scripts/plot.py" "$SKILL/assets/plot-template.html"

Every command below writes "$SKILL" for that directory. Keep the quotes; the path can contain spaces. Read the bundled reference files by absolute path too — $SKILL/references/model-schema.md, $SKILL/assets/example-model.json.

The model file and the output HTML are the user's, so those stay wherever the user wants them, normally the repo being diagrammed. Never write into $SKILL.

Read $SKILL/references/model-schema.md for every field. Read $SKILL/assets/example-model.json before writing a model — it is a complete, hand-tuned example and imitating its level of specificity is most of the job.

How the pieces fit

The output file is two things welded together:

  • The renderer$SKILL/assets/plot-template.html, about 700 lines of HTML, CSS and JS. It is fixed. It handles layout transforms, hit testing, the inspector, the flow player, keyboard shortcuts. Never edit it and never write it out by hand.
  • The model — one JSON object describing the system: levels, nodes, edges, flows. This is the only thing that varies between diagrams, and it is the only thing to write.

Read the full file on GitHub · 243 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 243 lines · 180 tokens per session scan A b5dd177ffac2

Subscribe to this mod's changes

draw-c4 is a skill published in the GitHub repository ShibaInu0817/draw-c4-skill (2 stars, last pushed 7d ago), licensed MIT. It adds 180 tokens to every session and 3,085 once invoked, about $0.0009 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-31.

Related

Other skills, from other repositories

design-expert

Expert-level system design, architecture patterns, scalability, and distributed systems. Use when the user mentions system design, architecture, scalability, distributed systems, or patterns, or when the task involves Architecture Patterns or Design Principles.

personamanagmentlayer/pcl · 47 tokens

cognitive-interface-audit

Comprehensive cognitive interface audit with two modes and a single tier. Planning mode designs task models, user expertise mapping, and error tolerance strategy. Audit mode evaluates mental model alignment (Norman's Gulfs), consistency (Gestalt), error tolerance (Wood 7-layer defense), cognitive load (NASA-TLX…

karsten-s-nielsen/mad-scientist-skills · 230 tokens

c4

Creates interactive C4 model architecture diagrams using Structurizr DSL — the official C4 notation by Simon Brown. Produces self-contained single-file HTML visualizations with embedded SVGs rendered locally via Java 21+ and the Structurizr export pipeline (structurizr.war + plantuml.jar). Generates System Context…

karsten-s-nielsen/mad-scientist-skills · 171 tokens

oci-drawio-icon-native

Build and validate OCI draw.io diagrams in icon-native mode so they never depend on mxgraph.oci. runtime libraries. Use when authoring or fixing Oracle Cloud architecture diagrams in draw.io that must render portably.

frankxai/claude-skills-library · 52 tokens

archinsight

Create, edit, import, analyze, repair, validate, inspect, and render Archinsight Insight architecture-as-code models and custom views. Use when working with .ai models or .aiq queries, migrating architecture from another DSL or diagram, C4-style architecture models, system/container/component/code diagrams, deployment…

lonely-lockley/archinsight · 84 tokens

claude-c-suite-cdo

Use for product design reviews, UI and UX consistency, design systems, component reuse, and accessibility questions.

JFK/claude-c-suite-plugin · 28 tokens