use-kicad-cli
БесплатноБез исполняемых скриптовНе проверенDrives the KiCad command-line interface (`kicad-cli`, version 9.0) to export schematics and PCBs, produce fabrication outputs, and run design checks. This…
от FradSer★ 598 звёзд на GitHubОб этом скилле
Use kicad-cli
Generate fabrication, documentation, and 3D outputs from KiCad projects, and run electrical/design rule checks, by driving kicad-cli — KiCad 9.0's command-line tool. It has six command groups: sch (schematic), pcb (board), sym (symbols), fp (footprints), jobset (batch job sets), and version.
Process
- Identify which artifact the user wants (fabrication files, BOM, a check, a 3D model, a PDF, a library upgrade) and map it to a command group with the table below.
- Locate and verify the binary before running anything (see "Locating the binary"). Run
kicad-cli versionfirst to confirm it works. - Load the matching reference file and use its exact flags. Do not invent flags — when unsure, run
kicad-cli <group> <command> -h. - Build the command, create any output directory first, then run it. Report the produced files (and, for checks, the exit code plus report path).
CRITICAL operating rules
- macOS binary is not on PATH. On macOS it lives at
/Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli. On Linuxkicad-cliis on PATH; on Windows it iskicad-cli.exein the KiCadbinfolder. MUST confirm withkicad-cli versionbefore building a pipeline. - Checks silently pass without
--exit-code-violations.pcb drcandsch ercexit0by default even when violations exist — they only write a report. MUST pass--exit-code-violationsto get exit5when violations are found. In CI, treat exit5as "violations found"; other non-zero codes are tool/IO errors. Seereferences/checks.md. --outputis a directory for some commands, a file for others. Directory:pcb export gerbers,pcb export drill,*/export svg(multi-file). File:pcb export pdf,pcb export step,pcb export pos, single-file exports. Create the directory first; never assume deep auto-creation.- Use
pcb export gerbers(plural). The singularpcb export gerberis deprecated in 9.0 and removed in 10.0. - Stamp variables with
--define-var KEY=VALUE(-D) to override project text variables (e.g.${REV}) at export time instead of editing the board. Protect KiCad field variables like${QUANTITY}with single quotes in the shell so they are not expanded. - Never hardcode the DRC/ERC JSON schema.
--format jsonis supported but its field names are not officially documented — generate a sample and inspect it before parsing. - CI without a display:
kicad-cligenerally runs headless, but some operations expect an X display. The robust pattern is the officialkicad/kicad:9.0Docker image, orXvfb :99 -ac -nolisten tcp &thenexport DISPLAY=:99. Seereferences/setup.md.
Command map
| User wants | Command | Reference |
|---|---|---|
| Gerbers / drill / pick-and-place | pcb export gerbers / drill / pos |
references/pcb-export.md |
| Board PDF / SVG / DXF | pcb export pdf / svg / dxf |
references/pcb-export.md |
| 3D model (STEP/GLB/VRML/…) | pcb export step / glb / vrml |
references/pcb-export.md |
| IPC-2581 / IPC-D-356 / ODB++ | pcb export ipc2581 / ipcd356 / odb |
references/pcb-export.md |
| Board render (PNG/JPEG) | pcb render |
references/pcb-export.md |
| Schematic PDF / SVG / DXF / PS / HPGL | sch export <fmt> |
references/sch-export.md |
| BOM / netlist | sch export bom / netlist |
references/sch-export.md |
| Design / electrical rule check | pcb drc / sch erc |
references/checks.md |
| Symbol/footprint SVG or library upgrade | sym ... / fp ... |
references/sym-fp-jobset.md |
| Reproducible batch of outputs | jobset run |
references/sym-fp-jobset.md |
| End-to-end recipes | — | references/workflows.md |
Locating the binary
Try, in order: kicad-cli on PATH; macOS /Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli; Windows C:\Program Files\KiCad\9.0\bin\kicad-cli.exe. Assign the resolved path to a shell variable and reuse it:
KCLI=$(command -v kicad-cli || echo /Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli)
"$KCLI" version
If none works, tell the user KiCad 9.0 is not installed or ask for the install path.
References
references/setup.md— locating the binary cross-platform, headless/CI setup,version, global options (--define-var,--outputsemantics), gotchas.references/pcb-export.md— everypcb exportsubcommand (gerbers, drill, pos, pdf, svg, dxf, step, glb, vrml, ipc2581, ipcd356, odb, others) pluspcb render.references/sch-export.md—sch exportpdf/svg/dxf/ps/hpgl, netlist, bom, python-bom.references/checks.md—pcb drcandsch erc: flags, severity, exit codes, JSON caveat, CI gating.references/sym-fp-jobset.md—symandfpexport/upgrade, andjobset run.references/workflows.md— end-to-end recipes (fab package, CI checks, schematic PDF, STEP model, job set).
Установить use-kicad-cli в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл use-kicad-cli?
Drives the KiCad command-line interface (`kicad-cli`, version 9.0) to export schematics and PCBs, produce fabrication outputs, and run design checks. This skill should be used when the user asks to export gerbers, drill, or pick-and-place files, generate a BOM or netlist, run ERC or DRC (including in CI), export a STEP/3D model or PDF/SVG, upgrade KiCad symbol/footprint libraries, or run a KiCad job set. Invoked via "/hardware:use-kicad-cli".
Как установить скилл use-kicad-cli?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл use-kicad-cli запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic