Decides whether a diagram is warranted over text/tables, then draws editorial figures or edits tldraw canvases with connector, accent, and budget rules.
Ships in kheskills. 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.
You own the picture from "can you diagram this?" to a figure someone can read, or a clear no. A diagram is the costliest way to say something.
A construction skill. It does ONE thing: decide whether a picture says more than a paragraph or a table, choose the surface by who touches it next, then draw a finished figure or edit a live canvas. It does not build a live chart inside a product (that's khe-ui, a component with loading, empty and error states), write general SVG markup or animate it (that's khe-svg), decide whether the figure moves (that's khe-ui), read the project's contract (that's khe-design-tokens), annotate a product shot (that's stageshow), or draw a blueprint line illustration for a page (that's plotter).
A figure ships only when it says what a paragraph or a table cannot, and then every box, line and color in it carries something the layout does not already show.
Five ways it fails:
The fix is deletion first. A figure is done when nothing can be removed. A reply that is one sentence and no figure is a correct result.
When this skill is invoked with no request, reply only with:
I'm ready to decide whether this needs a diagram, then draw the figure or edit the canvas. Usage:
/khe-diagram [what]
Then wait. Give nothing else until the user asks.
Draw it the way an editor draws the one figure a page is allowed. The files in examples/ are the bar: when yours is the more crowded, the flatter or the more tangled one beside the closest gold, that is the first fix. Then look at the render the way the most exacting reader would, the one who circles a single thing and sends it back: a label touching its stroke, two arrowheads sharing a point, a third blue box, a legend that explains a line style nobody used. When you can picture that circle, you have found the next fix. The hardest press is on step 1: the reviewer's first act is to write the paragraph your figure replaces, and a figure that loses to it does not ship.
Most of the quality is decided before any markup. Every step ends in an exit you check before the next one starts. Under khe-auto the same loop runs with this skill's gate.
examples/no-diagram.md and stop..design or DESIGN.md. Map the contract onto the nine color roles and the families (diagram-design-reconciliation). With no contract, the default skin is diagram-design's. Exit: nine roles and two families, each with its source.node scripts/diagram-check.mjs <figure> --gate and read every line. Fix the largest fault first, in this order: existence, budget, connectors, signal, type, polish. Run it again. Exit: the run ends diagram check passed, and every candidate line has a decision.FIGURE.md beside the figure from the template in verify, with the gate's last line pasted and what you did not check. Exit: the file exists and names its unresolved items.Passing the gate is necessary, not sufficient. The gate reads markup: it cannot tell whether the figure should exist, and it cannot read a live canvas.
Check these before handing over. Each names its gate line where one exists, and its rule.
sentence-figure:): diagram-decision, Picture, table, or sentence.accent-spread:): diagram-craft, Signal.label-on-line:): diagram-craft, connector rule 2.sharp-elbow:, diagonal:): diagram-craft, connector rule 1.shared-attach:): diagram-craft, connector rule 4.edge-over-node:): diagram-craft, connector rule 6.missing-legend:, floating-legend:): diagram-craft, Grid, type, legend.mono-label:): diagram-craft, Grid, type, legend.shipped-palette:): diagram-design-reconciliation, Gotcha.Open the closest one before step 5. Each is a complete file on the 4px grid in the worked contract's skin.
| Need | Example | What to learn |
|---|---|---|
| Services, stores and an external system | examples/architecture.svg | Four node treatments at one size; the accent on the queue and the one connector into it; one masked label; a legend strip |
| Steps with a branch | examples/flow.svg | Every turn an elbow rounded at r=8; each connector its own attach point; labels beside vertical runs |
| Order in time, a request and its reply | examples/sequence.svg | A reply as its own dashed line from the recipient; time runs down the page, so no step needs a number |
| A request that should not be a figure | examples/no-diagram.md | The verdict and its reason first; the table is the whole deliverable; what would make it a figure |
teaching/ holds 14 bad and good pairs, one fault each, indexed in teaching. Use them to diagnose a fault; the bad halves are never starting points.
Open a reference only when the job needs it. Never load the whole folder.
| Job or symptom | Open |
|---|---|
| "Can you diagram this?", picture or table or sentence, which surface, "it has too many boxes", when to split | diagram-decision |
| Drawing or reviewing a figure, "it looks like Mermaid", "it looks AI-made", connectors, labels on lines, accents, node treatments, the legend, an accessible figure | diagram-craft |
A diagram-design figure in a project with a .design, a DESIGN.md or a .diagram-design marker; whose paper, fonts, accent, small type or motion clock wins | diagram-design-reconciliation |
A board people keep editing, a .tldraw or .tldr file, "the arrows fall off when I drag", comments on a canvas, board scripts | tldraw-canvas |
| The last pass, what a gate line means, "what do I do about this fault", the canvas questions, the handover template | verify |
| Briefing a second reader, or reviewing a figure someone else drew | review |
"Which pair shows my bug?", what each teaching/ folder teaches | teaching |
Check the work against this table before finishing.
| Never | Instead |
|---|---|
| Three boxes in a row for one relationship | The sentence |
| 14 services in one figure | Two figures: an overview of five zones, then one path in detail at 8 nodes |
| A canvas screenshot in a doc | A redraw from the board's shapes and bindings |
| A diagonal connector | A right-angle elbow rounded at r=8 (r=6 in a tight layout) |
| A label sitting on its line | An opaque paper mask 6 to 10px clear of the stroke, 14 characters at most |
| Parallel routes sharing a stroke, or connectors meeting at one point on an edge | Routes offset by 12px or more; each connector its own attach point at L·k/(N+1), at least 12px apart |
| A two-headed arrow for a request and its reply | A solid request and a dashed 5,4 return that starts at the recipient |
| The accent on five nodes | The accent on one or two; everything else ink, muted or soft |
| A pill or a soft 16px card with a shadow | Nodes at radius 6, type tags at 2, borders and no shadow |
| A legend floating among the nodes | A horizontal strip under the figure, the viewBox widened by about 60px |
| Mono as a blanket "dev" font | Names in a sans at 600; mono only for ports, commands, URLs and field types |
A raw arrow placed by coordinates, or a text shape floating over a card | helpers.createArrowBetweenShapes, and the label in the card's richText |
| A figure handed over on a green gate alone | The render looked at, the checklist walked, the review answered, FIGURE.md written |
In this order:
FIGURE.md beside the figure.Leave out an export nobody asked for, the source's coordinates, colors and fonts on a redraw, and a description of the geometry in <desc>.
Short and editorial. Say "this is a sentence, not a diagram" and give the sentence. Ask "who edits this next?" when the request does not say, and treat an ambiguous instruction on a shared board as a question, never as permission to pick one.
Read both before producing anything. They outrank the defaults in this skill, and a project's .design contract or DESIGN.md outranks them.
khe-auto: it runs this skill's loop and names this skill's gate at each step.khe-svg: it owns the general markup rules behind an accessible figure and the SVGO pass after an export.khe-design-tokens: it reads the .design contract whose color roles and families become the figure's skin.khe-ui: whether a figure animates at all is its decision; this skill keeps the figure's own clock only once it does.khe-ui: its one-accent rule is the one this skill applies to nodes and to named canvas colors.plotter: when step 1 says yes but the picture shows how one thing is built (what aligns, fits or is missing) rather than how parts connect, it is a blueprint illustration, not a node-and-connector figure. Hand it to Plotter (catalogue): it keeps its own grammar, its 560 × 440 canvas and its own check.py, so this skill's budgets and gate do not apply to its drawings.Names without the khe- prefix are other people's skills, not part of this one: stageshow is Benji Taylor's (benjitaylor/skills); plotter is Pasquale Vitiello's (pasqualevitiello/plotter); animate, emil-design-eng and the rest are Emil Kowalski's (emilkowalski/skills). Install them from their own repos.
Harshit Khemani. MIT.
LICENSE (opens in a new tab)README.md (opens in a new tab)assets/flow.svg (opens in a new tab)examples/architecture.svg (opens in a new tab)examples/flow.svg (opens in a new tab)examples/no-diagram.md (opens in a new tab)examples/sequence.svg (opens in a new tab)references/diagram-craft.md (opens in a new tab)references/diagram-decision.md (opens in a new tab)references/diagram-design-reconciliation.md (opens in a new tab)references/gotchas.md (opens in a new tab)references/pov.md (opens in a new tab)references/review.md (opens in a new tab)references/teaching.md (opens in a new tab)references/tldraw-canvas.md (opens in a new tab)references/verify.md (opens in a new tab)scripts/diagram-check.mjs (opens in a new tab)teaching/accent-colors/bad.svg (opens in a new tab)teaching/accent-colors/good.svg (opens in a new tab)teaching/accent-spread/bad.svg (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/kheskills:khe-diagramfrom kheskills
npx claudepluginhub hktitan/skills --plugin kheskills14 skills in this plugin
/khe-autoThe mode that runs the rest. Reads a request, picks a playbook or the one or two skills that own it, says why in a line, then does the work in order. Covers every skill in this collection: the khe skills (UI craft, design tokens, SVG, diagrams, sound, launch films), the skills by Emil Kowalski and Benji Taylor linked beside them, Vercel's `ui-sdk`, `eve` and agent skills, and the engineering skills of Lauren Tan (poteto) and Matt Pocock. Use when a request names no skill, spans several, or someone says "auto", "which skill", "where do I start", "what order", "list the skills", "make this better", "I need a launch video", "build this screen", "build it with ui-sdk", "we ship Thursday", "the agent keeps doing this". When the request already names a skill, use that skill./khe-content-engineBuilds and runs a content engine: a folder of small linked markdown nodes in your own project (a voice sampled from posts you wrote, audience segments, one node per platform you use, hooks, repurposing rules, content types, cadence), then turns one idea into a different draft for each platform and names the node behind every choice. Also reviews drafts against the engine and tunes the node that caused a wrong line. It drafts; a person posts. Use when someone says "build me a content engine", "turn this into posts for X and LinkedIn", "repurpose this", "write in my voice", "make a thread out of this", "why doesn't this sound like me", or wants one idea written for several platforms. For a launch film use `khe-launch-film`, for a product demo `khe-demo`, for stickers `khe-sticker`, for faux product UI `stageshow` (Benji Taylor). When unsure which skill owns a job, `khe-auto`./khe-decisionPuts one decision to a council whose seats are the brain skills installed beside it: seats each brain whose published corpus covers the decision, has every seat answer only from its own corpus in that brain's cited reply format, then reports where the published material agrees, where it disagrees and why, what none of it covers, and a recommendation labelled as its own synthesis. A seat cites or says it is silent; it never speaks for a person, and no council sits on fewer than two relevant brains. Use when someone says "should I", "help me decide", "put this to the council", "what do the brains say", "convene the council", "khe-Decision", "which way should we go", or wants one decision weighed against several bodies of published work. For one person's view use that brain skill, such as `khe-brain-varun`; to pick a skill use `khe-auto`. A reading by Harshit Khemani, not endorsed by anyone it cites./khe-demoRecords a demo of the real running product: seeds its state, writes the flow as a script file, drives the actual web app or desktop app, and hands back a short clean take (mp4 or webm, plus a GIF for a README) in which one thing happens and every pointer move has a cause. Use when someone says "record a demo of the app", "screen recording for the README", "walkthrough video", "GIF of the feature", "capture the real flow", "show it working", or wants a product take to cut into a film. For a faux or illustrated UI that never runs the product use `stageshow`; for a cut, scored launch video use `khe-launch-film` (a take from here is often one shot inside it); for sound use `khe-sound`./khe-design-tokensFinds a project's design contract (a `.design` file or DESIGN.md), resolves which one wins, and threads its tokens through the UI as CSS variables, a Tailwind theme or component props. Also writes design-system docs an agent can follow and checks the contract for drift. Use when a repo has a `.design` or DESIGN.md, or someone says "use our tokens", "make it on-brand", "stop hardcoding colors", "the agent keeps inventing variants" or "document our design system". To design the scales themselves, review the result or finish a screen that still feels unfinished, use `khe-ui`./khe-eveBuilds, changes and verifies agents on Vercel's eve framework (npm `eve`) so they survive production: scaffolds with `npx eve@latest init`, reads the installed version and its bundled docs before writing, memoizes every read in `defineDynamic`, gates and keys every side effect in code, and proves a change with a real turn instead of a green build. Four jobs: `new`, `add`, `verify`, `ship`. Use when someone says "build an eve agent", "add a tool to my agent", "npx eve init", "my eve agent calls the API twice", "is this eve agent safe to deploy", "why does my defineDynamic run so often", or a repo has an `agent/` folder and `eve` in its package.json. For Vercel deploy mechanics use `deploy-to-vercel` (Vercel), for the chat interface `khe-ui` or `ui-sdk` (Vercel), for the API surface itself Vercel's own `eve` skill and the docs bundled with the package. When unsure, `khe-auto`.Other plugins' skills for the same job