Generates pictorial breadboard-style wiring diagrams from a JSON spec using Fritzing part graphics and an automatic wire router. Useful for ESP32, Arduino, Pi, or discrete-component builds.
Ships in wiring-diagram. 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.
Turn a circuit description into a pictorial wiring picture: real Fritzing breadboard part graphics + clean colored wires drawn pin-to-pin. Offline, headless (Chromium screenshot). The reader looks at it and sees where each wire physically goes — no schematic literacy required.
Author parts + a net list + rough positions. The generator does everything that makes it readable. Part sizing, leg labels, which leg faces which neighbor, wire routing around chips, z-order, and shared-rail fan-out are all automatic rules — never hand-tuned per diagram.
uv run python3 gen.py <spec.json> [out.png]
uv run python3 gen.py selftest # asserts the label-shortener rules
uv run python3 gen.py score <spec.json> # convergence score: shadowed px + worst overlap
Wires route with an anti-convergence router: candidate paths are scored and the router
actively avoids overlapping or shadowing another wire's path, not just avoiding parts. score
makes that measurable instead of squinting at the PNG — lower is better. The 7-segment
reference (examples/seg7x4-c3-595.json) scores ~179px shadowed. Re-run score after moving
parts to check whether a placement change actually helped.
.fzp connector terminalIds.references/eagle-pcb-scope.md.x/y. Do not set
sizes, pin labels, or wire paths by hand — if the output is wrong, fix the rule or the
placement, not the pixels. (references/placement-routing.md)parts/CREDIT.txt).gen_wokwi_parts.py, hand-author an honest labelled body,
or say the part is missing. Audit with:
uv run python3 -c "import json,collections;d=json.load(open('parts/index.json'));b=collections.defaultdict(list);[b[v['svg']].append(k) for k,v in d.items() if v.get('svg')];print({s:k for s,k in b.items() if len(k)>1})"importers/wokwi.py converts a Wokwi
diagram.json, importers/falstad.py converts a Falstad/CircuitJS export — both emit a spec
directly, skip steps 1-2. Otherwise: list the parts and the net list (what connects to what).parts/index.json. Missing a part? Try
uv run python3 gen_wokwi_parts.py first — it reads pin coordinates straight out of the
vendored Wokwi element source (vendor/wokwi-elements/src/*-element.ts) and emits a part with
zero hand-authoring; over half the catalog comes from this path (lint_parts.py prints
the live part count). Of the 50 vendored elements it skips 13 — 9 declare pinInfo as a
computed getter rather than a static array (led, lcd1602, 7segment, neopixel-matrix,
stepper, led-ring, membrane-keypad, biaxial-stepper, slide-potentiometer), 2
declare no pins, 2 use expressions instead of literal coordinates — plus the SUPPRESSed
ones that hand-authored parts already cover. A static parser cannot evaluate a getter body;
for those, follow the Part source priority below.
Note the generated bodies default to 190px wide and their labels can overflow on parts whose
pins sit close together — cosmetic only, the pin coordinates are the authoritative bit.components (id, part, rough x/y), wires ([id,pin]→[id,pin]),
optional bus rails for shared 5V/GND. Full format + a worked example: README.md.uv run python3 gen.py spec.json out.png.gen.py score to check numerically whether a placement change reduced wire overlap.
(Placement + routing tips: README.md.)firmware/<project>/wiring-*.json) so it regenerates.The router is greedy and sequential: it commits each wire in list order, and early wires claim the good lanes. So the JSON array order is a real input, not cosmetic — reordering alone moved a 38-wire sheet from 810px to 558px (-31%) with every part left where it was. When a sheet scores badly, try routing the repetitive fan-out (chip → resistors → display) last and in a consistent order before you start dragging parts around.
The other lever is staggering. Identical rows placed at identical x force every vertical drop into one corridor, which is exactly what the score punishes: six transistor emitters all dropping to a GND bus at the same x scored 2335px; fanning their x by ~50px each gave 1316px (-44%) with no other change. Repeated identical channels want deliberately un-identical coordinates.
Both are cheap to search — score is the objective function, so probe a handful of variants
in a loop and keep the winner rather than guessing from the image.
gen.py — the generator (spec → PNG). Parametric rules live here (DEFAULT_W, PIN_ALIAS,
the anti-convergence router, bus fan-out, score subcommand).fritzing.py — part loader: resolve a Fritzing .fzp → breadboard SVG + pin map. Reads the
vendored repo at vendor/fritzing-parts (1794 core parts; FZ_REPO env overrides).lint_parts.py — catalog integrity gate: aliased artwork, duplicate physical parts, missing
provenance, dead pin refs, orphan SVGs. Runs inside torture.py; run it after ANY parts edit.gen_wokwi_parts.py — generates parts from the vendored Wokwi element library (see Workflow
step 2). Idempotent, only touches wokwi_-prefixed catalog keys.importers/wokwi.py, importers/falstad.py — convert a real Wokwi diagram.json or
Falstad/CircuitJS export into a spec. importers/README.md has the details.parts/ — index.json (slug → SVG + connector→terminal map), the .fzps, svg/ (vendored
breadboard graphics), CREDIT.txt.examples/ — worked specs + their rendered PNGs. Copy the closest one as a starting point.torture.py — adversarial test harness (20 cases) for gen.py. Contract: never silently
drop a requested wire, fail loud on bad input, never traceback, never emit a corrupt PNG. Run
it after touching gen.py.to3d.py, build_breadboard.py — feed other pipelines (cad-guy's 3D sculptures, the maker
dashboard's Breadboard Practice tab). Not part of the normal diagram workflow; present here
because they live next to gen.py in tools/diagram/.references/eagle-pcb-scope.md — the Eagle/KiCad boundary (schematic + PCB) and the
eagle2fritzing bridge. Spec format, adding a part, and placement tips live in README.md.Source of truth: builder-area/tools/diagram. On the dev machine the skill dir is a
symlink to it — one copy, no sync step, drift structurally impossible. (A sync-script scheme
preceded this and rotted silently for months; do not resurrect it.) The HFL marketplace plugin
is a published snapshot of that directory; scripts/publish-wiring-diagram.sh in the
marketplace repo refreshes it.
Rendering is fully self-contained (vendored parts/). The two part generators need their
upstream repos, which exist only on the dev machine: fritzing.py wants
vendor/fritzing-parts (or FZ_REPO), gen_wokwi_parts.py wants vendor/wokwi-elements.
Elsewhere both fail loud with instructions — everything else works.
fritzing.py against vendor/fritzing-parts: real photo art AND
authoritative pin data. uv run python3 -c "import fritzing;print(fritzing.find_fzp('encoder'))"gen_wokwi_parts.py if the element declares readable pinInfo: exact
pins, generic box art."fzp": "(hand-authored ...)" provenance
marker mandatory, and NEVER by pointing at another part's artwork (see Hard rule 7).
If the same physical part would exist in two namespaces, suppress the wokwi one via
SUPPRESS in gen_wokwi_parts.py. lint_parts.py enforces all of this.references/eagle-pcb-scope.md explains the boundary and the eagle2fritzing bridge.README.md (opens in a new tab)examples/555-blink-3d.json (opens in a new tab)examples/555-blink.json (opens in a new tab)examples/555-blink.png (opens in a new tab)examples/esp32-pocket-sculpture.json (opens in a new tab)examples/hub75-band-display.json (opens in a new tab)examples/hub75-band-display.png (opens in a new tab)examples/led-array-3d.json (opens in a new tab)examples/led-array.json (opens in a new tab)examples/led-array.png (opens in a new tab)examples/led-flasher.json (opens in a new tab)examples/lm386-amp.json (opens in a new tab)examples/lm386-amp.png (opens in a new tab)examples/metronome-sculpture-3d.json (opens in a new tab)examples/metronome-sculpture-complete.json (opens in a new tab)examples/metronome-sculpture-complete.png (opens in a new tab)examples/npn-driver-3d.json (opens in a new tab)examples/npn-driver.json (opens in a new tab)examples/npn-driver.png (opens in a new tab)examples/pico-screen.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
wiring-diagram, breadboard, fritzing, circuit-diagram, hardware
Other plugins' skills for the same job
/wiring-diagram:wiring-diagramfrom wiring-diagram
npx claudepluginhub human-frontier-labs-inc/human-frontier-labs-marketplace --plugin wiring-diagram