/text-to-cad:pcbfrom text-to-cad
Designs, edits and reviews KiCad circuit boards and schematics (.kicad_pcb, .kicad_sch). Handles parts and nets, placement and routing, ERC and DRC, fabrication files, BOM, netlist, and STEP exports. Useful for PCB design, schematic capture, and pre-order review.
Ships in text-to-cad. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A board is its native KiCad files: the .kicad_pcb, its schematic and its project. text-to-cad reads,
draws and inspects them itself, and runs KiCad headless for everything KiCad owns: ERC, DRC, exports
and edits through its IPC API. There is no board model or build step; the files are the source.
| Task | Start with | Reference |
|---|---|---|
| Read a board or a schematic | kicad_pcb.read, kicad_sch.read in a script; cad kicad_pcb inspect | Checks, schematic |
| Draw or edit a schematic | kicad_sch.edit, then cad kicad_sch erc | Schematic |
| Choose parts and footprints | The datasheet, then the project's libraries | Parts |
| Create or edit a board | kicad_pcb.edit (below) | Native files |
| Place and route | The schematic's netlist, one functional group at a time | Layout, placement |
| Check a change | cad kicad_pcb drc, snapshots | Check each change |
| Review before ordering | DRC, then measurements, then the checklist | Before ordering |
| Export fabrication files, a BOM, or a STEP for an enclosure | cad kicad_pcb export, cad kicad_sch export | Manufacturing |
| Show a board or a schematic; what the person can see or pick in it; a missing 3D model | cad viewer --json FILE | Show the model, views |
Written for cad==0.11.22. Before first use in a chat, run cad --version. If it fails, or cad is missing or older
than 0.11.12, run uv tool install --force cad. If it is older than the release this skill was written for, run
cad update.
If cad is a major or minor version newer than this skill, tell the person to update the text-to-cad plugin: https://github.com/earthtojake/text-to-cad A project written for an earlier version may need changes; the migration guides say what: https://github.com/earthtojake/text-to-cad/tree/main/docs/migrations
Reading and inspecting a board or schematic needs no KiCad. DRC, ERC, exports, edits, and drawing a
board (its copper pours are refilled on a copy first) run KiCad's own kicad-cli and IPC API, which
cad fetches the first time one is needed (kicode: about 100 MB to download, 340 MB on disk, once);
cad run gives a script the same. Things to know about that KiCad:
${KICAD10_SYMBOL_DIR}/Device.kicad_sym) is read from the KiCad the person installed;
with none installed, ERC warns lib_symbol_issues and DRC lib_footprint_issues. A project that
carries its libraries (${KIPRJMOD}) needs no KiCad installed.TMPDIR; a named pipe on Windows), and reaches no network host. A shell
sandbox that refuses local sockets (an agent app's default) stops an edit at once, saying so: ask
the person to approve that one cad run, through the app's own approval prompt, for that socket
alone. Inspecting, DRC, exports and snapshots run inside the sandbox.CAD_KICAD_CLI names another kicad-cli (KiCad 9 or newer; a nightly's for an edit).CAD_KICAD_REFILL=0 in the server's environment turns the refill off: showing a board then
downloads nothing, and its pours are drawn as the file saved them.Edit the .kicad_pcb itself and keep its .kicad_pro, .kicad_dru, libraries and schematic beside
it. Reading or showing a board never writes it. Reread the file before an edit, preserve records and
UUIDs you do not understand, and never regenerate an existing project from a partial description.
A board changes inside a with block that hands over KiPy's open Board and saves at the end only if
the block changed it; a block that raises saves nothing. kicad_sch.edit does the same for a schematic
(schematic). Run the script with cad run board.py:
from cad import kicad_pcb
from kicode.util.units import from_mm
BOARD = "board.kicad_pcb"
with kicad_pcb.edit(BOARD) as b: # the board file is the source; the block edits it in place
power = [t for t in b.get_tracks() if t.net.name in {"+5V", "+3V3"}]
for track in power:
track.width = from_mm(0.8)
b.update_items(power)
b.refill_zones()
drc = kicad_pcb.drc(BOARD)
if not drc.ok:
raise SystemExit("\n".join(drc.human_lines())) # each finding, then FAILED and the count
for kind in ("gerbers", "drill", "pos", "bom", "step"):
kicad_pcb.export(BOARD, to=kind, out=f"fab/{kind}")
kicode (from kicode.proto.common.types import KIID), never from
kipy: the two cannot share a process.b.refill_zones()) before relying on their fill.A board's design starts at its schematic, which says what connects to what: read it, check it with ERC
and look at each sheet before laying out, and hold the board to it after. Place one functional group at
a time, route the nets whose path matters by hand, and direct cad's router (cad.kicad.route, inside
the edit, with the plan you give it; never a third-party autorouter) through the rest, with widths
for each net's current (layout). A plausible-looking layout does not
establish electrical correctness: pin numbers, footprint orientation and connector mating side come
from the datasheet.
For anything the typed commands do not cover, cad run kicad-cli ... runs the fetched KiCad's
command line with its own subcommands and flags (cad run kicad-cli pcb --help); CAD_KICAD_CLI
does not change which one that is:
cad run kicad-cli pcb render --side top --rotate -45,0,45 -o tmp/board.png board.kicad_pcb
cad run kicad-cli project downgrade --dry-run --target 10.0 board.kicad_pro # then -o DIR without --dry-run
Most of its commands write only their -o (it may leave a .kicad_prl beside a board it reads).
These write over the person's source file, so run them only when the person asked for that change:
pcb upgrade, sch upgrade, fp upgrade and sym upgrade without -o, and
pcb drc --refill-zones --save-board.
Check the saved board after every step, from the revision you will hand over:
| The change | Check it with |
|---|---|
| The schematic | cad kicad_sch erc board.kicad_sch, and cad kicad_sch snapshot board.kicad_sch tmp/sheet.png --sheet /Power/ for each sheet changed |
| Board against schematic | The pin-by-pin comparison in schematic: every pad on its schematic pin's net |
| Anything on the board | cad kicad_pcb drc board.kicad_pcb (--json): KiCad's DRC against the board's own rules. It exits 1 on errors or unconnected items; unconnected items are the routing still to do |
| Placement | cad kicad_pcb snapshot board.kicad_pcb tmp/placement.png --display placement: short, uncrossed ratsnest lines mean a group is placed well |
| Routing | The layout's property script: segments off 45 degrees, detours, width for current |
| How copper and silkscreen look | cad kicad_pcb snapshot board.kicad_pcb tmp/copper.png --display copper (more views) |
| Ready to order | The review below |
kicad_pcb.read), never read off a snapshot.A review of one board for the fab and assembler it will be ordered from is a guided review, not the fab's own engineering check. Gather evidence in this order: KiCad's DRC (every error blocks ordering); then what DRC cannot measure, from the board read back and the project's BOM; then the checklist of what no command measures.
| Area | Reference | Measured by |
|---|---|---|
| Fabrication | review-fabrication | KiCad's DRC against the board's rules; the rest by inspection |
| Electrical | review-electrical | The board read back: decoupling distances, narrowest track per net |
| Assembly and sourcing | review-assembly | The part list and placement file |
Use the chosen fab's own capability page for the board's layer count, copper weight and finish, and compare it with the project's Board Setup, which may differ. Where the person names no fab, review against JLCPCB's standard service and say so. Record each limit's source, date and conditions; a rule that cannot be checked is reported as missing, never invented. A fab's standard tier is a price, not a physical limit.
Scope first (board file and revision, fab and service, layers, copper, finish, assembled or bare),
then the findings, errors first, each naming its parts by board reference (U2, C8, #net:VBUS;
kicad_pcb.read(path).resolve(ref) says where one is), with the evidence, the rule and its source,
the result and the fix. Then the coverage: checks run, and checks not run with what they need.
| Item | Evidence | Rule | Result | Fix |
|---|---|---|---|---|
U2 pad 3 to C8 | measured 3.67 mm centre to centre from the board read back | decoupling within 3 mm (this review's guide) | review | move C8 beside pin 3 |
The result is pass (measured, within a cited limit), fail (a measured violation or a KiCad error), review (a risk a person decides) or unverified (evidence or the fab's rule is missing). No findings is not a manufacturability approval. A review alone asks for no edits: fix only when asked, and recheck the neighbours of every fix.
Export only the deliverables asked for, from the revision you checked (manufacturing). A DRC or ERC error blocks writing fabrication files unless the person says to go ahead, and the report then names every error they went ahead with.
Show the person each model you create or change as soon as its first run succeeds, and any model
or file they ask to see. A model's page is the view: line its run prints, and a file's is the url
that cad viewer --json FILE [FILE ...] prints for it (never guess the port). Show it with
the first of these you have:
cad_show among your tools (your host may prefix it): call it with the model's id or the file's
absolute path; its description says the rest.preview_start with the page's url, or its navigate):
open the page there yourself, and give the person the link as well.The page follows every run of the model. A file you export is a download: give its path. Showing is
for the person: to check your own work, review with cad <type> snapshot, never a screenshot
of the page. If it fails to launch, say so.
What the board and schematic pages offer the person (layers, selection, 3D, part models), and what they approximate, is in views.
LICENSE (opens in a new tab)agents/openai.yaml (opens in a new tab)references/board-api.md (opens in a new tab)references/checks.md (opens in a new tab)references/layout.md (opens in a new tab)references/manufacturing.md (opens in a new tab)references/parts.md (opens in a new tab)references/placement.md (opens in a new tab)references/review-assembly.md (opens in a new tab)references/review-electrical.md (opens in a new tab)references/review-fabrication.md (opens in a new tab)references/schematic.md (opens in a new tab)references/views.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pcb-design, schematic-capture, kicad, electronics, fabrication
8 skills in this plugin
/cadDesigns and edits 3D CAD - parametric parts, assemblies, mechanisms and 2D cut profiles, written as build123d Python and shown live in the text-to-cad viewer. Use for any request to model, change, measure, inspect, animate, export or convert a part or a CAD file (STEP, STL, 3MF, GLB, DXF, xbf), for references and Quick Edit prompts copied from the viewer, and to check whether a part can be machined, cut and bent, molded or printed. Not for robot descriptions, which the robot-simulation skill writes./engineering-drawingMakes an engineering drawing of a part as a PDF, projected from its 3D geometry so the drawing follows the model, with dimensioned orthographic views, hole callouts, notes and a title block. Use when the person asks for a drawing, a dimensioned sheet, shop or manufacturing drawings, a blueprint, or "2D views of this part". Not for DXF cut layouts or flat patterns, which the cad skill makes./npx claudepluginhub earthtojake/text-to-cad --plugin text-to-cadOther plugins' skills for the same job