← ClaudeAtlas

kicad-schematiclisted

Generate and modify KiCad schematics (.kicad_sch) and PCBs (.kicad_pcb) programmatically, with geometric verification, headless ERC, and rendered visual inspection. Use when asked to draw/implement/extend a schematic, inject circuit blocks into an existing KiCad project, stage footprints on a PCB, or verify schematic wiring/rotation. Trigger phrases: "draw in kicad", "create schematic", "implement schematic", "add to the schematic", "kicad_sch", "footprints on the pcb".
AvatarSD/KiSkill · ★ 0 · API & Backend · score 72
Install: claude install-skill AvatarSD/KiSkill
# KiCad schematic generation **Engine:** `$(kx root)/kicad_lib/` — lossless sexp parser (`sexp.py`, token-equal round-trip proven on 2.3 MB boards; byte-identity only for .kicad_mod — sch re-serializes with ~0.5% whitespace drift) and the `kx` CLI (`python3 -m kicad_lib.cli probe|check FILE` from the repo root). Prefer `kx probe` over ad-hoc grep for inventory; prefer `sexp.py` over regex surgery for edits (`kx` is on PATH via ~/.local/bin). Persist with `sexp.save_file(path, root)` — PATH FIRST. Python imports need PYTHONPATH=<repo> or cwd=<repo>; the package is not pip-installed. Sibling skills: kicad-project (state machine), kicad-component (find/fetch parts), kicad-review (diff/ERC), kicad-improve (self-improvement loop). Design: `doc/DESIGN.md` in that repo. Battle-tested workflow for writing `.kicad_sch`/`.kicad_pcb` files from Python without KiCad GUI. The engine and worked examples ship in this repo (`kx root`): - `kicad_lib/ops.py` — standalone sheet, scaffold symbols, full-wire layout, driven by the built-in geometric verifier (`kicad_lib/verify.py`). - `kicad_lib/live_ops.py` — inject a block into an EXISTING schematic using real library symbols (extends-flattening, multi-unit parts, mirrors), label-stitched islands. - `kicad_lib/pcb.py` — stage footprints in the PCB, path-linked to schematic symbols so Update-PCB adopts them. See `tests/test_*.py` for runnable end-to-end usage against `tests/fixtures/`. ## 0. The loop (never skip a stage) 1. **Probe