hdldiagZero
An agent skill that turns an HDL / RTL / SoC architecture description into a clean SVG block diagram. Color-codes blocks by clock domain, distinguishes AXI and TileLink variants, draws CDC blocks with a split fill, omits clock / reset / JTAG / debug clutter by default, and validates the output geometry so lines never pass through blocks.
The skill is packaged as a Claude Code plugin: the runtime files live under skills/hdldiagzero/ and are described by .claude-plugin/plugin.json and .claude-plugin/marketplace.json. Claude Code users install via the marketplace flow; other agent runtimes (Codex, custom) can use install.py for a direct copy.
Index
Usage
Once installed, ask the agent something like "draw the top-level RTL" in any HDL project and the skill activates. By default it uses the light theme and depth 1 (top + direct children); add "dark mode" or "two levels deep" to override. The agent extracts the architecture, writes a JSON spec next to the SVG, validates the spec, runs the renderer, and validates the SVG geometry.
You can also drive the toolchain manually:
python validate_spec.py spec.json
python render.py --theme dark spec.json out.svg
python validate.py out.svg
Each validator exits 0 on PASS, 1 when validation reports violations, and 2 for usage / parse errors. The spec validator may print non-fatal authoring hints (such as unused legend domains or a likely reversed CDC split) while still exiting 0. The SVG validator prints the exact violation count in stdout; one bad route may trigger multiple reports. Each violation prints with coordinates so the agent (or a human) can adjust the JSON.
Sample Output
Hierarchy depth 1 - top + direct children
Generated from test_spec.json:
Light mode:
Dark mode:
Full SoC top-level
Generated from test_spec_soc.json - application SoC with a CPU complex, CPU-local L2 cache, CPU-to-AXI bridge, AXI interconnect, on-chip SRAM, DMA, DDR controller, off-chip DDR4, APB bridge, and an APB peripherals subsystem across four clock domains (cpu / axi / ddr / apb):
Light mode:
Dark mode:
OpenTitan Earl Grey sample
Generated from test_spec_opentitan.json - an overview-style sample of the OpenTitan Earl Grey SoC with Ibex, TL-UL fabric, memory controllers, secure services, peripheral fabric, interrupts, and always-on control paths:
Light mode:
Dark mode:
OpenTitan Earl Grey depth 2
Generated from test_spec_opentitan_depth2.json - the same SoC expanded into grouped Ibex core internals, secure-services, and peripheral-subsystem blocks:
Light mode:
Dark mode:
Clock-domain lanes
Generated from test_spec_lanes.json - an RHS-style acquisition pipeline where each clock domain gets its own tinted lane spanning the canvas:
Light mode:
Dark mode:
Hierarchy depth 2 - children + grandchildren
Generated from test_spec_depth2.json - a GbE MAC where the TX/RX paths are expanded into their internal descriptor -> FIFO/CDC -> MAC pipelines:
Light mode:
Dark mode:
Features