Deep skills for coding agents that need to work in KiCad.
ki-stack is a skill-first KiCad automation stack for agents like Claude Code, Codex, and OpenCode. Instead of forcing the model through a giant pile of tiny domain-specific tools, it teaches the model how to use the real, expressive action space it already has:
kicad-pythonfor live IPC automationkicad-clifor render, export, DRC, and ERCkiutils-rsfor structural offline file surgery
The result is a stack that is closer to a KiCad operating manual for coding agents than a brittle tool zoo.
KiCad tasks are open-ended.
Agents do better when they can:
- write code
- inspect live state
- render artifacts for vision
- run checks
- recover and reroute when one path fails
They do worse when intelligence is pre-sliced into dozens or hundreds of tiny atomic verbs.
ki-stack is built around that idea.
-
ki-stack-renderRender schematics, PCBs, symbols, and footprints into SVG, PDF, PNG, and JPEG workflows. -
ki-stack-liveUse the official Python IPC bindings as the main live action space. -
ki-stack-file-surgeryDo deterministic structural file edits withkiutils-rs. -
ki-stack-verifyProve changes with render-after-edit, DRC, ERC, and evidence-first reporting.
ki-stack-pcbki-stack-schematicki-stack-symbolski-stack-footprints
These compose the Phase 1 substrate skills into domain-specific workflows.
skills/ki-stack/
ETHOS.md
bin/
references/
templates/
examples/
ki-stack-render/
ki-stack-live/
ki-stack-file-surgery/
ki-stack-verify/
ki-stack-pcb/
ki-stack-schematic/
ki-stack-symbols/
ki-stack-footprints/
docs/
- G-Stack-style skill structure: discoverability, shared ethos, shared preamble mindset, helper scripts, references, templates, and phased workflows
- real helper scripts for
kicad-cli, DRC/ERC JSON, project discovery, SVG-to-PNG conversion, andkiutils-inspect - copy-paste Python IPC examples for common board tasks
- domain skills layered on top of substrate skills instead of duplicating raw primitive guidance
- KiCad installed with
kicad-cli - Python 3
- Rust toolchain for
kiutils-rsworkflows - optionally
kicad-pythoninstalled:
pip install kicad-pythonskills/ki-stack/bin/kicad-cli-path
skills/ki-stack/bin/kicad-version
skills/ki-stack/bin/kicad-python-smoke
skills/ki-stack/bin/ki-stack-versionOpenCode discovers skills from directories like ~/.config/opencode/skills/<name>/SKILL.md.
This repo is organized as a skill pack, so the easiest install path is:
skills/ki-stack/bin/ki-stack-install-opencodeThat symlinks all ki-stack-* skills into ~/.config/opencode/skills/.
If you prefer, you can also symlink or copy the individual skill folders manually into:
~/.config/opencode/skills/~/.claude/skills/~/.agents/skills/
skills/ki-stack/bin/kicad-render pcb-render board.kicad_pcb board.png --width 1800 --height 1200 --side toppython3 skills/ki-stack/examples/ipc/board_inventory.pyskills/ki-stack/bin/kicad-drc-json board.kicad_pcb drc.json
skills/ki-stack/bin/kicad-erc-json design.kicad_sch erc.jsonskills/ki-stack/bin/ki-stack-update-checkIf a newer release is available, it prints:
UPGRADE_AVAILABLE <current> <latest>
Otherwise it stays quiet.
This repo is not trying to hide KiCad behind a fake universal abstraction.
It is trying to teach agents how to use the right native substrate for each job:
- live state and chaining many operations:
kicad-python - rendering and checks:
kicad-cli - structural offline mutation:
kiutils-rs
- deeper PCB examples for nets, zones, and footprint analysis
- more schematic-side examples
- richer symbol and footprint workflows
- packaging this as a drop-in skill pack for agent environments
Ki-Stack now carries a top-level VERSION file.
- current version: read with
skills/ki-stack/bin/ki-stack-version - update detection:
skills/ki-stack/bin/ki-stack-update-check
The update checker compares the local VERSION file against the remote VERSION file on GitHub and caches the result locally in ~/.ki-stack/last-update-check.
Recommended release flow:
- bump
VERSION - commit the bump
- create a Git tag like
v0.1.0 - create a GitHub release for that tag
The OpenCode docs do not expose a dedicated skill registry upload flow. The documented way to get listed publicly is to submit a PR to the OpenCode ecosystem page.
Practical path:
- keep the repo public on GitHub
- make sure
README.mdexplains what the skill pack does - submit a PR to the OpenCode docs/ecosystem list adding
Ki-Stack
For local usage, the actual skill installation path is the normal skill discovery directories described above.
Early, but already useful.
The Phase 1 substrate is in place, the first domain skills exist, and the repo is structured to grow without turning into an unreadable pile of notes.