sketch
Skill4 starsChanged 33 days agoApache-2.0View on GitHub
Mint a diagram via the control plane's `create_sketch` MCP tool, returning a `/sketches/<ref>` URL the user can open. Use for quick visuals ("draw me X", "show how Y works", "diagram of Z") — flow charts (boxes + arrows) AND data charts (stacked bar, donut/ring, KPI tiles, etc.). The chart vocabulary is retrieved on demand from `semantic_search` (kinds: ['sketch_vocab']), not memorized. Push back if the request needs a real diagram editor (sequence/UML, swimlanes) or an interactive/spreadsheet artifact, or if the answer is words. Invoke as `/sketch <one-line intent>`.
28 other projects use a version of this.
Adopted by
Most recently taken up by
- emingo/claude-skillstheir own version, first seen Nov 16, 2026
- fullerzz/agent-skillstheir own version, first seen Nov 8, 2026
- jskswamy/skillstheir own version, first seen Nov 8, 2026
- hemal08ce094/DesignSkillsSwiftUItheir own version, first seen Nov 8, 2026
- ashleysbrain/skillstheir own version, first seen Nov 8, 2026
- lulufoo/lulu-boardtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use touchdesigner-mcp, ant and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
john-data-chenSkilltouchdesigner-mcp
Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.
Also in 7 projects that use this
bergsideSkillant
Structured, enterprise-focused design system emphasizing clarity, consistency, and efficiency for data-dense web applications.
Also in 3 projects that use this
bergsideSkillartistic
High-contrast, expressive style with creative typography and bold color choices for visually striking interfaces.
Also in 3 projects that use this
- +9 more from bergside
Other versions28 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 28
- bergside/awesome-design-skills★ 2.9ksame name
- glebis/claude-skills★ 414same name
- buildomator/buildomator★ 102same name
- delorenj/skills★ 17same name
- G1Joshi/Agent-Skills★ 15same name
- lulufoo/lulu-board★ 8same name
- lulufoo/lulu-drawer★ 8same name
- Samin12/skills★ 8same name
- nauvalazhar/skills★ 4same name
- jskswamy/skills★ 3same name
18 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- figure-studySkill
- find-unused-locale-keysSkill
- head-studySkill
- hillclimbSkill
- historic-cultureSkill
- skull-studySkill
- sync-localesSkill
- view-svgSkill
- write-catalystSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 11 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
The answer is a paragraph: If the structure isn't visual ("how does auth work" can be 4 boxes.
- Distinctive: line 40
When pushing back, name the specific failure and suggest the right alternative (Mermaid, markdown table, prose).
- Very specific: line 48
Read the top 1–3 with get_sketch_vocab({ id }) (call it with no id to list the catalog).
- Distinctive: line 57
Before drafting any coordinates, on a scratch list:
- Distinctive: line 77
If after decomposition you have 1-2 stations, push back — the user didn't need a sketch.
- Distinctive: line 81
Don't invent layouts. Pick the closest match and adapt.
- Distinctive: line 132
If none of these fit, sketch is probably the wrong tool — see Step 1 §4.
- Distinctive: line 144
Prefer the side with the most empty viewBox space.
- Very specific: line 146
If the straight line is clear, omit via.
- Very specific: line 150
When the default S-curve looks awkward — typically because the two stations are close together and the curve flattens into something …
- Very specific: line 199
Before you call create_sketch, walk through:
- Very specific: line 202
Layout sanity: No two stations overlap. Everything is inside the viewBox (x + w ≤ viewBox.width, etc.).
- Very specific: line 203
Edge clarity: No edge crosses through a station that isn't its endpoint without a via route around it.
- Distinctive: line 205
Label voice consistency: All edge labels are lowercase verbs.
- Distinctive: line 210
Call the MCP tool with:
- Very specific: line 221
If the call errors with Invalid manifest:\n - ..., the validator caught something — read the error, fix the manifest, call again.
- Distinctive: line 231
If you want to iterate (the user says "make X bigger" or "move Y to the left"), re-mint with a new ref.
- Distinctive: line 235
Static is a feature: No animation, no interactivity, no click handlers.
- Very specific: line 238
Resist embellishment: Don't add note-shaped annotation stations to explain the diagram — the diagram should explain itself.
“Common” is measured: kept by at least 6 in 10 of the 27 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/sketch
Turn a user's "show me this visually" request into a create_sketch MCP call against the mojulo control plane and hand back the URL. The renderer is hand-positioned SVG. Two vocabularies share one manifest:
- Flow —
stations[](typed boxes) +edges[](labeled arrows). For workflows, data flows, decision chains, architectures. - Charts —
marks[](low-level primitives: rect, circle, wedge, line, polyline, text) that compose into stacked bars, donuts/rings, KPI tiles, etc. The chart layout vocabulary is retrieved on demand fromsemantic_search(kinds:['sketch_vocab']), then read in full viaget_sketch_vocab— it is not memorized here, so you read intent first and pull only the paradigm that fits. See Step 1.5.
Both can coexist in one manifest (a flow on one side of a grid, a chart on the other). Your job is to map intent onto the right vocabulary, position things so the result reads at a glance, and — for charts — follow the retrieved card's layout math so it looks composed, not freehanded.
The control plane must be running at http://localhost:3001 (or wherever the user has it) and the mojulo MCP must be connected. If create_sketch isn't in tools/list, stop and tell the user to start the control plane.
Read these first
- control/lib/mcp/tools/sketches.js — the tool's schema (
create_sketch+get_sketch_vocab). The listing is routing only; the manual lives in the sketch_vocab cardsmark-primitives(station kinds, the 2D marks, style fields),construction-marks(round / solid / shaded shapes),edge-notation(via/curvaturerouting, typed heads),grid-layoutandz-layering. Don't drift from them. - control/lib/graph/sketch-manifest.js — the validator +
expandGridLayout. Your manifest must pass validation; if you violate it the call errors with field-specific feedback. - control/components/graph/CreationMap.jsx — the renderer. Read
STATION_STYLESfor station looks;edgePathforviarouting;MarkNode+wedgePathfor how the chart primitives render. - control/lib/graph/sketch-vocab/ — the chart vocabulary cards (the source of truth for chart layout). You normally reach these via
semantic_search+get_sketch_vocab, not by reading the dir — but the files are here if you want the full catalog. - control/lib/graph/creation-map.js — the curated reference sketch. Study its positioning, lane structure, label voice. Flow output should feel of-a-piece with this one.
The plan that established this surface: SKETCHBOOK_PLAN.md.
Step 1 — Posture-check (push back before drafting)
A sketch is the wrong tool in these cases:
- The user wants a table. Tables aren't diagrams — they're tables. Render them as markdown.
- The user wants a sequence diagram with timing/swimlanes. The 4-kind palette has no actor lane, no temporal ordering primitive. Suggest Mermaid in a markdown response instead.
- The user wants something interactive (clickable nodes, expandable groups, live data overlays). Sketches are static SVG.
- The topology is too dense to hand-position. Flow: > ~12 stations or > ~20 edges. Chart: more series/segments than read clearly (a donut past ~6 slices, a stacked bar past ~6 series). The renderer doesn't auto-layout; past those densities the result is unreadable on a single screen.
- The answer is a paragraph. If the structure isn't visual ("how does auth work" can be 4 boxes; "why did this design win" cannot), write the paragraph.
- The user wants a permanent reference doc. Sketches are scratch. If they need the diagram to live somewhere durable, point them at writing a curated manifest under
control/lib/graph/sketches/(future, see plan §10 Phase 3).
Charts (bar / donut / KPI tile / etc.) are now in scope — they were not in v1. A table is still not a chart; a request for tabular data is still §1.
When pushing back, name the specific failure and suggest the right alternative (Mermaid, markdown table, prose). Don't try to bend a sketch into shapes it doesn't fit.
Step 1.5 — Chart or flow? (retrieve the chart vocabulary first)
Decide what the user is really asking to see:
- A quantity, comparison, proportion, KPI, trend, or overlap → it's a data chart. Build it from
marks[], and you MUST retrieve the layout first:semantic_search({ query: "<the user's intent, phrased naturally>", kinds: ["sketch_vocab"], limit: 4 })— returns ranked card refs.- Read the top 1–3 with
get_sketch_vocab({ id })(call it with noidto list the catalog). - Compose your marks from the card's layout math — don't freehand a paradigm you didn't retrieve. Pull
grid-layoutandz-layeringtoo when you're laying out a multi-panel board.
- A flow / structure (steps, components, who-calls-what) → it's the station/edge vocabulary. Skip to Step 2.
- A board (KPI row + a chart + maybe a flow) → retrieve
grid-layout+ the relevant chart cards, lay thegrid, then place stations and chart marks into cells / absolute coords per the cards.
The point of retrieval: the cards carry the discipline that makes a chart look composed. Reading intent and pulling the matching card beats guessing pixel math. For a pure flow, there's nothing to retrieve — continue below.
Step 2 — Decompose the intent (flow vocabulary)
Before drafting any coordinates, on a scratch list:
- List the entities the diagram shows (3-10 typical).
Map each to a station kind using this rubric:
Concept Kind Notes A user, an operator, an agent, an external system inputDashed neutral — anything that enters the system from outside A parameter or precondition inputSame kind; just label it descriptively An MCP tool, an API endpoint, a function, a black-box process mcp_toolAccent border — the actor side of the flow A file, a message, a payload, a queue item, anything in motion filesystemSlate fill — data passing through A DB row, a durable record, persistent state, a config blob db_rowPurple — things that stay Common miscategorizations:
- A queue is
filesystem(messages in motion), notdb_row(even if backed by SQLite). - A user-facing UI surface is
inputif it's where the user enters the system;filesystemif it's an artifact rendered for them. - An MCP server is
mcp_tool(a callable); the tools it exposes are alsomcp_tool— unless you mean specifically the registry row, in which casedb_row.
- A queue is
- List the directed edges (A → B) and pick a verb per edge: typically one of
creates,writes,reads,triggers,inserts,returns,calls,references,links,shown to,hands off. Use lowercase action verbs. If you can't pick a verb, the edge probably doesn't belong.
If after decomposition you have 1-2 stations, push back — the user didn't need a sketch.
Step 3 — Pick a layout pattern
Don't invent layouts. Pick the closest match and adapt. Coordinates are in pixels inside the viewBox.
A) Left-right pipeline (3-5 stations, single lane)
Best for: a linear flow, no branching.
viewBox: { width: 960, height: 200 }
station w=200, h=110, y=45, x = 24, 250, 476, 702, 736-end5 stations evenly: x = 24, 200, 376, 552, 728. 4 stations: 24, 250, 476, 702. 3 stations: 24, 350, 676.
B) Two-lane vertical (creation-map shape)
Best for: parallel branches, paired input/output, "left side does X, right side does Y". This is what the canonical /graph uses.
viewBox: { width: 960, height: 480 }
left lane: x=24, w=400
right lane: x=456, w=400 (or 380 if you need a `via: 'right'` channel)
row 1 y=24, h=110
row 2 y=180, h=110
row 3 y=320, h=80 (optional)
row 4 y=420, h=80 (optional)Edges that skip a row in the same lane need via: 'right' so they route around interior stations.
C) Hub-and-spoke (one central, 3-6 satellites)
Best for: "this tool does N things". Central station in the middle, satellites around it.
viewBox: { width: 800, height: 480 }
hub: x=300, y=190, w=200, h=100
satellite N: x=300, y=24, w=200, h=80 (top)
satellite E: x=556, y=190, w=220, h=100 (right)
satellite S: x=300, y=380, w=200, h=80 (bottom)
satellite W: x=24, y=190, w=220, h=100 (left)D) Top-down stack (3-4 layers)
Best for: a layered architecture (UI → API → DB), or a decision flowing through stages.
viewBox: { width: 600, height: 600 }
layer y=24, 160, 296, 432 (each ~h=110), w=552 spanning, x=24If none of these fit, sketch is probably the wrong tool — see Step 1 §4.
Step 4 — Pick via on edges that would otherwise pierce a station
The default S-curve doesn't know about other stations. If the straight line between from and to passes through any non-endpoint station's rect, the curve will slice right through it — that's the failure mode you're routing around.
Set via to one of 'right' | 'left' | 'top' | 'bottom'. The edge will exit the source on that side, run along a channel just outside both stations' extents on that side, and re-enter the target from the same side.
Rule for picking the side:
- Eyeball the edge — does it run mostly vertical or mostly horizontal? Vertical lanes use
right/left; horizontal lanes usetop/bottom. - Pick the side opposite to whatever's in the way. If the obstacle is to the left of the source/target column, route
right. If it's above the row, routebottom. - Prefer the side with the most empty viewBox space. The channel sits 24px outside the further station's edge; it'll be clipped if there isn't room.
If the straight line is clear, omit via. The default S-curve handles diagonal hops cleanly.
Tuning the default curve with curvature
When the default S-curve looks awkward — typically because the two stations are close together and the curve flattens into something near-straight that grazes a third station — set curvature (number, 0.2–3, default 1):
> 1swoops the arc wider. Use when an edge needs a little extra clearance from a station nearby but a fullviachannel would be overkill.< 1pulls the arc closer to a straight line. Use for short hops where the default S looks like a wiggle.
curvature is ignored when via is set (channels are L-shapes, not curves). Don't reach for it when you really need via — they solve different problems.
Step 5 — Write the manifest
Build the manifest object in your head (or on a scratch line), then call the tool. Required shape:
{
title: "<short title — shown in page header>",
viewBox: { width: <number>, height: <number> },
stations: [
{
id: "<unique kebab-case id>",
kind: "input" | "mcp_tool" | "filesystem" | "db_row",
label: "<headline>",
sublabel: "<one short clarifier>", // optional
items: ["<bullet>", "<bullet>"], // optional; 1-3 bullets max
x: <number>, y: <number>,
w: <number>, h: <number>,
},
// ...
],
edges: [
{ from: "<src-id>", to: "<dst-id>", label: "<verb>", via: "right", curvature: 1 }, // via + curvature both optional
// ...
],
}For charts, add marks: [ ... ] (and optionally a top-level grid + per-node z) using the exact shapes from the sketch_vocab card you retrieved in Step 1.5 — the card's example fragments ARE the shapes. stations/edges are optional when the manifest is marks-only; marks is optional when it's a pure flow. At least one of the two must be non-empty. Don't hand-write chart marks from memory — copy the card's layout math.
Label voice:
- Station
label: noun phrase, sentence case ("User", "Create sketch", "sketches table", "Operator inputs"). Avoid all-caps. Avoid trailing punctuation. - Station
sublabel: one short clarifying line ("MCP tool", "DB row", "Claude Code"). Don't repeat the kind. - Station
items: 1-3 bullets. Each ≤ 8 words. These show as• itemlines under the label. If you have 4+ candidate bullets, you're trying to do too much in one station — split it. - Edge
label: one verb, lowercase ("creates", "writes", "triggers", "shown to"). Two words OK ("hands url", "writes to"). No periods.
Size heuristics:
- Station
w≥ 160 unless the label is one short word. - Station
h: 70 if just label, 90 if label+sublabel, 110+ if 2-3 items. - ViewBox margins: 20-24px on all sides minimum.
Step 6 — Self-check before calling
Before you call create_sketch, walk through:
- Validator parity. Every
from/toresolves to a station id. Station ids are unique. Every station'skindis in{input, mcp_tool, filesystem, db_row}; every mark'skindis in{rect, circle, wedge, line, polyline, text}. Every required coord is a finite number (or the box uses acellwith a top-levelgrid).wedgestart/endare fractions in[0,1]withend ≥ start. ViewBox width/height positive. (See sketch-manifest.js — these are the rules the server enforces.) - Layout sanity. No two stations overlap. Everything is inside the viewBox (
x + w ≤ viewBox.width, etc.). For charts, the marks sit inside their intended panel/zone. - Edge clarity. No edge crosses through a station that isn't its endpoint without a
viaroute around it. If the path is close-but-not-piercing, acurvature > 1is the lighter fix. - Fidelity to the card. For charts: the marks match the retrieved
sketch_vocabcard's layout math (cumulative wedge fractions sum to 1, stacked-segment heights computed from a consistent scale, etc.). You didn't freehand a paradigm. - Label voice consistency. All edge labels are lowercase verbs. All station labels are sentence-case noun phrases.
- Density. Flow: 3–12 stations, 1–20 edges. Chart: segments/series within the readable band (Step 1 §4).
Step 7 — Call create_sketch
Call the MCP tool with:
{
"title": "<same title you put in the manifest>",
"manifest": <the manifest object>
}The tool returns { ok: true, ref: "sk_...", url: "/sketches/sk_..." }.
If the call errors with Invalid manifest:\n - ..., the validator caught something — read the error, fix the manifest, call again. Don't retry with the same input.
Step 8 — Hand off
Reply to the user with the full URL (prefix with the control-plane origin — usually http://localhost:3001):
Sketch ready: http://localhost:3001/sketches/sk_xxxxxxxxxx
One sentence is enough. The diagram speaks for itself. Don't restate the contents.
If you want to iterate (the user says "make X bigger" or "move Y to the left"), re-mint with a new ref. Updates aren't supported on the v1 surface — re-minting is the loop.
Final reminders
- Static is a feature. No animation, no interactivity, no click handlers. If the user asks for those, push back to Step 1.
- Position math is your job. The agent burden is intentional — auto-layout is a future stretch (see plan §11). Don't apologize for hand-positioning; just be careful with it.
- The viewBox is your canvas, not your CSS. It scales to fit the page. Pick proportions that match the topology (wide-and-short for left-right pipelines, tall-and-narrow for top-down stacks). Don't pick a square out of habit.
- Resist embellishment. Don't add
note-shaped annotation stations to explain the diagram — the diagram should explain itself. If it needs annotation to be understood, it's not the right diagram.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

