← Commit history
README.md+69−1
@@ -1,3 +1,71 @@ # SPICE Simulation Skills -Pick, run and license the right SPICE simulator from an AI thread: ngspice in the container by default, LTspice and PSpice for TI on a Windows host for vendor models.+Circuit simulation for AI agents in the Adom ecosystem. This skill pack tells an agent which SPICE engine to use, where to run it, how to drive it headless, and what each tool's licence allows. It comes from a hands-on comparison of ngspice, LTspice and PSpice for TI on a real board: a TPS54202 12 V to 5 V, 1 A buck converter.++## The short version++- **Default to ngspice in the Ubuntu container.** It is free (BSD), small, runs headless and in parallel, and works the same in WSL2, in Lima on a Mac, and in the cloud. It is the only mainstream option that may back a hosted simulation dashboard.+- **Use PSpice for TI only for PSpice-encrypted vendor models** (TI and many power-device vendors ship these). Nothing else can run them. It runs on a Windows host through Adom Bridge, for internal checks.+- **Use LTspice for ADI / LT parts** on a Windows host through Adom Bridge.+- **Never decrypt a vendor model.** Validate a fast hand-built model against the vendor model once instead.++![ngspice buck transient](docs/ngspice-buck-transient.png)++## What we learned++- **Accuracy**: on a well-posed netlist the engines gave consistent steady-state results. The differences we saw came from translating a netlist between dialects, not from the solvers.+- **Speed**: behavioral models run in seconds. A transistor-level vendor model of a switching regulator takes minutes to tens of minutes for a few milliseconds of switching, so iterate with a behavioral model and validate once with the vendor model.+- **Automation**: ngspice is the easiest to drive from an agent. LTspice has a working batch mode once a first-run dialog is answered. PSpice for TI has no batch runner in this edition, so an agent has to drive its GUI.+- **Install friction**: ngspice installs in minutes with no account. LTspice installs per-user without admin rights. PSpice for TI needs a TI account, an export-control request, an access key and an admin install a person must approve.+- **Model validation**: a hand-built model matched TI's vendor model closely on startup and ripple but under-predicted load-step overshoot. Fitted models are good for startup and ripple; check their loop dynamics against the vendor model.++We do not publish timing or head-to-head numbers for LTspice or PSpice because their licences restrict publishing benchmarks. The ngspice numbers below are our own.++![ngspice Monte Carlo](docs/ngspice-monte-carlo.png)++## ngspice in the container (measured)++| | ngspice 42 (apt) | ngspice 47 (source build) |+|---|---|---|+| Disk | 36 MB | 21 MB |+| 5 ms of a 500 kHz buck with a load step | 1.4 s | 1.8 s |+| 400-run Monte Carlo of a Sallen-Key filter, 16 cores | 0.6 s | |++## Tool facts++| | ngspice | LTspice | PSpice for TI |+|---|---|---|---|+| Where it runs | Ubuntu container | Windows or macOS host | Windows host |+| Disk | 21 to 36 MB | about 270 MB | about 7 GB |+| Install | apt, or a 4 minute source build | per-user MSI, no admin | TI access key + admin install |+| Headless batch | yes | yes | no, GUI only |+| Runs PSpice-encrypted models | no | no | yes |+| May back a hosted dashboard | yes | no | no |++## Skills in this pack++| Skill | Use it for |+|---|---|+| **adom-spice-skillpack** | Start here: the decision rule, the findings, the skill map. |+| **spice-choose** | Which engine for which job; container vs Windows host; WSL2 vs Lima; install weight. |+| **spice-ngspice** | ngspice in the container: batch runs, measures, parallel Monte Carlo, building ngspice 47, parse traps. |+| **spice-ltspice** | LTspice on a Windows host through Adom Bridge: silent install, the first-run dialog, batch runs. |+| **spice-pspice-ti** | PSpice for TI: access, admin install, driving the GUI, output traps, CSDF output. |+| **spice-vendor-models** | Encrypted models: what runs where, validating a behavioral model, what never to do. |+| **spice-portable-netlists** | One netlist for ngspice, LTspice and PSpice; the dialect differences. |+| **spice-licensing** | Where each tool may run, hosted dashboards, commercial use, publishing results. |++## Examples++- `examples/buck_portable.cir`: the 12 V to 5 V buck test bench for ngspice and LTspice, with `.meas` results.+- `examples/buck_portable_pspice.cir`: the same circuit in PSpice syntax.+- `examples/sallen_key_ac.cir`: the Sallen-Key filter used for the Monte Carlo run.+- `examples/csdf.py`: a reader for PSpice `.PROBE/CSDF` text output.++## Install++```bash+adom-wiki pkg install adom-spice-skillpack+```++This installs the main skill and all seven sub-skills into `~/.claude/skills/`.
SKILL.mdadded+64
@@ -0,0 +1,64 @@+---+name: adom-spice-skillpack+description: START HERE for any circuit simulation in the Adom ecosystem. Picks the right SPICE engine (ngspice, LTspice, PSpice for TI, QSPICE, Xyce) for the job and the machine, runs it headless from an AI thread, and knows the licensing limits of each. ngspice in the Ubuntu container is the default; LTspice and PSpice for TI run on a Windows host through Adom Bridge for vendor models. Trigger words - spice, simulate, simulation, ngspice, ltspice, pspice, pspice for ti, qspice, xyce, spice model, encrypted model, vendor model, transient, ac analysis, loop gain, monte carlo, which simulator, simulator comparison, spice licensing, run a spice sim, simulate this circuit, check the buck in spice.+---++# Adom SPICE skill pack++One question decides most of this: **does the circuit need a vendor model that ships encrypted?**++- **No** (the usual case: passives, op-amp macromodels, behavioral models, plain-text vendor models): use **ngspice in the container**. It is free, BSD-licensed, small, runs headless, and runs many jobs in parallel.+- **Yes, a PSpice-encrypted model** (common from TI and many power-MOSFET vendors): only **PSpice** can run it. Use **PSpice for TI** on a Windows host through Adom Bridge, for internal checks only.+- **Yes, an LTspice-encrypted model or an ADI / LT part**: use **LTspice** on a Windows host through Adom Bridge.++Never decrypt a vendor model to make it run elsewhere, see **spice-vendor-models**.++## What we found, in general terms++We ran the same switching-regulator netlist through ngspice, LTspice and PSpice for TI, and a TI vendor model through PSpice for TI.++- **Accuracy**: on a well-posed netlist the engines gave consistent steady-state results. Differences came from how a netlist is translated between dialects (switch models, output syntax), not from the solvers. See **spice-portable-netlists**.+- **Speed**: behavioral models run in seconds; a full transistor-level vendor model of a switching regulator is far slower (minutes to tens of minutes for a few milliseconds of switching). Iterate with a behavioral model, validate once with the vendor model.+- **Automation**: ngspice is the easiest to drive from an agent (plain command line, shared library, no install friction). LTspice has a working batch mode after a one-time first-run dialog. PSpice for TI has no batch runner in this edition: an agent has to drive its GUI.+- **Install friction**: ngspice installs in minutes with no account. LTspice installs per-user with no admin rights. PSpice for TI needs a TI account, an export-control request, an access key and an admin install that a person must approve.++We do not publish timing or head-to-head numbers for LTspice or PSpice: their licences restrict publishing benchmarks. ngspice figures below are our own measurements.++## ngspice figures (Ubuntu 24.04 container, 16 cores)++| | ngspice 42 (apt) | ngspice 47 (source build) |+|---|---|---|+| Disk | 36 MB | 21 MB |+| 5 ms of a 500 kHz buck with a load step | 1.4 s | 1.8 s |+| 400-run Monte Carlo of a Sallen-Key filter | 3.1 s on 1 core, 0.6 s on 16 | |++## Tool facts++| | ngspice | LTspice | PSpice for TI |+|---|---|---|---|+| Where it runs | Ubuntu container (WSL2, Lima, cloud) | Windows or macOS host | Windows host |+| Disk | 21 to 36 MB | about 270 MB | about 7 GB |+| Install | apt, or a 4 minute source build | per-user MSI, no admin | TI access key + admin install |+| Headless batch | yes | yes (`-b`) | no, GUI only |+| Runs PSpice-encrypted models | no | no | yes |+| May back a hosted dashboard | yes | no (EULA) | no (EULA) |++## Skill map++| Skill | Use it for |+|---|---|+| **spice-choose** | The decision table: which engine for which job, container vs Windows host, WSL2 vs Lima on Mac, install weight. |+| **spice-ngspice** | Running ngspice in the container: batch runs, `.control` measures, parallel Monte Carlo, building ngspice 47, the parse traps. |+| **spice-ltspice** | Installing and driving LTspice on a Windows host through Adom Bridge: silent per-user install, the first-run dialog that hangs batch mode, reading `.log` measures. |+| **spice-pspice-ti** | PSpice for TI: getting access, the admin install, driving the GUI run, the `V(node)` and trace-limit traps, reading CSDF output. |+| **spice-vendor-models** | Encrypted models: who can run what, how to validate a hand-built model against the vendor model, what never to do. |+| **spice-portable-netlists** | Writing one netlist that runs in ngspice, LTspice and PSpice; the dialect differences that bite. |+| **spice-licensing** | Licence terms that decide where each tool may run: containers, VMs, hosted dashboards, commercial use, publishing results. |++## Defaults for an AI thread++1. Write the netlist as text and keep it next to the design (for example `sim/`).+2. Run it with ngspice in the container. Put measurements in the netlist so the result is a few numbers, not a waveform dump.+3. When a vendor model is involved, check its first lines for `$CDNENCSTART` or `**$ENCRYPTED_LIB` before choosing the engine.+4. When the design depends on a hand-built behavioral model, validate it once against the vendor model (**spice-vendor-models**) and keep the comparison in the project's own notes.+5. Do not publish LTspice or PSpice timings or tool-versus-tool comparisons (**spice-licensing**).
docs/hero.pngadded
⋯ 1 unchanged line ⋯
docs/ngspice-buck-transient.pngadded
⋯ 1 unchanged line ⋯
docs/ngspice-monte-carlo.pngadded
⋯ 1 unchanged line ⋯
examples/buck_portable.ciradded+43
@@ -0,0 +1,43 @@+* Portable 12V->5V 1A sync buck, 500 kHz voltage mode, type-III-ish comp+* Only R L C V E S B elements + .model SW: runs in ngspice, LTspice, QSPICE, PSpice+Vin vin 0 12+Vramp ramp 0 PULSE(0 1 0 1.98u 10n 10n 2u)+* power stage (ideal switches with Rds(on))+S1 vin sw hs 0 SWH+S2 sw 0 ls 0 SWL+L1 sw lx 15u+Rdcr lx vout 0.05+Cout vout ce 44u+Resr ce 0 5m+Rload vout 0 5+* load step 1A -> 2A at 3 ms+Sstep vout ld stp 0 SWH+Rld ld 0 5+Vstp stp 0 PULSE(0 1 3m 1u 1u 1 2)+* feedback 5V -> 0.8V ref, soft start 1 ms+Rtop vout fb 52.5k+Rbot fb 0 10k+Vref ref 0 PWL(0 0 1m 0.8)+* OTA error amp (gm) with Rc/Cc/Cp, output clamped 0..2 V, feed-forward cap on Rtop+Cff vout fb 1n+Gea 0 eo ref fb 200u+Rea eo 0 10Meg+Rc eo cz 10k+Cc cz 0 10n+Cp eo 0 100p+Dhi eo vhi DCLAMP+Vhi vhi 0 2+Dlo 0 eo DCLAMP+.model DCLAMP D(Is=1e-12 N=0.05)+Bcomp vc 0 V=max(0.02,min(0.98,v(eo)*0.5))+* PWM: comparator of vc vs ramp -> gate drives (smooth)+Bhs hs 0 V=0.5+0.5*tanh(200*(v(vc)-v(ramp)))+Bls ls 0 V=0.5-0.5*tanh(200*(v(vc)-v(ramp)))+.model SWH SW(Ron=0.1 Roff=1Meg Vt=0.5 Vh=0)+.model SWL SW(Ron=0.06 Roff=1Meg Vt=0.5 Vh=0)+.tran 20n 5m 0 20n+.meas tran vavg AVG v(vout) FROM=2.5m TO=2.9m+.meas tran vpp PP v(vout) FROM=2.5m TO=2.9m+.meas tran vmin MIN v(vout) FROM=3m TO=3.5m+.meas tran vavg2 AVG v(vout) FROM=4.5m TO=4.9m+.end
examples/buck_portable_pspice.ciradded+35
@@ -0,0 +1,35 @@+* Portable 12V->5V 1A sync buck - PSpice dialect (E VALUE, VSWITCH, probe resistor, CSDF output)+Vin vin 0 12+Vramp ramp 0 PULSE(0 1 0 1.98u 10n 10n 2u)+S1 vin sw hs 0 SWH+S2 sw 0 ls 0 SWL+L1 sw lx 15u+Rdcr lx vout 0.05+Cout vout ce 44u+Resr ce 0 5m+Rload vout 0 5+Sstep vout ld stp 0 SWH+Rld ld 0 5+Vstp stp 0 PULSE(0 1 3m 1u 1u 1 2)+Rtop vout fb 52.5k+Rbot fb 0 10k+Vref ref 0 PWL(0 0 1m 0.8)+Cff vout fb 1n+Gea 0 eo ref fb 200u+Rea eo 0 10Meg+Rc eo cz 10k+Cc cz 0 10n+Cp eo 0 100p+Dhi eo vhi DCLAMP+Vhi vhi 0 2+Dlo 0 eo DCLAMP+.model DCLAMP D(Is=1e-12 N=0.05)+Ecomp vc 0 VALUE={LIMIT(V(eo)*0.5,0.02,0.98)}+Ehs hs 0 VALUE={0.5+0.5*TANH(200*(V(vc)-V(ramp)))}+Els ls 0 VALUE={0.5-0.5*TANH(200*(V(vc)-V(ramp)))}+.model SWH VSWITCH(RON=0.1 ROFF=1MEG VON=0.501 VOFF=0.499)+.model SWL VSWITCH(RON=0.06 ROFF=1MEG VON=0.501 VOFF=0.499)+.TRAN 20n 5m 2.5m 20n+Rpv vout 0 1G+.PROBE/CSDF V(Rpv)+.END
examples/csdf.pyadded+29
@@ -0,0 +1,29 @@+import sys, re, numpy as np+def read_csdf(path, want):+    names=[]; t=[]; cols={w:[] for w in want}; hdr=True; cur=None; idx={}+    with open(path) as f:+        for line in f:+            if hdr:+                if line.startswith('#C'): hdr=False+                else:+                    names+=re.findall(r"'([^']+)'",line) if not line.startswith(('SOURCE','TITLE','SUBTITLE','TIME','ANALYSIS','ALLVALUES','SWEEP','XBEGIN','FORMAT','DGTL','#')) else []+                    continue+            if line.startswith('#C'):+                if not idx:+                    idx={w: format(names.index(w)+1,'x') for w in want}+                    inv={v:k for k,v in idx.items()}+                t.append(float(line.split()[1])); continue+            if line.startswith('#'): continue+            for tok in line.split():+                v,_,k=tok.partition(':')+                if k in inv: cols[inv[k]].append(float(v))+    return np.array(t), {k:np.array(v) for k,v in cols.items()}+if __name__=='__main__':+    t,c=read_csdf(sys.argv[1],['V(vout)'])+    v=c['V(vout)']; n=min(len(t),len(v)); t,v=t[:n],v[:n]+    w=lambda a,b:(t>=a)&(t<=b)+    print("points",n)+    print("vavg  %.5f"%v[w(2.5e-3,2.9e-3)].mean())+    print("vpp   %.3f mV"%((v[w(2.5e-3,2.9e-3)].max()-v[w(2.5e-3,2.9e-3)].min())*1e3))+    print("vmin  %.4f"%v[w(3e-3,3.5e-3)].min())+    print("vavg2 %.5f"%v[w(4.5e-3,4.9e-3)].mean())
examples/sallen_key_ac.ciradded+20
@@ -0,0 +1,20 @@+* Sallen-Key 2nd-order low-pass, fc~1 kHz, 1% R / 5% C tolerance+.param pr1=10k pr2=10k pc1=22n pc2=10n+Vin in 0 DC 0 AC 1+R1 in a {pr1}+R2 a b {pr2}+C1 a out {pc1}+C2 b 0 {pc2}+XU b out out OPAMP+.subckt OPAMP inp inn out+Gin 0 n1 inp inn 1m+R1 n1 0 100meg+C1 n1 0 15.9n+E2 out 0 n1 0 1+.ends+.control+ac dec 200 10 100k+let mag=abs(v(out))+meas ac f3db when mag=0.70711+.endc+.end
install.shadded+13
@@ -0,0 +1,13 @@+#!/usr/bin/env bash+set -e+DEST="$HOME/.claude/skills"+install_skill() { mkdir -p "$DEST/$1"; cp "$2" "$DEST/$1/SKILL.md"; }+install_skill adom-spice-skillpack    SKILL.md+install_skill spice-choose            skills/spice-choose/SKILL.md+install_skill spice-ngspice           skills/spice-ngspice/SKILL.md+install_skill spice-ltspice           skills/spice-ltspice/SKILL.md+install_skill spice-pspice-ti         skills/spice-pspice-ti/SKILL.md+install_skill spice-vendor-models     skills/spice-vendor-models/SKILL.md+install_skill spice-portable-netlists skills/spice-portable-netlists/SKILL.md+install_skill spice-licensing         skills/spice-licensing/SKILL.md+echo "OK: Installed adom-spice-skillpack plus 7 bundled skills to $DEST/."
package.jsonadded+70
@@ -0,0 +1,70 @@+{+  "slug": "adom-spice-skillpack",+  "title": "SPICE Simulation Skills",+  "type": "skill",+  "version": "0.1.0",+  "description": "Pick and run the right SPICE simulator from an AI thread: ngspice in the Ubuntu container by default, LTspice and PSpice for TI on a Windows host through Adom Bridge for vendor models, with the licensing limits of each.",+  "tags": [+    "skill",+    "skillpack",+    "spice",+    "simulation",+    "ngspice",+    "ltspice",+    "pspice",+    "electronics"+  ],+  "dependencies": {},+  "discovery_triggers": [+    "simulate this circuit",+    "run a spice simulation",+    "which spice simulator should I use",+    "ngspice or ltspice",+    "run the TI pspice model",+    "can we host ltspice in a dashboard",+    "spice licensing"+  ],+  "discovery_pitch": "Reach for this whenever a circuit needs simulating or a SPICE tool or vendor model has to be chosen, installed or licensed.",+  "sample_prompts": [+    {+      "label": "Simulate a buck",+      "prompt": "Simulate my 12 V to 5 V buck converter and check the load-step response"+    },+    {+      "label": "Vendor model",+      "prompt": "TI only gives a PSpice model for this regulator, how do we simulate it?"+    },+    {+      "label": "Pick a tool",+      "prompt": "Should we use ngspice, LTspice or PSpice for our simulation dashboard?"+    }+  ],+  "files": [+    "SKILL.md",+    "README.md",+    "package.json",+    "install.sh",+    "uninstall.sh",+    "skills/spice-choose/SKILL.md",+    "skills/spice-ngspice/SKILL.md",+    "skills/spice-ltspice/SKILL.md",+    "skills/spice-pspice-ti/SKILL.md",+    "skills/spice-vendor-models/SKILL.md",+    "skills/spice-portable-netlists/SKILL.md",+    "skills/spice-licensing/SKILL.md",+    "examples/buck_portable.cir",+    "examples/buck_portable_pspice.cir",+    "examples/sallen_key_ac.cir",+    "examples/csdf.py",+    "docs/ngspice-buck-transient.png",+    "docs/ngspice-monte-carlo.png",+    "docs/hero.png"+  ],+  "scripts": {+    "install": "./install.sh",+    "uninstall": "./uninstall.sh"+  },+  "hero": {+    "path": "docs/hero.png"+  }+}
page.json+63−8
@@ -14,19 +14,74 @@     "name": "John Lauer",     "email": "[email protected]"   },-  "tags": [],+  "tags": [+    "skill",+    "skillpack",+    "spice",+    "simulation",+    "ngspice",+    "ltspice",+    "pspice",+    "electronics"+  ],   "license": "proprietary",-  "visibility": {-    "public": true-  },-  "sample_prompts": [],-  "discovery_triggers": [],-  "discovery_pitch": null,+  "visibility": "public",+  "sample_prompts": [+    {+      "label": "Simulate a buck",+      "prompt": "Simulate my 12 V to 5 V buck converter and check the load-step response"+    },+    {+      "label": "Vendor model",+      "prompt": "TI only gives a PSpice model for this regulator, how do we simulate it?"+    },+    {+      "label": "Pick a tool",+      "prompt": "Should we use ngspice, LTspice or PSpice for our simulation dashboard?"+    }+  ],+  "discovery_triggers": [+    "simulate this circuit",+    "run a spice simulation",+    "which spice simulator should I use",+    "ngspice or ltspice",+    "run the TI pspice model",+    "can we host ltspice in a dashboard",+    "spice licensing"+  ],+  "discovery_pitch": "Reach for this whenever a circuit needs simulating or a SPICE tool or vendor model has to be chosen, installed or licensed.",   "metadata": {},   "created_at": "2026-09-29T15:18:49.399Z",   "updated_at": "2026-09-29T15:18:49.399Z",   "source_path": "SKILL.md",   "sub_skills": [],   "parent_app": null,-  "org": "adom"+  "org": "adom",+  "description": "Pick and run the right SPICE simulator from an AI thread: ngspice in the Ubuntu container by default, LTspice and PSpice for TI on a Windows host through Adom Bridge for vendor models, with the licensing limits of each.",+  "dependencies": {},+  "files": [+    "SKILL.md",+    "README.md",+    "package.json",+    "install.sh",+    "uninstall.sh",+    "skills/spice-choose/SKILL.md",+    "skills/spice-ngspice/SKILL.md",+    "skills/spice-ltspice/SKILL.md",+    "skills/spice-pspice-ti/SKILL.md",+    "skills/spice-vendor-models/SKILL.md",+    "skills/spice-portable-netlists/SKILL.md",+    "skills/spice-licensing/SKILL.md",+    "examples/buck_portable.cir",+    "examples/buck_portable_pspice.cir",+    "examples/sallen_key_ac.cir",+    "examples/csdf.py",+    "docs/ngspice-buck-transient.png",+    "docs/ngspice-monte-carlo.png",+    "docs/hero.png"+  ],+  "scripts": {+    "install": "./install.sh",+    "uninstall": "./uninstall.sh"+  } }\ No newline at end of file
skills/spice-choose/SKILL.mdadded+44
@@ -0,0 +1,44 @@+---+name: spice-choose+description: Decide which SPICE simulator to use for a job in the Adom ecosystem and where to run it (Ubuntu container, WSL2, Lima on Mac, a Windows host through Adom Bridge). Covers ngspice, Xyce, LTspice, QSPICE, PSpice and PSpice for TI with measured pros and cons, install weight and emulation layers. Trigger words - which simulator, which spice, ngspice or ltspice, pspice vs ltspice, best spice simulator, spice on mac, spice in wsl, spice in container, wine ltspice, simulator tradeoffs.+---++Parent skill: **adom-spice-skillpack**++# Choosing a SPICE engine++## Decision table++| Situation | Use | Why |+|---|---|---|+| Any circuit with plain-text models | ngspice in the container | Native Linux, headless, parallel, BSD licence, consistent results in our cross-checks |+| Big parameter sweeps or very large circuits | ngspice first; Xyce if ngspice is too slow | Xyce runs MPI-parallel but has no binaries: a Trilinos + Xyce source build of roughly an hour and several GB of build space |+| Vendor model encrypted for PSpice | PSpice for TI on a Windows host | Nothing else can run it |+| ADI / LT parts, or an LTspice-encrypted model | LTspice on a Windows host | Ships the ADI library; free |+| Hard switching-power convergence trouble in ngspice | Try LTspice on a Windows host | Its solver is tuned for SMPS |+| A dashboard other people use | ngspice only (or Xyce) | LTspice and PSpice EULAs forbid time-sharing or hosting |++## Layers per platform++| Setup | ngspice / Xyce | LTspice / QSPICE | PSpice |+|---|---|---|---|+| WSL2 container on a Windows PC | Native | Either Wine in the container (3 layers) or the Windows host through the bridge (no Wine) | Windows host only; does not run under Wine |+| Lima container on Apple Silicon | Native arm64 | Wine plus x86 emulation (4 to 5 layers, slow, fragile); LTspice has a native macOS build on the host; QSPICE has no Mac build | Not possible without a Windows machine or VM |+| Cloud | Native | Technically works under Wine, but LTspice's EULA bans time-sharing | Not possible |++Prefer the Windows host through the bridge over Wine. Wine adds 0.7 GB (minimal) to 2 GB (full) to every container and breaks when LTspice or Wine updates.++## Install weight (measured)++| Tool | Download | On disk |+|---|---|---|+| ngspice 42 (apt) | about 10 MB | 36 MB |+| ngspice 47 (source build, 4 min on 16 cores) | 13 MB source | 21 MB installed, 292 MB build tree (delete it) |+| Python venv with spicelib, PySpice, matplotlib | about 80 MB | 333 MB |+| Wine minimal / full (apt dry run) | 108 / 395 MB | 684 MB / 1.96 GB |+| LTspice 26 (Windows) | 187 MB MSI | 272 MB (150 MB program, 122 MB library fetched on first run) |+| PSpice for TI 23.1 (Windows) | 8.5 MB web installer, then about 1 GB | 7.2 GB (5.96 GB program, 1.23 GB `C:\cds_spb_home`) |++## QSPICE++Free and fast, Windows only, with a command-line mode. The installer is only handed out through a Qorvo lead form with a required marketing opt-in and a reCAPTCHA, so an agent cannot fetch it on its own. Treat it as optional.
skills/spice-licensing/SKILL.mdadded+26
@@ -0,0 +1,26 @@+---+name: spice-licensing+description: Licence terms that decide where each SPICE simulator may run in the Adom ecosystem - containers, VMs, parallel agent runs, hosted web dashboards for other users, commercial use - for ngspice, Xyce, LTspice, QSPICE, PSpice and PSpice for TI. Trigger words - spice licence, pspice license, pspice price, ltspice eula, can we host ltspice, spice dashboard licensing, commercial use spice, pspice for ti terms.+---++Parent skill: **adom-spice-skillpack**++# SPICE licensing (researched 2026-09-29)++Not legal advice. Where the EULA text could not be fetched it is marked.++| Tool | Licence | Containers / parallel agents | Hosted dashboard for other users |+|---|---|---|---|+| ngspice | BSD-3 (a few files LGPL/MIT/MPL/GPLv2) | yes | yes |+| Xyce | GPLv3 | yes | yes (GPL obligations if you distribute modified binaries) |+| LTspice | Free; ADI EULA | internal use yes; Windows or macOS only | **no**: EULA forbids "time-sharing or otherwise make available" to third parties; also forbids publishing benchmarks without ADI consent |+| QSPICE | Free; Qorvo staff say no restrictions, no formal EULA found | Windows only | unclear, ask Qorvo |+| PSpice (Cadence) | About USD 2.5k to 10k (Designer), 5k to 20k (Designer Plus); perpetual or term, node-locked or floating | Windows only, no Wine | treat as **no** without a Cadence agreement (EULA text not fetched, behind a challenge) |+| PSpice for TI | Free; TI access key per email, up to 3 machines, one-year term | Windows only, one seat per machine | **no**: use is limited to evaluating and designing with TI products; no bundling or transfer |++## What it means for Adom++- Every hosted Adom simulation dashboard runs on **ngspice** (or Xyce).+- LTspice and PSpice for TI stay on Windows hosts through the bridge, for internal checks by our own agents.+- Do not publish LTspice benchmark results (ADI consent required) or PSpice timing and tool-versus-tool comparisons (commercial EDA EULAs commonly restrict this; the Cadence text could not be checked). Qualitative notes on usability, install and automation are fine.+- ngspice and Xyce results may be published freely.
skills/spice-ltspice/SKILL.mdadded+44
@@ -0,0 +1,44 @@+---+name: spice-ltspice+description: Install and drive LTspice on a Windows host from an AI thread through Adom Bridge - silent per-user install with no admin, the hidden first-run usage-data dialog that hangs batch mode, running LTspice -b and reading .meas results from the .log. Trigger words - ltspice, run ltspice, ltspice batch, ltspice -b, install ltspice, ltspice on windows host, ltspice hangs, adi model, lt model.+---++Parent skill: **adom-spice-skillpack**++# LTspice on a Windows host++## Install (no admin)++```+curl.exe -sSL -o LTspice64.msi https://ltspice.analog.com/software/LTspice64.msi+msiexec /i LTspice64.msi /qn ALLUSERS=2 MSIINSTALLPERUSER=1 /l*v ltspice-install.log+```++Lands in `%LOCALAPPDATA%\Programs\ADI\LTspice\LTspice.exe`. `msiexec` returns before the install finishes; poll for the exe. The MSI is 187 MB; the program is 150 MB and it fetches a 122 MB component library on first run.++## The first-run trap++A fresh install shows **"Anonymously Share LTspice Usage Data"** on first launch. In batch mode the window is hidden, so `LTspice.exe -b` sits at 0 % CPU forever. Launch it once visibly, then answer through UI automation (background, no cursor):++```+desktop_ui_click {hwnd, contains:"No, do not send", role:"radiobutton"}+desktop_ui_click {hwnd, name:"OK", role:"button"}+```++Decline sharing: it is the privacy-safe default.++## Run++```+Start-Process LTspice.exe -ArgumentList "-b","C:\path\circuit.cir" -Wait+```++Results: `circuit.log` holds the `.meas` lines (`vavg: AVG(v(vout))=<value> FROM ...`) and the solver time. `circuit.raw` holds the waveforms (tens of MB for a few ms of a switching regulator). Read the `.log`; pull the `.raw` only when you need waveforms (spicelib reads it).++LTspice reads Linux line endings and the same `B` source, `SW` and `.meas` syntax as ngspice, so a portable netlist runs unchanged (see **spice-portable-netlists**).++## Bridge notes++- Pass scripts with `run_script` and `scriptB64` (base64 of the PowerShell body); inline quoting through `cmd` breaks paths.+- Send files larger than a few KB with `send_files`, not inside the script.+- A `run_script` that times out is killed together with the processes it started. Launch long jobs detached and poll.
skills/spice-ngspice/SKILL.mdadded+53
@@ -0,0 +1,53 @@+---+name: spice-ngspice+description: Run ngspice headless in the Adom Ubuntu container - batch runs, measurements in a .control block, parallel Monte Carlo across cores, building ngspice 47 with the shared library, and the parse traps that silently produce no data. Trigger words - ngspice, run ngspice, ngspice batch, ngspice meas, ngspice monte carlo, libngspice, build ngspice, ngspice 47, spicelib, pyspice, simulate in the container.+---++Parent skill: **adom-spice-skillpack**++# ngspice in the container++## Install++- Quick: `sudo apt-get install -y ngspice` gives ngspice 42 on Ubuntu 24.04 (36 MB).+- Current: build ngspice 47 from the SourceForge tarball. About 4 minutes on 16 cores, 21 MB installed. Build the CLI and the shared library as two configure runs:++```bash+../configure --prefix=$PREFIX --with-x --enable-xspice --enable-cider --enable-osdi --enable-openmp --enable-klu --with-readline=yes --disable-debug+../configure --prefix=$PREFIX --with-ngshared --enable-xspice --enable-cider --enable-osdi --enable-openmp --enable-klu --disable-debug+```++Install to its own prefix so it does not replace the apt ngspice other threads may rely on.++- Python: put spicelib, PySpice or InSpice in a **venv**. Installing spicelib with `pip --user` downgraded the system numpy from 2.5 to 1.26 and would have broken other projects.++## Run and measure++```bash+ngspice -b circuit.cir+```++Put measurements where they print as plain `name = value` lines:++```+.control+ac dec 200 10 100k+let mag=abs(v(out))+meas ac f3db when mag=0.70711+.endc+```++`.meas tran vavg AVG v(vout) FROM=2.5m TO=2.9m` style lines outside `.control` work for transient.++## Parallel Monte Carlo++Generate one netlist per run with toleranced `.param` values and run `ngspice -b` in a thread pool. Measured: 400 runs of a Sallen-Key filter took 3.1 s on 1 core and 0.6 s on 16.++## Traps (each cost a run)++- **Parameter names that match element names** (`.param R1=10k` next to element `R1`) broke the AC analysis with `no data saved`. Name parameters `pr1`, `pc1` and so on.+- **`vdb()` / `vm()` inside `.meas ac`** failed to parse in ngspice 42 (`can't parse 'vd'`). Compute the magnitude with `let` inside `.control` instead.+- **Ideal switching sources** (`B` source with a hard `? 1 : 0`) can crush the time step and turn a 2 s run into minutes. Use a smooth edge such as `0.5+0.5*tanh(200*(v(a)-v(b)))`.+- **An ideal error amplifier with no feedback path** swings to kilovolts and oscillates. That is a test-bench bug, not an ngspice bug: model the real error amp (a transconductance `G` into Rc, Cc, Cp, with clamps).+- **Encrypted vendor models do not run** (`$CDNENCSTART` lines give `Missing token`), even with `set ngbehavior=ps`. See **spice-vendor-models**.+- **Killing a stuck run**: use `pgrep -x ngspice`, never `pkill -f <pattern>` from the same shell. The pattern matches your own command line and kills or stops the shell.
skills/spice-portable-netlists/SKILL.mdadded+31
@@ -0,0 +1,31 @@+---+name: spice-portable-netlists+description: Write one SPICE netlist that runs in ngspice, LTspice and PSpice, and translate between dialects - B sources vs E VALUE, SW vs VSWITCH, .meas vs .PROBE, print syntax, switch thresholds - plus how to cross-check results between simulators. Trigger words - portable netlist, pspice syntax, ltspice syntax, ngspice syntax, convert netlist, b source pspice, vswitch, meas in pspice, cross-check simulators, same circuit different simulator.+---++Parent skill: **adom-spice-skillpack**++# Portable netlists++## Dialect table++| Feature | ngspice / LTspice | PSpice |+|---|---|---|+| Behavioral voltage | `Bx n 0 V=expr` | `Ex n 0 VALUE={expr}` |+| Clamp | `max(a,min(b,x))` | `LIMIT(x,a,b)` |+| Voltage switch model | `.model S SW(Ron= Roff= Vt= Vh=)` | `.model S VSWITCH(RON= ROFF= VON= VOFF=)` |+| Measurements | `.meas tran name AVG v(x) FROM= TO=` | none in batch; save traces and compute afterwards |+| Waveform text output | `wrdata` in `.control` (ngspice), `.raw` (LTspice) | `.PROBE/CSDF` |+| Node voltage in output | `v(vout)` | `V(Rprobe)` across a 1 G probe resistor (PSpice for TI, see **spice-pspice-ti**) |++Both ngspice and LTspice accepted Linux line endings; this was not the cause of the PSpice print errors.++## Switch thresholds are not identical++`SW` with `Vt=0.5 Vh=0` switches hard at 0.5 V. `VSWITCH` ramps its resistance between VOFF and VON. Translating one to the other changed switching-edge timing enough to add an isolated output glitch in one dialect that the others did not show. Steady-state values still agreed. Expect close agreement on averages, not identical waveforms.++## Cross-check recipe++1. Put the metrics in the netlist (ngspice, LTspice) or compute them from saved traces with the same windows (PSpice).+2. Compare averages and extremes over fixed windows. For ripple, measure over a few switching periods on a uniform resampled grid: over longer windows, slow wander and quantisation dominate.+3. On our reference buck the engines agreed closely on average output and load-step minimum once the netlist was translated carefully. Keep your own cross-check numbers in internal project notes: LTspice and PSpice licences restrict publishing benchmarks.
skills/spice-pspice-ti/SKILL.mdadded+41
@@ -0,0 +1,41 @@+---+name: spice-pspice-ti+description: Get, install and drive PSpice for TI on a Windows host through Adom Bridge to run TI's encrypted PSpice models - the myTI access key, the admin-only install that a person must finish, the missing batch runner, clicking Run, the V(node) print bug, the 1 to 4 trace limit with third-party models, and reading CSDF output. Trigger words - pspice, pspice for ti, ti pspice model, encrypted pspice model, run ti model, TPS model, webench model, psp_cmd, ORPSIM-16583, ORPSIM-15090, csdf.+---++Parent skill: **adom-spice-skillpack**++# PSpice for TI++Use it for one job: running a TI model that ships PSpice-encrypted, to check a design or validate a hand-built model. Internal use only (see **spice-licensing**).++## Access++1. Sign into myTI in a pup window (two-step login: account ID, Next, then password; the buttons are `ti-button` web components, so click the inner shadow `button`).+2. Request access at `https://www.ti.com/event/docs/accesseventaction.tsp?actionId=3228`. It is a U.S. export-control form that asks the user to certify their details: **ask the user before submitting it**.+3. The approval email from `[email protected]` carries a download link (valid 30 days) and an **access key**. The key is tied to the email and works on **up to 3 machines**. Never print the key in chat.++## Install (needs a person)++- The 8.5 MB `PSpice-For-TI_setup.exe` (Cadence-signed) needs **admin**. Adom Bridge never runs elevated, so:+  - `launch` fails with Windows error 740; `Start-Process` blocks on UAC and is killed with the script on timeout.+  - Launch it through `explorer.exe <path>` so the UAC prompt survives, and ask the user to click Yes.+- The sign-in window (email + access key) runs elevated, so bridge input is blocked by UIPI (`input_failed`). Put the key on the host clipboard with `desktop_clipboard_set` and ask the user to paste it; clear the clipboard afterwards.+- The installer then downloads about 1 GB and ends on a Setup Complete screen with a Finish button (also elevated). Total disk 7.2 GB.++## Running a simulation++- There is **no `psp_cmd.exe`** in this edition and no `-r` flag. `pspice.exe <file.cir>` opens the netlist in the editor without simulating.+- Click the **Run** toolbar button with `desktop_click` on a **full-screen** capture (`desktop_screenshot_screen`). Window captures miss PSpice's popups (a hidden "Run For" dialog swallowed one F11), and clicks computed from a window capture landed off target. UI automation cannot see the toolbar.+- The PSpice window launched by the bridge is not elevated, so these clicks work.++## Output traps++- `.PRINT TRAN V(vout)` and `.PROBE V(vout)` fail with `ORPSIM-15090: device vout is undefined`; `V(vout,0)` fails with `ORPSIM-16295`. Workaround: add a probe resistor `Rpv vout 0 1G` and save `V(Rpv)`.+- With more than one imported model containing transistors or diodes, PSpice for TI allows only **1 to 4 traces** (`ORPSIM-16583`). List them explicitly: `.PROBE/CSDF V(Rpv) I(L1) V(Rpsw)`.+- `.PROBE/CSDF` writes a text `.csd` file: a header, then `#C <time> <n>` records followed by `value:index` pairs (index in hex, 1-based over the `#N` name list). Values have 4 significant digits, so a 5 V node is quantised to 1 mV.+- Saving every node writes a very large text file and slows the job; save only the traces you need.++## Speed++A transistor-level vendor model of a switching regulator is slow: expect minutes to tens of minutes for a few milliseconds of switching. Use the vendor model to validate a design or a behavioral model once, not to iterate.
skills/spice-vendor-models/SKILL.mdadded+38
@@ -0,0 +1,38 @@+---+name: spice-vendor-models+description: Handle vendor SPICE models in the Adom flow - detect encrypted PSpice or LTspice models, know which simulator can run each, validate a fast hand-built behavioral model against the slow vendor model, and what never to do (decrypting). Trigger words - vendor model, encrypted model, $CDNENCSTART, ENCRYPTED_LIB, ti model, pspice model in ngspice, model won't load, behavioral model, validate model, spicecrypt, decrypt model.+---++Parent skill: **adom-spice-skillpack**++# Vendor models++## Detect encryption first++```bash+grep -m3 -E '\$CDNENCSTART|\*\*\$ENCRYPTED_LIB|\.prot' model.lib+```++| Model form | ngspice | LTspice | PSpice / PSpice for TI |+|---|---|---|---|+| Plain text PSpice syntax | usually, with `set ngbehavior=ps` in `.spiceinit` | usually | yes |+| PSpice encrypted (`$CDNENCSTART`) | no (`Missing token`) | no (`Expected device instantiation`) | yes |+| LTspice encrypted | no | yes | no |++Tested on TI's `TPS54202_TRANS.LIB` (45 encrypted blocks): fails in ngspice 42 and LTspice 26, runs in PSpice for TI.++## The workflow that works++1. Build a fast behavioral model of the part (switches with datasheet Rds(on), the error amp as gm + Rc/Cc/Cp, current sense, slope compensation) and iterate the design with it in ngspice.+2. Once, run the vendor model in PSpice for TI with identical external parts and load steps (**spice-pspice-ti**).+3. Compare the same metrics computed by the same code: output average and ripple, inductor ripple, startup peak current and time to 95 %, load-step overshoot, undershoot and settling.+4. Record both result sets next to the design. Label the behavioral model as fitted, and state how far it agrees with the vendor model.++## What the validation showed (qualitative)++On a TPS54202 12 V to 5 V buck, a hand-built peak-current-mode model agreed closely with TI's vendor model on startup (soft-start time, startup peak inductor current, overshoot) and on inductor ripple. Its load-step overshoot and undershoot were noticeably smaller than the vendor model's, and its output set point sat slightly lower (a reference-voltage difference). Lesson: a fitted behavioral model is good for startup and ripple, but treat its loop dynamics as optimistic until checked against the vendor model.++## Never++- Never decrypt a vendor model (for example with SpiceCrypt) to run it in another simulator. It very likely breaches the model licence.+- Ask the vendor for a plain-text or LTspice version instead; many vendors publish both.
uninstall.shadded+7
@@ -0,0 +1,7 @@+#!/usr/bin/env bash+set -e+DEST="$HOME/.claude/skills"+for s in adom-spice-skillpack spice-choose spice-ngspice spice-ltspice spice-pspice-ti spice-vendor-models spice-portable-netlists spice-licensing; do+  rm -rf "$DEST/$s"+done+echo "OK: Removed adom-spice-skillpack and its 7 bundled skills from $DEST/."