Skip to content
Back to search

claude-code-sketch

MarketplaceWorks with Claude CodeGitHub

Claude Code mod: answers drawn as diagrams, charts, roadmaps, journeys and wireframes in the terminal

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked yesterday
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/allen-hsu--claude-code-sketch/badge.svg)](/listings/allen-hsu--claude-code-sketch)

HTML

<a href="/listings/allen-hsu--claude-code-sketch"><img src="/api/listings/allen-hsu--claude-code-sketch/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

At the prompt of a Claude Code terminal session:

/plugin install sketch --marketplace allen-hsu/claude-code-sketch

Answer `y` to add the marketplace, then pick a scope (user scope loads it in every session).

From a shell:

claude plugin install sketch --marketplace allen-hsu/claude-code-sketch

In the desktop app, where `/plugin` does not run: click **+** next to the prompt box, then **Plugins**, **Add marketplace** with `allen-hsu/claude-code-sketch`, then **Add plugin**.

Then just ask as usual: "how is this service put together?", "compare these three options", "plan the next quarter". Claude picks the card.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 11 lines
  1. {
  2. "name": "claude-code-sketch",
  3. "owner": { "name": "allen-hsu" },
  4. "plugins": [
  5. {
  6. "name": "sketch",
  7. "source": "./",
  8. "description": "Claude draws diagrams, charts, roadmaps, journeys and wireframes as cards in the transcript instead of writing paragraphs"
  9. }
  10. ]
  11. }
README.md · README · 208 lines
  1. # sketch
  2. English | [繁體中文](README.zh-TW.md)
  3. **Claude Code answers with pictures instead of paragraphs.**
  4. `sketch` is a Claude Code mod (plugin). It gives Claude 17 drawing tools and one standing instruction: when an answer has a shape, draw the shape. Architecture, flows, roadmaps, user journeys, wireframes and charts appear as cards in the transcript, in your terminal, in your theme's colors.
  5. ![A layered architecture card](docs/images/en/layers.png)
  6. ## Diagrams you can explore
  7. A dense diagram stays readable because you can ask it about one node at a time:
  8. ![Hovering and clicking nodes in a diagram](docs/images/en/interaction.gif)
  9. - **Hover** a node: every wire leaving it lights up, end to end.
  10. - **Click** a node's name (anywhere across the middle of its box, or its name in the list under a dense picture): its wires in and out turn thick, sit on top of everything else, and a pulse runs along them from source to target; the rest fades. Click it again to clear it, or click another node to move the focus. Each card keeps its own focus.
  11. - Every node's wires have their own color, and where two wires cross, the later one simply passes over the earlier: no junction marks that could be mistaken for a connection.
  12. - Past a handful of crossings, every connection is also written out under the picture.
  13. - Text too long for its box (a pipeline job, a swimlane step, a node's name or note, a roadmap item) takes a second line where it can; whatever still does not fit shows whole on the line under the card while you hover it.
  14. Hover and click need a terminal that reports the mouse to Claude Code (the fullscreen renderer). The pulse runs for 30 seconds after the last click and then stops, leaving the thick lines; it redraws the focused card a few times a second while it runs.
  15. ## Install
  16. At the prompt of a Claude Code terminal session:
  17. ```
  18. /plugin install sketch --marketplace allen-hsu/claude-code-sketch
  19. ```
  20. Answer `y` to add the marketplace, then pick a scope (user scope loads it in every session).
  21. From a shell:
  22. ```
  23. claude plugin install sketch --marketplace allen-hsu/claude-code-sketch
  24. ```
  25. In the desktop app, where `/plugin` does not run: click **+** next to the prompt box, then **Plugins**, **Add marketplace** with `allen-hsu/claude-code-sketch`, then **Add plugin**.
  26. Then just ask as usual: "how is this service put together?", "compare these three options", "plan the next quarter". Claude picks the card.
  27. ## What you get
  28. | Tool | Draws | Good for |
  29. | --- | --- | --- |
  30. | `layers` | Bands of components, nested zones, side concerns | Tech stacks, platform maps, deployment topologies |
  31. | `diagram` | Nodes and wires, laid out automatically | Architecture wiring, flowcharts, state machines, boundaries (C4), dependencies |
  32. | `schema` | Boxes with fields, and their relations | Data models (ER), class and component diagrams |
  33. | `swimlane` | Steps across lanes of roles or systems | Processes with handovers |
  34. | `pipeline` | Stages left to right, each a column of jobs | CI/CD, ETL, data flows |
  35. | `gitgraph` | Branches, commits, merges and tags | Branching strategy, release flow |
  36. | `sequence` | Actors and the messages between them | Request flows, protocols, handoffs |
  37. | `tree` | An outline or a mind map | Goal breakdowns, sitemaps, taxonomies |
  38. | `timeline` | Bars over periods, milestones | Roadmaps, gantt schedules, study plans |
  39. | `board` | Columns of cards | Kanban, now / next / later |
  40. | `quadrant` | Points on two axes, or four lists | Prioritisation, positioning, SWOT |
  41. | `journey` | Stages, a mood line, rows of notes | User journeys, service blueprints |
  42. | `wireframe` | A low-fidelity screen | Page and app layouts |
  43. | `metrics` | Number tiles with a trend | KPIs, experiment results |
  44. | `chart` | Bar, column, stacked, line, scatter, heatmap, histogram, funnel, share | Any numbers you already have |
  45. | `cards` | Titled cards with tags and quotes | Personas, research findings, principles |
  46. | `compare` | Options side by side, then a pick dialog | Decisions between two to four options |
  47. The cards below are drawn from the made-up inputs in [`preview/samples.en.ts`](preview/samples.en.ts). Labels can be in any language; Chinese, Japanese and Korean text is measured correctly (see the [繁體中文 README](README.zh-TW.md) for the same cards in Chinese).
  48. ## Architecture and structure
  49. `layers` shows what a system is made of. `diagram` shows how it connects: each node's wires have their own color, an edge that loops back is drawn with an upward arrow, and a node's shape says what it is (decision, store, external system). `numbers: true` numbers the nodes and marks each arrow with where it comes from.
  50. ![System wiring](docs/images/en/diagram.png)
  51. | Flowchart | Dependencies |
  52. | --- | --- |
  53. | ![Flowchart with decisions](docs/images/en/diagram-flow-1.png) | ![Dependency graph](docs/images/en/diagram-flow-2.png) |
  54. When dependencies are too dense for wires, `layout: "matrix"` draws who uses whom as a grid, with counts:
  55. ![Dependency matrix](docs/images/en/diagram-flow-matrix.png)
  56. With `layout: "zones"`, each group becomes a framed band: subsystems, network boundaries, a C4 container view. The `person` shape marks a user or a role.
  57. ![Zones and boundaries](docs/images/en/diagram-zones.png)
  58. An edge from a node to itself is drawn as a loop inside the node, so a state machine is a diagram too:
  59. ![State machine](docs/images/en/diagram-state.png)
  60. Zones in `layers` can hold zones of their own, which covers deployment topologies (region, availability zone, subnet):
  61. ![Deployment topology](docs/images/en/layers-topology.png)
  62. `schema` draws tables or classes with their fields, and the relations between them:
  63. | Data model (ER) | Classes |
  64. | --- | --- |
  65. | ![ER diagram](docs/images/en/schema-er.png) | ![Class diagram](docs/images/en/schema-class.png) |
  66. `swimlane` puts each step of a process in the lane of whoever does it, `pipeline` lays stages out left to right, and `gitgraph` shows branches over time:
  67. ![Swimlane](docs/images/en/swimlane.png)
  68. ![Pipeline](docs/images/en/pipeline.png)
  69. ![Branch graph](docs/images/en/gitgraph.png)
  70. ![Sequence diagram](docs/images/en/sequence.png)
  71. | Outline | Mind map |
  72. | --- | --- |
  73. | ![Tree](docs/images/en/tree.png) | ![Mind map](docs/images/en/tree-mind.png) |
  74. ## Product and planning
  75. ![Roadmap](docs/images/en/timeline.png)
  76. ![Kanban board](docs/images/en/board.png)
  77. ![Prioritisation on two axes](docs/images/en/quadrant-1.png)
  78. ![SWOT](docs/images/en/quadrant-2.png)
  79. `compare` draws the options, then opens a dialog under the cards so you pick with the arrow keys; Claude carries on with your choice.
  80. ![Options compared](docs/images/en/compare.png)
  81. ## Design and research
  82. ![User journey](docs/images/en/journey.png)
  83. ![Wireframe](docs/images/en/wireframe-1.png)
  84. ![Mobile wireframe](docs/images/en/wireframe-2.png)
  85. ![Research findings and a persona](docs/images/en/cards.png)
  86. ## Numbers
  87. Charts, metric tiles, timelines and journeys draw themselves in while Claude's call runs:
  88. ![A line chart drawing itself in](docs/images/en/entrance.gif)
  89. ![Metric tiles](docs/images/en/metrics.png)
  90. ![Line chart](docs/images/en/chart-line.png)
  91. ![Scatter chart with trend line](docs/images/en/chart-scatter.png)
  92. ![Bar chart](docs/images/en/chart-bar.png)
  93. ![Column chart](docs/images/en/chart-column.png)
  94. ![Stacked bars](docs/images/en/chart-stacked.png)
  95. ![Histogram](docs/images/en/chart-histogram.png)
  96. ![Funnel](docs/images/en/chart-funnel.png)
  97. ![Heatmap](docs/images/en/chart-heatmap.png)
  98. ![Share of a whole](docs/images/en/chart-share.png)
  99. ## How it works
  100. The whole mod is one hooks module, [`hooks/register.tsx`](hooks/register.tsx):
  101. - At session start it registers the 17 tools. Each takes plain structured input (nodes and edges, periods and items, labels and series).
  102. - A `ui.render` hook replaces each tool call's row in the transcript with the card, drawn from the call's own input. Hover groups light a node's wires with no code running; node names are buttons, and the one piece of state the mod keeps is which node each diagram card has focused (declared in [`types/index.d.ts`](types/index.d.ts)), plus the tick the pulse steps on.
  103. - A `prompt.compose` hook adds one short section to the system prompt telling Claude when to reach for which card and to keep the text around it brief.
  104. - Charts, metrics, timelines and journeys draw themselves in over about a second while the call runs.
  105. - Press `ctrl+o` to see the raw tool call behind a card.
  106. Things to know:
  107. - The tool definitions and the prompt section ride on every request in a session where the mod is loaded: roughly 5 thousand tokens (an estimate, not a measurement).
  108. - Cards are sized to the terminal width when they are drawn. Below about 60 columns the wider cards get cramped.
  109. - Wide characters (Chinese, Japanese, Korean) are measured as two cells. A terminal that draws ambiguous-width symbols such as `●` two cells wide will misalign some cards.
  110. - Built and tried on Claude Code 2.1.325 in a terminal. The cards use only `Box` and `Text`, which every surface has, but the desktop and mobile surfaces are untested.
  111. ## About the images
  112. The images in this README are not window screenshots. They are produced by the scripts in [`preview/`](preview): `render.ts` runs the mod's real hooks against a stand-in engine with a small flex layout of its own, and `paint.py` paints the resulting cells with the default dark theme's colors. `frames.ts` renders the animations frame by frame from the same hooks; in them, the hovered state is drawn as the terminal draws it, without a pointer. Layout in your terminal comes from Claude Code's own engine and your theme, so spacing and colors can differ slightly.
  113. To regenerate them (macOS, needs [Bun](https://bun.sh) and Python with Pillow; use `samples.zh-TW.ts` and `docs/images/zh-TW` for the Chinese set):
  114. ```
  115. cd preview
  116. bun --jsx-factory=h --jsx-fragment=Fragment --jsx-runtime=classic render.ts ../hooks/register.tsx 110 cards.json ./samples.en.ts
  117. python3 paint.py cards.json ../docs/images/en
  118. bun --jsx-factory=h --jsx-fragment=Fragment --jsx-runtime=classic frames.ts ../hooks/register.tsx 110 ./samples.en.ts anim
  119. SKETCH_GIF_SCALE=0.55 python3 paint.py anim-interaction.frames.json ../docs/images/en/interaction.gif
  120. python3 paint.py anim-entrance.frames.json ../docs/images/en/entrance.gif
  121. ```
  122. ## Develop
  123. ```
  124. claude --plugin-dir . # run a session with the mod loaded from this folder
  125. claude plugin validate . # check the manifest and the hooks module
  126. ```
  127. Edits to `hooks/register.tsx` hot-reload in a session started with `--plugin-dir`.
  128. ## License
  129. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.