
Spice Sim
Adds ngspice simulation testbenches to Zener PCB designs when you need to validate circuit behavior before fabrication. Creates focused test files with PULSE or PWL sources, runs transient analysis, and exports waveforms to SVG. Handles the full flow: checking if your design is simulation-capable, wiring SpiceModel instances into leaf components when vendor models are missing, and structuring the testbench with proper control blocks. The pattern keeps one behavior per file, startup or protection thresholds or current limiting, which makes debugging cleaner than cramming everything into a single sim. Useful if you're already working in Zener's Python-like HDL and want quick spice verification without leaving the toolchain.
- skills.sh installs
- 1.3K
- GitHub stars
- 482
- last updated
- Aug 21, 2026
Install
$ npx -y skills add diodeinc/pcb --skill spice-sim --agent claude-codeInstalls into .claude/skills of the current project.
Files
Spice Simulation
Use a focused testbench such as <package>/testbench/test_<scenario>.zen for one behavior: startup, enable, a protection threshold, or current limit.
Reuse an existing bench when it covers the request.
Run it with pcb sim -v <file>.zen; a separate dummy simulation is only useful when diagnosing setup problems.
pcb sim runs the ngspice executable in batch mode in the testbench's directory and waits for it to finish; it sets no time limit.
Without -v, a successful run prints only that it passed.
Model and testbench
Every component that is not DNP needs a SPICE model.
The stdlib generics, such as resistors, capacitors, inductors, ferrite beads, crystals, diodes, LEDs, and TVS diodes, have their own.
A leaf component needs spice_model=SpiceModel(...).
Obtain a vendor model or, when appropriate, use a behavioral model with explicit limitations.
Match nets to the subcircuit's declared terminal order, and pass every PARAMS: entry in args, because defaults are not applied:
Sponsors
Details
- Repository
- github.com/diodeinc/pcb
- Category
- Design & UI/UX
- First seen
- Jun 3, 2026