Skip to main content
ReviewFreeNewv1.0.0

KiCad 文件桥与寄生提取

KiCad S 表达式解析(花括号/C 转义、截断与嵌套守卫),.kicad_sch/.kicad_pcb 提取为 board-topology 网表与 BOM,按几何计算每网络走线/过孔寄生 R/L;离线契约报告。

Installs: 0Rating: –Updated:
Claude CodeCursorCodexGemini CLI+2

Badges only claim the demo-run passed on that host; cross-host installation is handled by the adapter layer.

Preview gallery

You say
Parse this KiCad schematic and PCB text: extract the netlist/BOM, compute parasitic R/L for the 20 mm VOUT trace and its via, and report the C1 missing-Value BOM risk.

Content matches the files inside the package; extracted by the publish pipeline.

LCEDA KiCad format bridge bundle

Offline Node rewrite of the reading cores of the MIT-licensed kicad-happy agent skills (see references/PROVENANCE.md): the KiCad S-expression parser (kicad_core/sexp.py) and the parasitic extraction math (skills/spice/scripts/extract_parasitics.py). Importing the design into 嘉立创EDA专业版 is a procedure in references/procedures.md.

What the script computes

scripts/demo.mjs (Node >= 20, no dependencies):

  • S-expression tokenizer/parser: quoted strings with KiCad's C-style escapes (\xHH/octal as UTF-8 bytes), {brace} escapes, line-start # comments, a 200-level nesting guard, and explicit problems for truncated files (never a silently partial tree).
  • Property access incl. KiCad 9+ (property private "Name" "Value").
  • .kicad_sch: symbols (Reference/Value/lib_id/at), wires, labels.
  • .kicad_pcb: net table, footprints with pads (absolute pad coords, net membership), segments (net/layer/width/endpoints), vias (drill).
  • board-topology/1.1 netlist: components with pins, nets with REF.PIN members, stats.
  • Per-net parasitics from geometry: trace R = ρL/(WT) (ρ_Cu = 1.68e-8 Ω·m), via barrel R = ρH/(π(r_out²−r_in²)) with 25 µm plating, via partial self-inductance L = (µ₀H/2π)ln(2H/D). Coupling capacitance C = ε₀εrLT/S is exported for parallel runs.

Run

node scripts/demo.mjs --out-dir <dir> [--input <bridge.json>]

Default input: scripts/fixtures/input.json. stdout is an edaskills.report.v1 report; <dir> receives topology.json, parasitics.csv, bom.csv.

Input shape: { "sch"?: "<kicad_sch text>", "pcb"?: "<kicad_pcb text>", "stackup"?: { "copperMm", "boardMm" } }.

When to use

  • Review a KiCad design (or a KiCad export from another tool) without installing KiCad: netlist, BOM completeness, per-net R/L budget.
  • Feed the topology into lceda-netlist-topology-export consumers or the parasitics into a SPICE testbench annotation.
  • Pre-check a KiCad→LCEDA migration: missing values/refs surface here before the import.

Not for: writing KiCad files (read-only bridge), zone/fill geometry, length tuning within a net's branches (series R is summed, not a distributed model), or DRC.

What you get

  • No KiCad install: read .kicad_sch/.kicad_pcb text into netlist, BOM, footprint/pad/net membership
  • board-topology/1.1 netlist JSON (same schema as the library netlist tool)
  • Per-net trace resistance, via barrel resistance and partial self-inductance CSV

Good fit for

  • Pre-migration health check before KiCad->LCEDA import: missing values/refs and truncated files surface early
  • Reviewing someone else's design without KiCad: netlist, BOM completeness, per-net R/L budget
  • Feeding parasitics into a SPICE testbench as series R/L annotations

Not for

  • Writing KiCad files (read-only bridge), zone geometry and DRC
  • Distributed models (per-net lumped sum, not a transmission line)
Before you start

You provide

  • .kicad_sch / .kicad_pcb file text (KiCad 6-9, at least one)
  • Optional stackup: copper mm (default 0.035), board mm (default 1.6)

Environment

  • node ≥ 20

Last tested

v1.0.0 · Claude Code, Cursor, Codex, Gemini CLI · Ran 2026/11/19

Dependencies

No dependencies
This skill works standalone.

Demo run

Passed with warnings0 errors · 1 warnings

node v24.19.0 · 2026/11/19

  • [info] SCH_EXTRACT (sch): 3 symbols, 1 wires, 1 labels
  • [info] PCB_EXTRACT (pcb): 3 footprints, 3 segments, 1 vias, 4 nets
  • [warning] VALUE_MISSING (C1): C1 has no Value property; BOM line will be incomplete
  • [info] NET_PARASITIC (VOUT): VOUT: 20.00 mm, trace 38.40 mOhm, 1 vias (0.91 mOhm, 0.665 nH)

FAQ

Ratings & reviews

Not rated0 ratings

5 star0
4 star0
3 star0
2 star0
1 star0

Sign in to rate this skill.

Sign in

Versions

  • v1.0.0Latest261.0 KB

    首发种子版本。

    License: MITSourceSHA-256: e43c552c406df5cc…

Related skills