This skill should be used when the user brings an existing KiCad project to understand, change, compare or release, for example "what's in this board", "make a BOM from my schematic", "compare these two revisions", "release rev 1.1", "make a panel", "set LCSC numbers", "export Gerbers and CPL for JLCPCB", "upgrade my KiCad 7 project to KiCad 10" or "look at the board I have open in KiCad". It inventories, diffs, edits fields safely and drives kicad-cli 10.
3 stars
0 votes
0 copies
0 views
Added December 1, 2026
ai-agentspythongodockergitapi
Works with
claude desktop
cli
api
mcp
Security analysis
A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Kicad Projects?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/gkochievi-kicad-projects)
---
name: kicad-projects
description: This skill should be used when the user brings an existing KiCad project to understand, change, compare or release, for example "what's in this board", "make a BOM from my schematic", "compare these two revisions", "release rev 1.1", "make a panel", "set LCSC numbers", "export Gerbers and CPL for JLCPCB", "upgrade my KiCad 7 project to KiCad 10" or "look at the board I have open in KiCad". It inventories, diffs, edits fields safely and drives kicad-cli 10.
user-invocable: false
---
# Existing KiCad projects: inventory, BOM, diff, safe edits and release
Work on the user's own KiCad projects: find out what is in them, produce BOMs, compare revisions, change fields without breaking the files, and package production outputs that pass KiCad's own checks. Projects this plugin generates are the `kicad-generator` skill's job; new footprints and symbols are `kicad-library`'s; design reviews are `board-review`'s. The user designs in KiCad only: target KiCad 10 files and KiCad 10 `kicad-cli`.
## Procedure
### 1. Take stock before touching anything
1. Run `scripts/kicad_project.py info <project>`. Read the file versions ("written by"), the sheet list, the part and footprint counts, the outline size and copper layers, DNP and BOM-excluded parts, parts without footprint / MPN / LCSC, library tables and unresolved libraries, lock files, jobsets and the git state.
2. If lock files are listed, the project is open in KiCad (or a crash left a stale lock). Ask the user to save and close KiCad before any edit or export.
3. If the files were written by KiCad 7 or older, or by different versions, follow the upgrade procedure in `references/existing-projects.md` section 7 on a copy or a branch before other work.
4. If symbol or footprint libraries do not resolve, fix the tables first (`references/existing-projects.md` section 3). The board keeps its own copy of each footprint, so outputs still work, but every library update will fail.
5. Record what was found in the project notes (`ask-gela` describes them) when the user keeps them.
### 2. BOM
1. `kicad_project.py bom <project>` prints a grouped Markdown BOM (value + footprint + MPN + LCSC; DNP parts on their own lines; parts with "Exclude from bill of materials" listed separately).
2. `--format all --out-dir bom/` writes the generic CSV, the JLCPCB CSV (`Comment, Designator, Footprint, LCSC Part #`, fitted parts only, one designator list per LCSC number) and Markdown.
3. When the project names its fields differently, pass `--lcsc-field "LCSC Part #"` / `--mpn-field "MPN"` or set them in `[kicad_project]`; common aliases are read automatically.
4. For stock and prices hand the CSV to the `parts-sourcing` skill: `parts-sourcing/scripts/bom_check.py <bom.csv> --boards N`. Never fill in an LCSC number that was not checked on its lcsc.com product page.
### 3. Compare revisions
1. Folders: `kicad_project.py diff old/ new/ --md changes.md`.
2. Git: `kicad_project.py diff v1.0 --project hw/board` (tag against the working tree) or `diff git:v1.0 v1.1 --project hw/board`. Files are taken with `git show <rev>:<path>` into a temporary folder; the working tree is not touched.
3. Read the report in this order: re-annotated parts, parts added / removed / changed, renamed nets, pins moved to another net, footprints moved / rotated / flipped / swapped, outline and layer changes, track length and vias per net.
4. `--connectivity netlist` (needs kicad-cli) compares the schematic netlists instead of the PCB pads; use it when the board was not updated yet.
5. `--images diff_png/` writes one copper overlay per layer (copper only in the old revision red, only in the new one green, unchanged grey, with the changed area in mm²): look at them for copper changes the tables do not show, such as a pour that no longer reaches a pad.
6. Put the diff into the ECO record (`pcb-design/references/layout-eco-playbook.md` section 2).
### 4. Change fields safely (`set`)
1. Always start with `--dry-run` and show the user the change table and the diff.
2. Then run the same command without `--dry-run`. The script refuses when a KiCad lock file exists, when the file changed after it was read (sha256 and mtime), or when a symbol sits in a sheet used more than once and not all instances get the same value (`--all-instances` accepts that). It writes a timestamped backup to `<project>/boulder-backups/` first and prints every change.
3. Examples: `--ref R5 --footprint Resistor_SMD:R_0603_1608Metric`; `--ref R7,R8 --dnp yes`; `--ref U3 --mpn <MPN> --lcsc <checked C-number>`; `--csv lcsc.csv` with a Reference / Designator column and one column per field (empty cells are skipped).
4. Board side: tell the user to run Update PCB from Schematic (F8) in KiCad (options in `pcb-design/references/layout-eco-playbook.md` section 5.3). `--sync-pcb` copies field values and the DNP / BOM / position flags to the matching footprints when KiCad is not at hand; a footprint swap always needs KiCad.
5. After editing, rerun `check` (or at least ERC and DRC with parity) before calling the change done.
### 5. Release (`check`, then `export`)
1. `kicad_project.py check <project> --fab jlcpcb` (add `--fiducials 3` / `--tooling-holes N` when the assembler needs them). It fails on lock files, unannotated symbols, missing footprints, missing LCSC numbers (JLCPCB) or MPNs (generic), schematic/PCB mismatches read from the files, an open outline, ERC / DRC / parity errors from kicad-cli, and a missing kicad-cli. Uncommitted KiCad files are a warning.
2. Fix every failure in KiCad; explain every warning to the user (ERC library warnings in a workspace without KiCad's standard libraries are expected).
3. `kicad_project.py export <project>` runs ERC and DRC with schematic parity first and stops on errors (or schematic/PCB mismatches) unless `--force`. Then it writes `fab/` (Gerbers with zone check and mask-subtracted silkscreen, PTH and NPTH drill files with maps), `assembly/` (KiCad position file, JLCPCB CPL, BOM files, parts not assembled), `docs/` (schematic PDF, multi-page PCB PDF, `--step` model), `reports/` (ERC / DRC JSON), `<name>-fab.zip` and `manifest.json` with checksums.
4. CPL rotations: no offsets are built in. Upload, inspect every polarised part in JLCPCB's placement preview, add offsets with `--rot "SOT-23*=180"`, `--rot "bottom:QFN-*=90"`, `--rot ref:U3=270` or `[kicad_project.cpl_rotation]`, and export again (`references/kicad-cli-production.md` section 4).
5. Tell the user what Claude could not check: the placement preview, the Gerber viewer, the stock, and the physical fit.
### 6. A numbered release (`release`)
1. `kicad_project.py release <project> --rev 1.1 --previous release/<name>-1.0 --notes "..."` with `--dry-run` first: it shows the title block changes.
2. Without `--dry-run` it sets the revision and date in the title block of every sheet and the board (backups first, refused while KiCad has the project open), runs `export` into `release/<name>-<rev>/production/` (same ERC / DRC gate and options), compares with `--previous` (a folder, project file or git revision) into `CHANGELOG.md` with the copper overlays in `diff/`, and zips the folder with its SHA-256.
3. The board shows the revision when it has a silkscreen text `${REVISION}` (it follows the title block); the command warns when it finds none.
4. Keep each release folder (or its zip) unchanged: it is the `--previous` of the next one.
### 7. The board open in KiCad (live, `kicad-live` MCP server)
The plugin starts `scripts/kicad_live_mcp.py`, which talks to the running KiCad PCB editor through KiCad's IPC API (KiCad 9 and 10 serve it from the GUI and for the PCB editor only).
1. Call `kicad_status` first. When it reports no connection, tell the user the setup in `references/live-kicad.md` section 1 (KiCad running with the board open in the PCB editor, Preferences > Plugins > API server on, `pip install "kicad-python>=0.8"` for the Python that runs the server). Do not retry in a loop.
2. Read with `board_summary`, `list_footprints`, `footprint_info`, `list_nets`, `net_info` and `get_selection` (what the user selected: "this part" usually means the selection). `select` highlights parts for the user.
3. Change only what the user asked for: `move_footprints` (absolute or relative, rotation, side; locked parts refused) is one undo step in KiCad; `refill_zones`. Report before and after positions. Nothing is saved until `save_board`, and the user can undo in KiCad.
4. `run_drc` checks the file on disk with kicad-cli (KiCad 10 has no DRC in the API): use `save_first` only after the user agreed to save.
5. Schematic edits, new tracks and deletions are not offered: use `set` (section 4) on closed files, or ask the user to do it in KiCad.
### 8. A production panel (`panelize.py`, KiKit)
1. `scripts/panelize.py <board> --dry-run` shows the plan (grid, panel size, gaps, tabs) and writes the KiKit preset; it applies JLCPCB's panel rules (`references/panelization.md` section 2) and refuses V-cuts on outlines or overhanging parts they cannot cut.
2. Run it with KiKit (`--kikit-python <KiCad's python3>`; install in `references/panelization.md` section 3), and `--fab` for the panel's Gerbers, BOM and CPL. Read the warnings: parts over the board edge, DRC findings between the boards' own items.
3. Show the panel (render or KiCad) before the user orders; tell them to check JLCPCB's placement preview of the panel.
## Defaults and traps
- **Never overwrite without the checks.** All writes go through `set` (lock files, checksum, backup, dry run). Do not edit KiCad files with ad-hoc text replacement. When unsure, copy the project and work on the copy.
- **kicad-cli ignores lock files** (verified with 10.0.6: ERC, DRC and even `sch upgrade --force` ran while foreign `~*.lck` files existed). The script checks them; exports from an open project contain the saved state, not unsaved edits.
- **Lock file names:** `~<file name>.lck` next to the file, for example `~board.kicad_sch.lck` and `~board.kicad_pro.lck` (KiCad source).
- **Shared sheets:** a symbol in a sheet used twice stores Value, Footprint and fields once. Changing R10 also changes R11.
- **KiCad 10 parity severities:** value, footprint, DNP and field differences between symbol and footprint came out as warnings in KiCad 10.0.6 DRC parity, not errors. `check` and `export` also compare the files themselves and fail on value or footprint mismatches.
- **KiCad 10's kicad-cli only.** `kicad_project.py` refuses an older kicad-cli (`KICAD_CLI_TOO_OLD`) and skips it when searching; an older one would also refuse KiCad 10 files (KiCad 7.0.11's did) and lacks ERC / DRC. Older projects are still read and upgraded to KiCad 10 (section 7 of `references/existing-projects.md`).
- **Origin:** Gerbers, drill files and CPL share one origin: the drill/place origin when set (`origin = auto`), else KiCad's absolute origin (CPL Y values then negative). Never mix them.
- **Body centre, not anchor:** JLCPCB's Mid X / Mid Y is the part centroid; KiCad's position file gives the anchor, pin 1 on through-hole footprints (KLC F7.2). The CPL uses the fab outline centre, else courtyard, else pads (`--cpl-centre anchor` to switch off).
- **Zones:** DRC runs with `--refill-zones` (board not saved) and Gerbers with `--check-zones`; stale fills would otherwise reach the fab.
- **DNP in two places:** the schematic flag and the footprint attribute. A mismatch means Update PCB was not run; export warns.
- **Datasheet "~":** KiCad 10 no longer treats "~" as empty text (format 20250318); a KiCad 7 project upgraded to 10 shows Datasheet changes in diffs.
These defaults summarise the references; where a reference gives conditions, follow the reference.
## References
| File | Use for |
|---|---|
| `references/existing-projects.md` | Taking over a project: inventory, library tables and project-local libraries, BOM / JLCPCB field conventions, version control (what to commit and ignore, lock, backup and history files), revision diffs, ECO flow, release packaging, KiCad 7 → 10 upgrade notes, troubleshooting |
| `references/panelization.md` | Panels: when to panelize, JLCPCB's rail, fiducial, tooling, mouse-bite and V-cut rules with sources, installing KiKit for KiCad 10, options, reading the panel DRC |
| `references/live-kicad.md` | The live connection: setup (API server, kicad-python, socket), the `kicad-live` tools, limits of KiCad 9 / 10, Claude Desktop config, and the KiCad 11 plan (headless API, schematic editor, SWIG removal) for the generator |
| `references/kicad-cli-production.md` | kicad-cli 10 commands and options verified for ERC, DRC, parity, netlist, BOM, Gerbers, drill, position files, PDF, STEP, upgrade and jobsets; JLCPCB CPL rotation handling; typical fab packages; path maps for chroot / Docker; troubleshooting |
## Scripts
| Script | Use | Example |
|---|---|---|
| `scripts/kicad_project.py info` | inventory of a project | `kicad_project.py info hw/board` |
| `scripts/kicad_project.py bom` | grouped BOM from the schematic hierarchy (Markdown, CSV, JLCPCB CSV) | `kicad_project.py bom hw/board --format all --out-dir bom` |
| `scripts/kicad_project.py diff` | revision diff of folders or git revisions | `kicad_project.py diff v1.0 --project hw/board --md diff.md` |
| `scripts/kicad_project.py set` | safe field and flag edits, optional PCB sync | `kicad_project.py set hw/board --ref R5 --value 4.7k --dry-run` |
| `scripts/kicad_project.py export` | ERC / DRC gate, then fab, assembly and document outputs | `kicad_project.py export hw/board --rot "SOT-23*=180"` |
| `scripts/kicad_project.py check` | pre-release checklist | `kicad_project.py check hw/board --fab jlcpcb --fiducials 3` |
| `scripts/kicad_project.py release` | numbered release with title block stamp, outputs, changelog and zip | `kicad_project.py release hw/board --rev 1.1 --previous release/board-1.0` |
| `scripts/panelize.py` | production panel with KiKit: plan, preset, panel, DRC, JLCPCB files | `panelize.py hw/board/board.kicad_pcb --kikit-python python3 --fab` |
| `scripts/kicad_live_mcp.py` | MCP server for the board open in KiCad (started by the plugin's `.mcp.json`) | `python3 kicad_live_mcp.py --check` |
The script prints a readable report, or one JSON object with `--json` (`status`, `action`, `summary`, `details`, `error`); exit 0 ok or warn, 1 a check failed or `set` refused to write, 2 usage or runtime error. Settings come from the command line, then `[kicad_project]` in `boulder.toml`, then `BOULDER_KICAD_CLI` / `BOULDER_KICAD_PATH_MAP` (or the generator's `KICAD10_CLI` / `KICAD10_PATHMAP`) for kicad-cli. It reads the files with `board-review/scripts/kisexp.py` and runs ERC / DRC through `board-review/scripts/kicad_review.py`. Tests and a two-revision KiCad 10 fixture project are in `scripts/tests/`.
## Related skills
- `board-review`: full design review with detectors and KiCad's ERC / DRC (`board-review/scripts/kicad_review.py`, `board-review/references/automated-checks.md`); run it before a release, `check` does not replace it.
- `kicad-generator`: projects built by this plugin, with their own BOM and CPL writers (`kicad-generator/references/production-files.md`).
- `kicad-library`: new footprints and symbols from datasheets, library checks (`kicad-library/scripts/lib_check.py`).
- `parts-sourcing`: stock, price and lifecycle for the BOM (`parts-sourcing/scripts/bom_check.py`).
- `pcb-design`: JLCPCB rules and production files (`pcb-design/references/jlcpcb-dfm-assembly.md`), revisions, ECOs and rework (`pcb-design/references/layout-eco-playbook.md`).
- `ask-gela`: requirements, decision log and release notes for the project.
## Next step
When this is done, say what comes next: `board-review` before any order; `parts-sourcing` for the BOM.