spice-sim

spice-sim is a skill for Claude Code, Codex from diodeinc/pcb. It costs 22 tokens per session (912 once invoked), scanned A, original, MIT.

A workflow for adding or running an ngspice simulation for a Zener circuit design in a .zen file. ngspice is a circuit simulator that models electrical behavior and can produce plots.

In plain words
What is it for?
Use it to create Zener testbenches, run DC or transient analyses, and save simulation plots as SVG files.
Why use it?
It provides a defined structure for checking whether a design can be simulated, supplying a missing circuit model, and testing a focused scenario.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create Zener testbenches, run DC or transient analyses, and save simulation plots as SVG files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/diodeinc/pcb/spice-sim
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add diodeinc/pcb --skill spice-sim
Clone the repo
git clone --depth 1 https://github.com/diodeinc/pcb

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spice-sim

README.md
[![agentmods](https://agentmods.dev/badge/skills/diodeinc/pcb/spice-sim/github.svg)](https://agentmods.dev/skills/diodeinc/pcb/spice-sim)
Your own site
<a href="https://agentmods.dev/skills/diodeinc/pcb/spice-sim"><img src="https://agentmods.dev/badge/skills/diodeinc/pcb/spice-sim/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spice-sim

Your own site · 80×15
<a href="https://agentmods.dev/skills/diodeinc/pcb/spice-sim"><img src="https://agentmods.dev/badge/skills/diodeinc/pcb/spice-sim.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 912 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 26 Sept 2026
  • Snyk pass 26 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00912
Opus 5.5 $0.00009 $0.00365
Sonnet 5.5 $0.00004 $0.00182
Haiku 4.5 $0.00002 $0.00091

Measured 25d ago against content hash d6a2dfde9516, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spice-sim scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 25d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/spice-sim/SKILL.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 stops it after 5 seconds. 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:

Component(
    name="MyPart",
    symbol=Symbol(library="MyPart.kicad_sym"),
    footprint=File("MyPart.kicad_mod"),
    part=Part(mpn="MYPART-1", manufacturer="Vendor"),
    pins={"VIN": VIN, "VOUT": VOUT, "GND": GND},
    spice_model=SpiceModel(
        "MyPart.lib",
        "MyPart_SUBCKT",
        nets=[VIN, VOUT, GND],
        args={},
    ),
)

The model text goes into the netlist, so a .include in the model file resolves from the testbench's directory. The .subckt line must list all its terminals on one line; terminals on + continuation lines are not counted. For a PSpice model, put set ngbehavior=psa in a .spiceinit file beside the testbench; for an LTspice model, set ngbehavior=ltpsa. Without it, PSpice expressions such as VALUE={LIMIT(...)} give wrong results without an error. Verilog-A and encrypted models do not run.

Instantiate the module under test and needed loads/passives in Zener. Put sources, waveforms, analysis, and plot commands in the raw ngspice setup string of a top-level Simulation:

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 25d ago Changed · +21 lines d6a2dfde9516
  2. 1mo ago Changed · -89 lines · -4 tokens per session 5cf04c71a426
  3. 1mo ago First seen · 147 lines · 26 tokens per session scan A fa89c0870962

Subscribe to this mod's changes

spice-sim is a skill published in the GitHub repository diodeinc/pcb (465 stars, last pushed today), licensed MIT. It adds 22 tokens to every session and 912 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

neuroskill-bci

Use live BCI cognitive and mood state from NeuroSkill.

NousResearch/hermes-agent · 18 tokens

ruview-applications

Run RuView sensing applications — presence/occupancy, breathing & heart rate, activity & fall detection, 17-keypoint pose estimation (WiFlow), sleep monitoring & apnea screening, environment mapping, Mass Casualty Assessment (MAT), and the 3D point-cloud fusion demo. Use when someone wants to actually do something…

ruvnet/RuView · 79 tokens

lab-hardware-cad

Designs custom laboratory hardware as parametric build123d models and exports fabrication artifacts as STEP, STL, and DXF files - microfluidic chips and molds, optomechanical mounts and breadboard adapters, cuvette and microplate holders, tube racks, animal-behavior rigs, and 3D-printed instrument fixtures. Use when a…

K-Dense-AI/scientific-agent-skills · 108 tokens

pylabrobot

Develops and reviews PyLabRobot lab-automation resources, liquid-handling plans, offline simulations, and supported-device integrations. Supports PyLabRobot protocols and API questions; keep physical execution behind an explicit operator safety gate.

K-Dense-AI/scientific-agent-skills · 49 tokens

pybamm

Simulates lithium-ion battery charge, discharge and rest experiments with PyBaMM, records parameter-set provenance, checks mesh and solver sensitivity, and compares predicted voltage curves with measured cycling data. Use for SPM or DFN electrochemical battery modeling, C-rate protocols, voltage cutoffs, parameter…

K-Dense-AI/scientific-agent-skills · 70 tokens

calibrate-room

Run the ADR-151 per-room calibration pipeline — baseline → enroll → extract → train → a bank of small specialists (presence/posture/breathing/heartbeat/restlessness/anomaly).

ruvnet/RuView · 41 tokens