diodeinc avatar

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-code

Installs 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

More from diodeinc/pcb

All 6
1nvidia avatarcuopt-skill-evolutionnvidia/skillsAfter solving a non-trivial problem, detect generalizable learnings and propose skill updates. Always active — applies to every interaction.1.3Kskills.sh installs
2smixs avatarcreative-directorsmixs/creative-director-skillAI creative director with recursive self-assessment. Generates concepts using world-class methodologies (SIT, TRIZ, Lateral Thinking, bisociation), scores again1.3Kskills.sh installs
3tech-leads-club avatartlc-spec-driventech-leads-club/agent-skillsFeature planning and implementation with 4 adaptive phases (Specify, Design, Tasks, Execute). Auto-sizes depth by complexity. Writes testable requirements in EA1.3Kskills.sh installs
4quodsoler avatarue-sequencer-cinematicsquodsoler/unreal-engine-skillsUse this skill when working with Sequencer, LevelSequence, cutscene, cinematic, camera, movie scene, sequencer event, or Movie Render Queue in Unreal Engine. Se1.3Kskills.sh installs
5nexscope-ai avatarecommerce-ppc-strategy-plannernexscope-ai/ecommerce-skillsCross-platform PPC strategy planner for ecommerce businesses. Analyzes your product and margins, recommends the right advertising platforms (Google Ads, Meta Ad1.3Kskills.sh installs
6cxuu avatargo-functional-optionscxuu/golang-skillsUse when designing a Go constructor or factory function with optional configuration — especially with 3+ optional parameters or extensible APIs. Also use when b1.3Kskills.sh installs