From ltspice
Use when working with LTspice circuits — opening, reading, editing, building, simulating, debugging, or visualizing .asc or .raw files; or any task involving SPICE simulation, circuit analysis, schematics, MOSFETs/BJTs/diodes in a simulation context.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ltspice:ltspice-circuitsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A complete workflow for reading, editing, building, simulating, and debugging LTspice circuits through a CLI wrapper around `spicelib` and LTspice's batch-mode runner.
A complete workflow for reading, editing, building, simulating, and debugging LTspice circuits through a CLI wrapper around spicelib and LTspice's batch-mode runner.
Activate this skill any time the task involves circuits or SPICE in a simulation context. Triggers include:
.asc (schematic) or .raw (waveform output) file..tran (transient), .ac (small-signal AC), .dc (DC sweep), .op (operating point), .noise, .tf (transfer function).Always invoke the CLI through Python:
py "${CLAUDE_PLUGIN_ROOT}/lib/ltspice_cli.py" <subcommand> [args]
| Subcommand | Purpose |
|---|---|
inspect <file.asc> | Print structured topology — components, values, nets, directives. |
sim <file.asc> | Run LTspice in batch mode (-b). Produces <file>.raw and <file>.log. |
signals <file.raw> | List every available signal (node voltages, branch currents) in the raw file. |
probe <file.raw> <sig> [--at T] | Return numeric samples for a signal. --at T returns the value at time T. |
op <file.asc> | Run a fresh .op on the schematic (strips other analysis directives) and print node voltages / device currents. |
plot <file.raw> <sig> [sig...] | Render the named signal(s) to a PNG. Returns the PNG path. |
open <file> | Open the file in its default Windows handler (LTspice for .asc/.raw). |
meas <file.log> [name] | Read .meas directive results from a simulation .log (omit name to list all). |
netlist <file.asc> [--out P] | Convert a schematic to a SPICE netlist (.net). |
| Subcommand | Purpose |
|---|---|
set-value <file.asc> <ref> <value> | Change the value of a component (e.g. R1 to 4.7k). |
set-directive <file.asc> <pattern> <new> | Replace a SPICE directive line matching pattern. |
| Subcommand | Purpose |
|---|---|
new <file.asc> | Create an empty schematic with the LTspice header. |
| `add-component [--rotation R0 | R90 |
add-wire <file> <x1> <y1> <x2> <y2> | Draw a wire segment between two coordinates. |
add-flag <file> <x> <y> <name> | Place a net label. name=0 is ground. |
add-directive <file> <text> | Add a SPICE directive (e.g. .tran 1m, .ac dec 10 1 1Meg, .step param R 1k 10k 1k). |
pins <symbol> | Print the pin offsets (relative to the component origin) for a given symbol. Use this before placing wires so you connect at the right coordinates. |
new-symbol <file.asy> <n_pins> | Generate a minimal .asy block symbol for a subcircuit. |
When given an existing .asc to debug or analyze:
inspect <file.asc> to learn the topology, component values, and existing directives. Never guess what's in a schematic — read it.sim <file.asc>. Check the exit code and skim the resulting .log for SPICE errors (convergence failures, missing models, syntax issues).signals <file.raw> to see what node voltages and branch currents are available. Signal names follow LTspice conventions: V(node) for node voltages, I(R1) for branch currents through a device.plot <file.raw> <sig> for each signal of interest, then Read the resulting PNG. This is the primary visualization path — Claude Code can see images, so a plot tells you far more than scalar numbers ever can.probe <file.raw> <sig> --at <time> to get exact numeric values at specific points (e.g. steady-state, peak, zero crossing).set-value for component tweaks (R, C, L, source amplitudes), set-directive for analysis parameter changes (e.g. switching .tran 1m to .tran 10m). Use add-component / add-wire / add-flag for structural changes.sim after any edit. A stale .raw file looks plausible but reflects the previous schematic — it lies silently. If you edit, you must re-sim before trusting any probe or plot output.When the user wants a circuit built from a natural-language description:
./circuits/ relative to the current working directory. Example: circuits/rc_lowpass.asc. This is important — the user can then double-click the file in File Explorer to open it in the LTspice GUI (the .asc extension is registered to LTspice on Windows).new circuits/<name>.asc.add-component, run pins <symbol> to get the pin offsets. You need them to compute the wire endpoint coordinates correctly. Misplaced wires that don't touch a pin produce floating nodes and silent simulation failures.add-component <file> <symbol> <x> <y> --ref <NAME> --value <V>. Use the LTspice coordinate convention (positive Y is down; grid units are 16 px). Lay components out on a grid so wires stay orthogonal.add-wire <file> <x1> <y1> <x2> <y2>. Endpoints must land on pin coordinates (component origin + pin offset from pins).add-flag <file> <x> <y> <name>. Use name=0 for ground (every analog circuit needs at least one ground reference). Use descriptive net names (VIN, VOUT, VDD) for nodes you'll probe later.add-directive <file> ".tran 1m" (transient), ".ac dec 10 1 1Meg" (AC sweep), ".dc V1 0 5 0.01" (DC sweep), or ".op" (operating point).sim, then plot the signals of interest, then Read the PNG.Always prefer plot + Read the PNG over numeric probe summaries when communicating what a signal is doing.
probe hide everything except the value at one instant. A circuit that looks fine at t=5ms might be ringing wildly between 1ms and 4ms.probe for precision (exact numeric answers like "what's V_OUT at steady state?") after you've understood the shape from a plot, not instead.Keep all schematics under ./circuits/ in whatever working directory the user is in. Two reasons:
.asc files are registered to LTspice on Windows (verified via the registry). The user can double-click any file in ./circuits/ in File Explorer and it opens immediately in the LTspice GUI for visual inspection.open subcommand. Use py ... ltspice_cli.py open <file> to launch the LTspice GUI on a file from the CLI. This is the right move when the user says "show me the schematic" or "let me see it in LTspice."The CLI auto-detects the LTspice executable (env vars LTSPICEEXECUTABLE/LTSPICEFOLDER, then the standard ADI / LTspice XVII / macOS install paths). Batch mode flag is -b — the sim subcommand handles this automatically.
For deeper detail on the .asc format, component symbols, analysis directives, or source syntax, consult these reference files bundled with the plugin (consult them when you need specifics that aren't in this skill):
${CLAUDE_PLUGIN_ROOT}/references/reference_ltspice_asc_format.md — full .asc file grammar, coordinate system, header conventions.${CLAUDE_PLUGIN_ROOT}/references/reference_ltspice_components.md — symbol library, pin offsets, default attributes.${CLAUDE_PLUGIN_ROOT}/references/reference_ltspice_analyses.md — every analysis directive (.tran, .ac, .dc, .noise, .tf, .four, .meas) with syntax and examples.${CLAUDE_PLUGIN_ROOT}/references/reference_ltspice_sources.md — voltage/current source syntax: PULSE, SIN, EXP, PWL, SFFM, AC.${CLAUDE_PLUGIN_ROOT}/references/reference_ltspice_directives.md — .param, .step, .func, .global, .inc, .lib, .model.${CLAUDE_PLUGIN_ROOT}/references/reference_ltspice_toolkit.md — the CLI wrapper internals, spicelib notes, raw-file structure..raw files lie silently. If you edit a .asc and forget to re-sim, every subsequent probe/plot reflects the old circuit. Re-sim after every edit. No exceptions..step param is active, signals shows one signal name but probe/plot returns N waveforms (one per step value). probe automatically reports every step; plot returns a multi-trace PNG (one curve per step value).pins <symbol> before computing wire endpoints. The pin offset is relative to the component's (x, y) origin and changes with rotation..inc and .lib paths must be absolute Windows paths with escaped backslashes. LTspice's directive parser doesn't expand ~ and doesn't tolerate forward slashes in include paths. Use a full path with double-backslashes inside directives, e.g. C:\\Users\\<you>\\models\\2N7000.LIB.0 (placed via add-flag <x> <y> 0). LTspice will refuse to converge without it. The inspect subcommand will surface this..log after every sim..asc looks like. Use inspect to read the real structure, or open to show the user the LTspice GUI.sim, then plot or probe, then report what the data actually says.ltspice pip package. Use spicelib (which is what this CLI wraps). The two have similar names but spicelib is the maintained, currently-correct library; the older ltspice package has incompatible APIs and known bugs around raw-file parsing.Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub jonathanliu1401/ltspice-plugin --plugin ltspice