Explanatory figures for technical writing, as data.
Woodcut is a figure grammar plus a set of zero-dependency web components. You describe a diagram as JSON; the components draw it and give every figure the same interaction chrome:
The taste lives in GRAMMAR.md. The components enforce it, so every figure in every post reads the same way.
See the figure catalog → One worked example of every diagram type, and one narrated walkthrough. Hover a box, expand a figure, replay a scenario.
Early. Five diagram types ship today: block diagram, state machine, flowchart, swimlane, and sequence — all on the one shared frame.
npm install @arjunkhera/woodcut
Or copy packages/woodcut/src/ — the components are plain files
with no build step.
<link rel="stylesheet" href="woodcut/src/tokens.css">
<script type="module" src="woodcut/src/index.js"></script>
<wc-state-machine>
<script type="application/json">{ ...figure data... }</script>
</wc-state-machine>
The figure catalog shows one worked example of every diagram type. Its source is docs/index.html. To run it locally:
python3 -m http.server 8080
Then open http://localhost:8080/docs/.
The components read CSS variables and ship with a neutral theme
(src/tokens.css). Override the --wc-* variables to skin every
figure at once. themes/quiet-editorial.css
is a complete worked example, including a dark mode.
The figure skill teaches a coding agent to pick the right diagram type, emit correct data, and self-check against the grammar:
npx skills add github.com/Arjunkhera/woodcut --skill figure
MIT.