Agent skill

Spice

by aklofas in aklofas/kicad-happy

Run automatic SPICE simulations on subcircuits detected from KiCad schematic analysis — validates filter frequencies, divider ratios, opamp gains, LC resonance, and crystal load capacitance.

MITAuto-check: notesMedia & Creative

Install Spice

skills CLI
$ npx skills add aklofas/kicad-happy --skill spice -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aklofas/kicad-happy spice --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aklofas/kicad-happy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/spice .claude/skills/spice && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spice
GitHub stars
1.4k
Used in
1 other repo
Token cost
~5.6k tokens
SKILL.md length
2,226 words
Files
13 (incl. scripts, references)
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Run automatic SPICE simulations on subcircuits detected from KiCad schematic analysis — validates filter frequencies, divider ratios, opamp gains, LC resonance, and crystal load capacitance.

  • Works in 3 steps: Run the schematic analyzer → Run SPICE simulations → Interpret results and present to user
  • The user asks to simulate
  • SKILL.md covers Related Skills, Requirements, Workflow and What Gets Simulated, plus 7 more sections
  • Runs Python scripts from its folder; calls python3, apt and brew

What it does

Spice is an agent skill from aklofas/kicad-happy. Run automatic SPICE simulations on subcircuits detected from KiCad schematic analysis — validates filter frequencies, divider ratios, opamp gains, LC resonance, and crystal load capacitance. Supports ngspice, LTspice, and Xyce (auto-detected). Generates testbenches, runs batch mode, produces structured pass/warn/fail report. Use when the user asks to simulate, verify, or validate any analog subcircuit — RC filters, LC filters, voltage dividers, opamp circuits, crystal oscillators. Also for "simulate my circuit"…

Its SKILL.md is about 5.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including scripts and reference files (for example `references/simulation-models.md`, `scripts/extract_parasitics.py` and `scripts/simulate_subcircuits.py`).

It sits in Media & Creative, covering Design review and critique. The repository describes itself as: AI coding agent skills for KiCad electronics design. Works with Claude Code and OpenAI Codex. Analyze schematics, review PCB layouts, EMC pre-compliance, SPICE simulation… The licence is MIT.

When your agent uses it

  • The user asks to simulate
  • Validate any analog subcircuit — RC filters
  • Voltage dividers
  • Crystal oscillators

Example prompts

  • “simulate my circuit”
  • “run spice”
  • “verify with simulation”
  • “/spice”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Run the schematic analyzer
  2. Run SPICE simulations
  3. Interpret results and present to user

What it can do on your machine

Read from SKILL.md and the folder at commit 0684046. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 11 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • apt
    • brew

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Spice loads about 5.6k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 206 tokens; SKILL.md has 2,226 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~206
When it runs · the whole SKILL.md, loaded when a task matches
~5.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:39
    - **ngspice** — `sudo apt install ngspice` (Linux) / `brew install ngspice` (macOS) / ngspice.sourceforge.io (Windows)

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from aklofas/kicad-happy at commit 0684046, republished under its MIT licence (© aklofas). 2,226 words, ~5,573 tokens.

Download SKILL.mdSave it as .claude/skills/spice/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.
name
spice
description
Run automatic SPICE simulations on subcircuits detected from KiCad schematic analysis — validates filter frequencies, divider ratios, opamp gains, LC resonance, and crystal load capacitance. Supports ngspice, LTspice, and Xyce (auto-detected). Generates testbenches, runs batch mode, produces structured pass/warn/fail report. Use when the user asks to simulate, verify, or validate any analog subcircuit — RC filters, LC filters, voltage dividers, opamp circuits, crystal oscillators. Also for "simulate my circuit", "run spice", "verify with simulation", "check my filter cutoff", "does this divider give the right voltage", "what's the bandwidth of this opamp stage". Consider suggesting simulation during design reviews when the schematic analyzer reports simulatable subcircuits and a SPICE simulator is available.

SPICE Simulation Skill

Automatically generates and runs SPICE testbenches for circuit subcircuits detected by the kicad skill's schematic analyzer. Supports ngspice, LTspice, and Xyce (auto-detected). Validates calculated values (filter frequencies, divider ratios, opamp gains) against actual simulation results and produces a structured report.

This skill inverts the typical simulation workflow: instead of requiring users to create simulation sources and configure analysis (which ~2.5% of KiCad users do), it generates targeted testbenches automatically from the analyzer's subcircuit detections.

SkillPurpose
kicadSchematic/PCB analysis — produces the analyzer JSON this skill consumes
digikeyParametric specs for behavioral models, datasheet downloads
mouserParametric specs (secondary source), datasheet downloads
lcscParametric specs (no auth needed), datasheet downloads
element14Parametric specs (international), datasheet downloads
emcEMC pre-compliance — uses this skill's simulator infrastructure for SPICE-enhanced PDN impedance and EMI filter analysis

Handoff guidance: The kicad skill's analyze_schematic.py produces the analysis JSON with subcircuit detections in the flat findings[] array (filtered by detector field). This skill reads that JSON, generates SPICE testbenches for simulatable subcircuits, runs the detected simulator (ngspice/LTspice/Xyce), and produces a structured verification report. Always run the schematic analyzer first. During a design review, run simulation after the analyzer and before writing the final report — simulation results should appear as a verification section in the report. The emc skill reuses this skill's simulator backend for SPICE-enhanced PDN impedance and EMI filter insertion loss checks — when ngspice is available, the EMC skill's --spice-enhanced flag activates these checks automatically.

Requirements

  • A SPICE simulator — one of the following (auto-detected, first available wins):
    • ngspice — sudo apt install ngspice (Linux) / brew install ngspice (macOS) / ngspice.sourceforge.io (Windows). Most common choice.
    • LTspice — free from analog.com/ltspice. Popular on Windows, works via wine on Linux.
    • Xyce — from xyce.sandia.gov. Parallel SPICE for large circuits.
    • Override with --simulator ngspice|ltspice|xyce or SPICE_SIMULATOR env var.
  • Python 3.10+ — stdlib only, no pip dependencies
  • Schematic analyzer JSON — from analyze_schematic.py --output

If no simulator is installed, skip simulation gracefully and note it in the report. Do not treat a missing simulator as an error — it's an optional enhancement.

Workflow

Step 1: Run the schematic analyzer
bash
python3 <kicad-skill-path>/scripts/analyze_schematic.py design.kicad_sch --analysis-dir analysis/
Step 2: Run SPICE simulations

Pass --analysis-dir analysis/ — the script auto-resolves schematic.json from the manifest's current run, writes spice.json into the same run folder, and parks intermediate .cir / .raw files at <run>/spice_work/ by default.

bash
# Recommended: auto-resolve schematic + write spice.json into the current run
python3 <skill-path>/scripts/simulate_subcircuits.py --analysis-dir analysis/

# Explicit form — positional or --schematic path
python3 <skill-path>/scripts/simulate_subcircuits.py analysis.json --output sim_report.json

# Simulate specific types only
python3 <skill-path>/scripts/simulate_subcircuits.py --analysis-dir analysis/ --types rc_filters,voltage_dividers

# Keep simulation files for debugging (default: <run>/spice_work/ when --analysis-dir is set, else a temp dir)
python3 <skill-path>/scripts/simulate_subcircuits.py --analysis-dir analysis/ --workdir ./spice_runs

# Increase timeout for complex circuits (default: 5s per subcircuit)
python3 <skill-path>/scripts/simulate_subcircuits.py --analysis-dir analysis/ --timeout 10

# Omit file paths from output (cleaner for reports)
python3 <skill-path>/scripts/simulate_subcircuits.py --analysis-dir analysis/ --compact
Step 2b (optional): PCB parasitic-aware simulation

When both schematic and PCB exist, run parasitic-annotated simulation for more accurate results on analog circuits:

bash
# Analyze PCB with full trace segment detail
python3 <kicad-skill-path>/scripts/analyze_pcb.py design.kicad_pcb --full --output pcb.json

# Extract parasitic R/L/C from PCB geometry
python3 <skill-path>/scripts/extract_parasitics.py pcb.json --output parasitics.json

# Run simulation with PCB parasitics injected into testbenches
python3 <skill-path>/scripts/simulate_subcircuits.py analysis.json --parasitics parasitics.json --output sim_report.json

With --parasitics, testbenches include trace resistance and via inductance between components. The report shows the parasitic impact — e.g., "48mΩ trace resistance shifts RC filter fc down 0.3%."

When to use parasitic simulation: Consider it when the design has high-impedance feedback networks (>100kΩ), LC filters or RF matching networks, long analog signal traces, or high-frequency circuits where trace inductance matters. For typical digital designs with low-impedance power regulation, the ideal simulation is sufficient.

Step 2c (optional): Monte Carlo tolerance analysis

Run N simulations per subcircuit with randomized component values within tolerance bands. Reports statistical distributions and sensitivity analysis — which component contributes most to output variation.

bash
# Run 100 Monte Carlo trials per subcircuit
python3 <skill-path>/scripts/simulate_subcircuits.py analysis.json --monte-carlo 100 --output sim_report.json

# Use uniform distribution (conservative worst-case envelope) instead of Gaussian
python3 <skill-path>/scripts/simulate_subcircuits.py analysis.json --monte-carlo 100 --mc-distribution uniform

# Set random seed for reproducibility (default: 42)
python3 <skill-path>/scripts/simulate_subcircuits.py analysis.json --monte-carlo 100 --mc-seed 123

Tolerance sourcing: Tolerances are extracted from component value strings first (e.g., "680K 1%" → 1%, "22uF/6.3V/20%/X5R" → 20%). When not specified in the value string, defaults are used: resistors 5%, capacitors 10%, inductors 20%.

Output: Each simulation result gains a tolerance_analysis section with:

  • statistics: mean, std, min, max, 3-sigma bounds, spread percentage for the primary output metric (fc, Vout, gain, etc.)
  • sensitivity: per-component contribution percentage showing which component dominates variation (e.g., "C3 (10% tol) contributes 68% of fc variation, R5 (5% tol) contributes 32%")
  • components: list of toleranceable components with their resolved tolerance values

When to use Monte Carlo: Use it for feedback networks (regulator output accuracy), precision voltage dividers, RC/LC filters near spec limits, and any circuit where tolerance stacking could push behavior outside acceptable bounds. For N=100 at ~5-50ms per simulation, expect ~0.5-5s per subcircuit.

Step 3: Interpret results and present to user

Read the JSON report and incorporate findings into the design review. See the "Interpreting Results" and "Presenting to Users" sections below.

What Gets Simulated

The script selects subcircuits from the analyzer's findings[] array (grouped by detector type). Not every detection is simulatable — the script skips configurations that can't produce meaningful results (comparators, open-loop opamps, active oscillators).

DetectorAnalysisWhat's MeasuredModel FidelityTrustworthiness
rc_filtersAC sweep-3dB frequency, phase at fcExact (ideal passives)High — mathematically exact
lc_filtersAC sweepResonant frequency, Q factor, bandwidthNear-exact (ideal L/C + ESR)High — small Q error from ESR
voltage_dividersDC operating pointOutput voltage, error %Exact (ideal passives)High — unloaded
feedback_networksDC operating pointFB pin voltage, regulator VoutExact (ideal passives)High — cross-refs power_regulators
opamp_circuitsAC sweepGain, -3dB bandwidthPer-part or idealHigh with behavioral model, medium with ideal
crystal_circuitsAC impedanceLoad capacitance validationApproximate (generic BVD)Medium
transistor_circuitsDC sweepThreshold voltage, on-state currentApproximate (generic FET/BJT)Medium
current_senseDC operating pointCurrent at 50mV/100mV dropExact (ideal resistor)High
protection_devicesDC sweepDiode presence, clamping onsetApproximate (generic diode)Low
decoupling_analysisAC impedancePDN impedance profileExact + ESR estimatesHigh for passives
power_regulatorsDC operating pointFeedback divider VoutExact (ideal passives)High
rf_matchingAC sweepMatching network resonanceExact (ideal L/C)High
bridge_circuitsDC sweepFET switching verificationApproximate (generic)Medium
snubber_circuitsAC impedanceSnubber damping frequencyExact (ideal R/C)High
rf_chainsGain budgetPer-stage gain/loss estimateHeuristicLow — role-based
bms_systemsDC operating pointCell balance resistor validationExactHigh
inrush_analysisTransientInrush current profileApproximateMedium
What is NOT simulated
  • Comparators / open-loop opamps — no feedback network to validate, skipped
  • Active oscillators — self-contained modules, nothing to verify externally
  • Regulator control loop stability — requires full compensator model (behavioral models cover DC feedback only)
  • Level-shifter FETs — require modeling both FETs together, skipped
  • High-side power switches — source and drain both on power rails, need full load context
  • Fuses and varistors — require manufacturer-specific models
  • Anything without parsed component values — if parse_value() couldn't extract R/C/L values, the detection is skipped

Output Format

json
{
  "summary": {"total": 5, "pass": 3, "warn": 1, "fail": 0, "skip": 1},
  "simulation_results": [
    {
      "subcircuit_type": "rc_filter",
      "components": ["R5", "C3"],
      "filter_type": "low-pass",
      "status": "pass",
      "expected": {"fc_hz": 15915, "type": "low-pass"},
      "simulated": {"fc_hz": 15878, "phase_at_fc_deg": -0.78},
      "delta": {"fc_error_pct": 0.23},
      "cir_file": "/tmp/spice_sim_xxx/rc-filter_R5_C3.cir",
      "log_file": "/tmp/spice_sim_xxx/rc-filter_R5_C3.log",
      "elapsed_s": 0.004
    }
  ],
  "workdir": "/tmp/spice_sim_xxx",
  "total_elapsed_s": 0.032,
  "simulator": "ngspice"
}

Status values and what they mean:

StatusMeaningAction
passSimulation confirms the analyzer's detection within toleranceReport as confirmed. No action needed.
warnSimulation shows something worth noting — small deviation, model limitation, or edge caseReport with context. Often the "warn" reflects a real but minor issue (e.g., slight gain error from ideal opamp model).
failSimulation contradicts the analyzer — wrong frequency, large gain error, unexpected behaviorInvestigate. Could be a real design issue, a topology misdetection by the analyzer, or a testbench generation bug. Check the .cir file and log.
skipCould not simulate — missing data, unsupported configuration, simulator errorNote in report. Check the note field for the reason.

Interpreting Results

Passive circuits (RC filters, LC filters, voltage dividers)

These simulations use ideal component models, so the simulation is mathematically exact. Any significant deviation (>1%) from the analyzer's calculated value indicates a bug in either:

  • The analyzer's topology detection (e.g., it misidentified which net is input vs output)
  • The testbench generation (topology reconstruction error)
  • The analyzer's value parsing (component value parsed incorrectly)

In testing across real projects, passive simulations consistently show <0.3% error — essentially confirming the analyzer's math is correct. A "pass" here means the calculated cutoff frequency, resonant frequency, or divider ratio is accurate.

What these simulations do NOT tell you: Whether the real circuit behaves this way. The simulation uses ideal isolated subcircuits without loading from downstream stages, PCB parasitics, or temperature effects. A voltage divider that simulates perfectly at 1.65V may actually produce 1.62V when loaded by a high-impedance ADC input — but that loading effect is real circuit behavior, not an analyzer error.

Opamp circuits

For recognized parts (~100 common opamps in the lookup table), the skill uses a per-part behavioral model with the correct GBW, slew rate, input offset, and output swing. For unrecognized parts, it falls back to the ideal model (Aol=1e6, GBW=10MHz).

The model_note field in the report indicates which model was used:

  • "LM358 behavioral (lookup:LM358, GBW=1.0MHz)" — per-part model, bandwidth results are accurate
  • "ideal opamp (Aol=1e6, GBW~10MHz)" — fallback, bandwidth results are approximate

When the behavioral model is used, the simulation correctly captures bandwidth limitations. An LM358 at gain=-100 shows bandwidth of ~10 kHz (correct for 1 MHz GBW), while the ideal model would misleadingly report ~100 kHz.

For opamps with behavioral models, gain-bandwidth limitation warnings are informational — they flag where the part's GBW constrains the circuit. These are valuable design insights, not simulation errors.

Show full SKILL.md (835 more words)Show less
Crystal circuits

Crystal simulations validate load capacitor selection — they check that the effective load capacitance is in a reasonable range for the crystal's specified CL. They use a generic Butterworth-Van Dyke equivalent circuit model with typical parameters, not the specific crystal's data. The primary value is catching missing or grossly wrong load capacitors, not precise frequency prediction.

When simulations fail or skip

Check the note field first. Common causes:

NoteCauseFix
"could not measure -3dB frequency"AC sweep range doesn't include the -3dB pointCheck if the filter fc is very low (<0.1 Hz) or very high (>100 MHz)
"AC measurement failed"Testbench topology error — the circuit doesn't convergeCheck .cir file for floating nodes or missing connections
"Testbench generation failed: KeyError"Analyzer detection is missing expected fieldsCheck analyzer JSON — the detection may be incomplete
"ngspice/ltspice/xyce failed: ..."Simulator errorCheck .log file for error messages

When debugging, use --workdir to preserve simulation files. The .cir file is a standard SPICE netlist that can be run manually (ngspice -b file.cir, or opened in LTspice/Xyce). The .log file contains simulator stdout/stderr.

Presenting Results to Users

When incorporating simulation results into a design review report, follow this pattern:

For passing simulations (confidence builders)
### RC Filter R5/C3 (fc=15.9kHz lowpass) -- Confirmed
Simulated fc=15.9kHz, <0.3% from calculated. Phase=-45 deg at fc as expected.

Keep passing results brief — they confirm what the analyzer already reported. Group them if there are many.

For warnings (context required)
### Opamp U4A (inverting gain=-10)
Simulated gain=20.0dB at 1kHz, matching expected -10x. Bandwidth 98.8kHz
(ideal model). Note: LM358 GBW is ~1MHz, so actual bandwidth would be
~100kHz — verify signal frequency stays below 85kHz for <1dB gain error.
For failures (investigation needed)
### RC Filter R12/C8 -- MISMATCH
Simulated fc=3.2kHz vs expected 15.9kHz (80% deviation). This likely indicates
the analyzer misidentified the filter topology — R12 may be serving a different
purpose (pull-up, not series filter element). Manually verify the circuit
around R12/C8 in the schematic.
For skips (note the gap)
### Crystal Y1 (32.768kHz) -- Not simulated
Active oscillator module — no external load caps to validate.
Summary line for the simulation section
## Simulation Verification (4 pass, 1 warn, 0 fail, 1 skip)
Verified 5 subcircuits in 0.03s. All passive circuits confirmed.
One opamp result requires interpretation (see U4A above).

Model Accuracy Reference

For detailed information about the behavioral models used, their accuracy envelopes, and known limitations, read references/simulation-models.md. Consult this reference when:

  • A user questions the accuracy of a simulation result
  • An opamp or crystal simulation shows unexpected behavior
  • You need to explain what "ideal model" means in concrete terms

Script Reference

ScriptPurpose
scripts/simulate_subcircuits.pyMain orchestrator — CLI entry point, reads JSON, generates testbenches, runs simulator, produces report
scripts/spice_templates.pyTestbench generators per detector type — one function per detector name
scripts/spice_models.pyBehavioral model definitions (ideal opamp, generic semiconductors), net sanitization, engineering notation formatting
scripts/spice_results.pySimulation output parsing and per-type evaluation with pass/warn/fail/skip logic
scripts/spice_simulator.pySimulator backends — ngspice, LTspice, Xyce auto-detection and batch execution
scripts/spice_part_library.pyLookup table of electrical specs for ~100 common opamps, LDOs, comparators, voltage references, crystal drivers
scripts/spice_model_generator.pyParameterized behavioral .subckt generation from specs dicts
scripts/spice_model_cache.pyProject-local model cache in spice/models/ next to the schematic
scripts/spice_spec_fetcher.pyQueries distributor APIs (LCSC, DigiKey, element14, Mouser), structured datasheet extractions, and PDF regex for parametric specs
scripts/extract_parasitics.pyCompute trace R, via L, coupling C from PCB analysis JSON

Per-Part Behavioral Models

When the analyzer detects an opamp with a recognized MPN (e.g., LM358, TL072, MCP6002), the skill uses a per-part behavioral model instead of the generic ideal opamp. The model captures the actual GBW, slew rate, input offset, and output swing from the part's datasheet.

Model resolution cascade:

  1. Project cache (<project>/spice/models/) — previously resolved models
  2. v1.4 typed datasheet facts — via lookup(mpn, cache_dir=<project>/datasheets/extracted) from the datasheets skill. Returns DatasheetFacts with opamp.gbw, opamp.slew_rate, etc. as SpecValue instances with trust gating. Recommended source when present.
  3. Distributor API specs — queries LCSC (no auth), DigiKey, element14, Mouser for real parametric data
  4. v1.3 structured datasheet extraction — reads pre-extracted specs from <project>/datasheets/extracted/ (legacy dict-shaped JSON, scored for quality). Dual-read compat path; still consulted when v1.4 cache misses.
  5. Datasheet PDF regex extraction — reads from <project>/datasheets/, extracts via text pattern matching (last resort)
  6. Built-in lookup table — ~100 common parts as offline fallback
  7. Ideal model fallback — if the MPN isn't recognized by any source

The model_note field in the report indicates which model was used: "LM358 behavioral (lookup:LM358, GBW=1.0MHz)" vs "ideal opamp (Aol=1e6, GBW~10MHz)".

Models are cached project-locally in a spice/ directory alongside the schematic files (same pattern as datasheets/). This keeps models co-located with the design and handles board revisions and subprojects naturally.

Known Limitations

  • Voltage dividers are simulated unloaded. The analyzer's ratio is R_bot/(R_top+R_bot) without loading. Adding a load resistor would make the simulation more "real" but would create false "errors" relative to the analyzer's calculated value. The purpose is to validate the calculation, not model the full circuit.
  • LC filter Q factor uses estimated inductor ESR. A default Q=100 is assumed for the inductor. Real inductor Q varies from 10 (power inductors) to 300+ (RF inductors). The resonant frequency is accurate regardless of Q.
  • Opamp supply rails are inferred from net names. May default to +/-5V if the power nets aren't labeled with voltage. Single-supply designs are detected when only VCC is found (VEE defaults to 0V).
  • Per-part models cover ~100 common parts. Uncommon opamps/LDOs fall back to ideal models. The lookup table can be extended by adding entries to spice_part_library.py.
  • High-gain opamp circuits with realistic GBW may show lower-than-expected gain at the 1 kHz measurement point when bandwidth is limited. This is physically correct behavior (the model correctly captures the GBW limitation) but may need lower-frequency measurement for accurate gain comparison.
  • Net names from the analyzer may be __unnamed_N. These are KiCad internal net names for unlabeled wires. They work correctly in simulation but make .cir files less readable.

© aklofas, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 12 other files (scripts, references) in skills/spice of aklofas/kicad-happy.

  • SKILL.md
  • references/simulation-models.md
  • scripts/extract_parasitics.py
  • scripts/simulate_subcircuits.py
  • scripts/spice_model_cache.py
  • scripts/spice_model_generator.py
  • scripts/spice_models.py
  • scripts/spice_part_library.py
  • scripts/spice_results.py
  • scripts/spice_simulator.py
  • scripts/spice_spec_fetcher.py
  • scripts/spice_templates.py
  • scripts/spice_tolerance.py

Open the folder on GitHubat commit 0684046

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in aklofas/kicad-happy, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Spice next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Spice compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spice this skillaklofas/kicad-happy1.4k1 repos~5.6kAutomated safety check: NotesMIT
Consult ClaudeEpicenterHQ/epicenter4.8k—~2kAutomated safety check: PassCustom licence
System Atlasinkboard/system-atlas429—~2.3kAutomated safety check: PassMIT
Design Image Studiokangarooking/design-image-studio102—~1.5kAutomated safety check: PassMIT
Kicad Reviewmixelpixx/Konnect917—~3.2kAutomated safety check: PassAGPL-3.0
Design AuditUniClipboard/UniClipboard1.9k—~554Automated safety check: PassAGPL-3.0

Similar skills

  • Consult Claude

    EpicenterHQ/epicenter

    Assign Claude Code a read-only investigation, recommendation, or finished text draft.

    4.8k GitHub stars~2k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • System Atlas

    inkboard/system-atlas

    Build and maintain an explorable, progressively-disclosed isometric "atlas" of a system's architecture — an interactive page (hover to read, click to pin, go inside for steps, moving data packets…

    429 GitHub stars~2.3k tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed
  • Design Image Studio

    kangarooking/design-image-studio

    Directly generate design-oriented AI images with strong creative direction and prompt engineering.

    102 GitHub stars~1.5k tokensUpdated 5 mo ago
    Media & CreativeAuto-check passed
  • Kicad Review

    mixelpixx/Konnect

    Design review and validation workflow for KiCAD projects via MCP tools.

    917 GitHub stars~3.2k tokensUpdated 3 days ago
    Media & CreativeAuto-check passed
  • Design Audit

    UniClipboard/UniClipboard

    定期审计代码库的工程设计问题(高心智复杂度、单一真相源被破坏、catch-all 胖接口、死代码、散落魔法字面量、泄漏抽象、资源生命周期靠环形缓冲)与可优化点,范围限定为自上次审计以来的 git churn,每条发现都落到 file:line 并对照本项目自己的 VISION.md / 各级 AGENTS.md / memory…

    1.9k GitHub stars~554 tokensUpdated today
    Media & CreativeAuto-check passed
  • L1 AI Design Review

    PaperMoonuu/Design-workflow-skills

    L1 × AI 设计评审:对已完成的单页、局部 UI 设计稿进行小型迭代评审,识别影响面、状态遗漏、文案与一致性风险,并给出 P0/P1/P2 建议和验收清单。用户提供 Figma 链接、截图、前后设计稿或可评审原型,并要求设计走查、风险评审或开发前 UI 检查时使用;不用于设计前方案预检、完整多页面流程或 L2 开发交付。

    316 GitHub stars~492 tokensUpdated 17 days ago
    Media & CreativeAuto-check passed

More from aklofas/kicad-happy

All 11 skills in this repo
  • Datasheets

    aklofas/kicad-happy

    Extract structured specifications from electronic component datasheet PDFs — pinouts, electrical characteristics, peripherals, topology, and features.

    1.4k GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • Emc

    aklofas/kicad-happy

    EMC pre-compliance risk analysis for KiCad PCB designs — 18 check categories, 44 rule IDs covering ground planes, decoupling, I/O filtering, switching harmonics, clock routing, differential pair…

    1.4k GitHub starsUsed in 1 repo~2.8k tokens
    Auto-check passed
  • Bom

    aklofas/kicad-happy

    BOM (Bill of Materials) management for electronics projects — the workflow skill that coordinates DigiKey, Mouser, LCSC, element14, JLCPCB, PCBWay, and KiCad skills around a unified BOM lifecycle.

    1.4k GitHub starsUsed in 1 repo~5.5k tokens
    Auto-check passed
  • Digikey

    aklofas/kicad-happy

    Search DigiKey for electronic components and download datasheets — primary source for prototype orders and the preferred API method for fetching datasheets.

    1.4k GitHub starsUsed in 1 repo~4.5k tokens
    Auto-check passed
  • Element14

    aklofas/kicad-happy

    Search Newark, Farnell, and element14 for electronic components — find parts by MPN or distributor part number, check pricing/stock, download datasheets, analyze specifications.

    1.4k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Kicad

    aklofas/kicad-happy

    Analyze KiCad projects and PDF schematics: schematics, PCB layouts, Gerbers, footprints, symbols, netlists, and design rules.

    1.4k GitHub starsUsed in 1 repo~20k tokens
    Auto-check passed

Questions about Spice

What does Spice do?

Run automatic SPICE simulations on subcircuits detected from KiCad schematic analysis — validates filter frequencies, divider ratios, opamp gains, LC resonance, and crystal load capacitance. Spice is an agent skill from aklofas/kicad-happy. Run automatic SPICE simulations on subcircuits detected from KiCad schematic analysis — validates filter frequencies, divider ratios, opamp gains, LC resonance, and crystal load capacitance.

When should I use Spice?

Spice fits situations like: the user asks to simulate; validate any analog subcircuit — RC filters; voltage dividers; crystal oscillators.

How do I install Spice in Claude Code?

Run `npx skills add aklofas/kicad-happy --skill spice -a claude-code`. Or copy the skill folder (skills/spice in aklofas/kicad-happy) into .claude/skills/spice in your project. Claude Code loads it when a task matches its description.

How do I install Spice in Codex?

Run `npx skills add aklofas/kicad-happy --skill spice -a codex`. Or copy the skill folder (skills/spice in aklofas/kicad-happy) into .agents/skills/spice in your project. Codex loads it when a task matches its description.

Can I use Spice in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aklofas/kicad-happy --skill spice -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spice, .gemini/skills/spice, .github/skills/spice and .opencode/skills/spice in your project.

What does Spice need to run?

Going by SKILL.md and its folder, Spice needs Python for the scripts in its folder and the command-line tools its instructions call (python3, apt and brew). Our summary lists: Python 3.

Does Spice access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Spice safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Spice use?

Spice is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spice use?

About 5.6k tokens (SKILL.md is roughly 22k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5k tokens, read only when the agent opens those files.

What are the alternatives to Spice?

Skills that share tags, products or a category with Spice: Consult Claude (EpicenterHQ/epicenter, 4.8k stars), System Atlas (inkboard/system-atlas, 429 stars), Design Image Studio (kangarooking/design-image-studio, 102 stars) and Kicad Review (mixelpixx/Konnect, 917 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spice?

aklofas (a GitHub user) maintains it in aklofas/kicad-happy, which has 1,356 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 6, 2026.

Source: aklofas/kicad-happy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.