/codechroma:codechroma-draw-diagramfrom codechroma
Creates, updates, and regenerates Code Atlas diagrams for system context, design patterns, change impact, walkthroughs, feature plans, and custom types. Routes user requests to the correct diagram type and writes JSON for live canvas rendering.
Ships in codechroma. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Every diagram type here writes one JSON file that the Code Atlas canvas watches and re-renders
live — you never call a render API and the user never reloads. Ask the bridge for the write path;
never guess it from your working directory. Write the diagram fresh from what you find now — do
not fetch or read whatever is currently on disk/canvas first.
If the self-check prints SPLIT (over ~15 nodes), warn the user and propose splitting into several
linked diagrams before finishing — see references/drawing-rules.md "Splitting a crowded diagram".
Never report success on a run that didn't print OK from the self-check.
Use the user's own name for the diagram. Never substitute a different type because it feels close.
sequence is only for an explicit sequence diagram (or "in what order do these calls happen").
"Data flow", "dataflow", "DFD", "lineage", "pipeline", "how data moves", "where data goes", "ownership",
"layers", "dependencies" or any other named kind is not sequence, even though the word "flow"
appears in it. If the name matches no row below, that is the Fallback case, not a reason to pick
the nearest row. Before finishing, state in one line which type you drew and why; if it is not the
type the user named, you picked wrongly — start over.
| type id | write to | draw this when the request is about… | read this reference | self-check |
|---|---|---|---|---|
system-context | .codechroma/diagrams/system-context/system-context.json (GET /repos/{id}/system-context-path) | the system context: the whole system as one box plus the people and external systems around it, no internal breakdown; detected from the code and confirmed like patterns — "draw the system context", "who uses this and what does it integrate with", "add Stripe to the system context", "the system context is missing our auth provider", "regenerate the System context diagram" | references/type-system-context.md | check_diagram.py --kind system-context |
patterns | .codechroma/diagrams/patterns/patterns.json (GET /repos/{id}/patterns-path) | the real GoF/architectural pattern instances in this repo (Strategy, Facade, Adapter, Registry, Repository, Singleton, Observer) plus the infra/external boxes that connect them — "regenerate the patterns diagram", "confirm the detected patterns", "the patterns view only shows a few blocks", "add the missing connections between patterns" | references/type-patterns.md | check_diagram.py --kind patterns |
impact | .codechroma/diagrams/impact/impact.json (GET /repos/{id}/impact-path) | only the slice a change or plan touches — a git diff or a feature's spec files — plus the one-hop neighbours worth a box, background collapsed: "show me what this PR affects", "regenerate the impact diagram", "the impact view should also show the callers of X", "explain what each block does" | references/type-impact.md | check_diagram.py --kind impact --source=diff (or --source=plan --feature=<dir>) |
sequence | .codechroma/diagrams/sequence/sequence.json (GET /repos/{id}/sequence-path) | the ordered calls between systems/classes in one flow, left-to-right participants top-to-bottom messages — "draw a sequence diagram of checkout", "what order do these get called in", "show the messages between these services over time", "draw the recorded trace as a sequence" | references/type-sequence.md | check_diagram.py --kind sequence |
walkthrough | .codechroma/diagrams/walkthrough/walkthrough.json (GET /repos/{id}/walkthrough-path) | one process, step by step, over the real code it touches — numbered steps, the files/functions each runs in, the AI step, the failure branch; the canvas lights the route on the code map — "walk me through how X works", "draw the walkthrough of Y", "show how a request is handled and which files it touches", "the walkthrough is missing the retry step" | references/type-walkthrough.md | check_diagram.py --kind walkthrough |
dataflow | .codechroma/diagrams/custom/dataflow/dataflow.json (GET /repos/{id}/custom/dataflow-path) | what data moves between sources, processes and stores — "data flow", "DFD", "lineage", "where does the data go", "how data moves" | references/type-dataflow.md | check_diagram.py --kind custom --type dataflow |
custom | .codechroma/diagrams/custom/<type-id>/<type-id>.json (GET /repos/{id}/custom/<type-id>-path) | a saved, user-authored diagram type whose rules live in its own definition, not in this skill — "generate the data-flow diagram", "regenerate the ownership map", "deepen the layering diagram", or any run that was handed a type_id | references/type-custom.md | check_diagram.py --kind custom --type <type-id> |
Pick exactly one row. Read that row's reference file in full before you write anything. Do not carry a rule from one row into another — the schemas are different shapes on purpose.
If the message that started this run already names a
references/type-*.mdfile, that file wins over this table.
| Confusion | Pick this one |
|---|---|
| System context vs Patterns | system-context draws the system, its people and external systems; patterns draws the GoF/architectural instances that exist inside it. "Who uses this and what does it talk to?" → System context. "Which patterns does it use?" → patterns. |
| System context vs Impact | system-context draws the whole environment; impact draws only the slice this change or plan touches. Any mention of a PR, a diff, "what this affects", or a feature's spec directory → impact. |
| C1/Impact vs Sequence | C1/impact/patterns box up which systems exist and touch each other; sequence draws how one flow unfolds in time. "What depends on what" → impact/patterns; "in what order do the calls happen / how is this handled" → sequence. Pick it only when the user says sequence, or asks for strict call order over time ("first X then Y", a recorded trace). "Flow", "request path" or "how X works" alone do not mean sequence. |
| Walkthrough vs Sequence | walkthrough answers "how does this process run and which code does each step touch" (steps, files, one route); sequence answers "in what order do these participants message each other" (lifelines, return arrows). "Walk me through", "step by step", "which files does it touch" → walkthrough. "Sequence diagram", "the call order between services" → sequence. |
| Data flow vs Sequence | A data-flow diagram (dataflow, DFD, lineage, "where does the data go", pipelines) shows what data moves between which stores and processes — arrows are data, not calls, and there is no time axis. It is never sequence. Use the dataflow row. |
| Custom vs everything | Pick custom when the request names a saved type, or a type_id was passed. When unsure, GET /diagram-types and see whether one matches; a saved type always wins over a built-in. |
| Decision diagram | Asking the user to choose between options and you want a picture per option (abstract components, flows, a part that does not exist yet) → not a row here: use the codechroma-decision-diagram skill (draw_option_diagram). It never writes the files above. |
| Nothing above fits — no matching row, no matching saved custom type, a genuine one-off request | Don't improvise from here. Jump straight to Fallback below. |
The request is to explain, show, or trace a process on a diagram already on the canvas
("show me how a request gets saved to the database"), not to draw or regenerate one. This is not
one of the five type id rows above — it edits boxes already on the canvas instead of writing a
new .codechroma/diagrams/<kind>/<kind>.json. Read references/highlight-process.md.
The request describes a future feature — the user's own words, or an arbitrary .md document
(a spec, a design doc, not necessarily docs/planning/) — and asks for a diagram of it: "draw a plan
for token auth", "show me what the checkout redesign will add", "add the planned rate limiter to this
diagram". This is not one of the five type id rows above either: you are authoring Planned
blocks (boxes for code that doesn't exist yet) into a diagram file dedicated to this one feature,
not into system-context/patterns/impact/custom. Read references/feature-plan-mode.md.
None of the above → read references/drawing-rules.md and follow its "Drawing a type this skill
does not know" section.
references/drawing-rules.md holds what every type obeys: the bridge contract (base URL, workspace
id, path resolution, fallback order), path honesty, the density budgets, the anti-pattern list, the
per-box and per-arrow style rule, the icon vocabulary, arrow-label style, and the self-check exit
tiers. Read it alongside your chosen type-*.md, not instead of it. Every diagram that draws
relations also carries top-level question + summary and 1-2 hero relations (the 5-second read).
Every diagram carries a top-level title naming what it shows for this request, distinct from the
titles already on the canvas (drawing-rules.md "Naming the diagram (title)").
Every arrow carries a kind (calls default, spawns, data, minor): use spawns for starting a process/CLI/agent and data for reading/writing a file/DB/store whenever true (drawing-rules.md "Edge kinds").
references/bare-any.md (opens in a new tab)references/bare-impact.md (opens in a new tab)references/bare-patterns.md (opens in a new tab)references/bare-sequence.md (opens in a new tab)references/bare-system-context.md (opens in a new tab)references/drawing-rules.md (opens in a new tab)references/feature-plan-mode.md (opens in a new tab)references/highlight-process.md (opens in a new tab)references/process-bare.md (opens in a new tab)references/type-custom.md (opens in a new tab)references/type-dataflow.md (opens in a new tab)references/type-impact.md (opens in a new tab)references/type-patterns.md (opens in a new tab)references/type-sequence.md (opens in a new tab)references/type-system-context.md (opens in a new tab)references/type-walkthrough.md (opens in a new tab)scripts/check_diagram.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/codechroma-decision-diagramDraw a small abstract decision diagram per option for a question you are about to ask the user in their CodeChroma agent window -- components, data flow, ownership or trade-offs of an option that may not exist in the code yet. Use before calling `ask_user` with `kind: "diagram"` for any question that changes structure (boundaries, data flow, ownership, a new component), and when a `[CodeChroma request` message says the user asked for diagrams. You draw through the `draw_option_diagram` MCP tool of the `codechroma` server./codechroma-epic-briefGenerate a structured AI brief for one epic -- problem/value, scope (with tasks attached to the scope item they implement), dependencies & risks, acceptance criteria. Use when the user (typically running you in the canvas terminal panel) asks you to generate, regenerate, or refresh an epic's "AI brief" -- e.g. "generate the AI brief for LMP-65", "regenerate the brief", "the epic brief is stale"./codechroma-grillAsk the user decisions in their CodeChroma agent window instead of in chat text. Use whenever the user must choose, decide or pick which approach to take, or asks you to "grill me", interview them, or walk through design decisions one question at a time -- you ask through the `ask_user` MCP tool of the `codechroma` server, then end your turn.Generated from the plugin's indexed repository (gutzerk/code_chroma) — no native marketplace selected
npx claudepluginhub p/gutzerk-codechromaOther plugins' skills for the same job