Update to text-to-cad
Snapshot Nov 27, 2026 · 19:13 UTC · version 0.11.18
Collection source: downloaded plugin package.
Instructions updated for pcb
Skill instructions — Now says: Written for `cad==0.11.18`. Before first use in a chat, run `cad --version`. If `cad` is missing or older than
Observed in instructions or declared skills. Runtime behavior has not been tested.
Up to 3 plugins free · no card required.
All fields and original values.
Skill instructions
Nov 24, 2026 · 00:47 UTC
Written for `cad==0.11.17`. Before first use in a chat, run `cad --version`. If `cad` is missing or older than
Nov 27, 2026 · 19:13 UTC
Written for `cad==0.11.18`. Before first use in a chat, run `cad --version`. If `cad` is missing or older than
Compare saved observations
Download comparison JSONSKILL.md text changes
− removed · + added
--- before +++ after @@ -28,7 +28,7 @@ ## Setup -Written for `cad==0.11.17`. Before first use in a chat, run `cad --version`. If `cad` is missing or older than +Written for `cad==0.11.18`. Before first use in a chat, run `cad --version`. If `cad` is missing or older than 0.11.12, run `uv tool install cad`, adding `--force` if uv says `cad` already exists. If cad is a major or minor version newer than this skill, tell the person to update the text-to-cad plugin:
Full technical diff · 1 changed fields
changed /skill_md_contents
"---\nname: pcb\ndescription: Designs, edits and reviews KiCad circuit boards and schematics (.kicad_pcb, .kicad_sch). Use for any request about a PCB, a schematic or a circuit - parts and nets, placement and routing, ERC and DRC, a review before ordering from JLCPCB, PCBWay or another fab, and fabrication files, a BOM, a netlist or a STEP of the board. Not for the enclosure or other mechanical parts, which the cad skill makes.\nlicense: MIT\nmetadata:\n repository: earthtojake/text-to-cad\n---\n\n# PCB design\n\nA board is its native KiCad files: the `.kicad_pcb`, its schematic and its project. text-to-cad reads,\ndraws and inspects them itself, and runs KiCad headless for everything KiCad owns: ERC, DRC, exports\nand edits through its IPC API. There is no board model or build step; the files are the source.\n\n## Start with the task\n\n| Task | Start with | Reference |\n| --- | --- | --- |\n| Read a board or a schematic | `kicad_pcb.read`, `kicad_sch.read` in a script; `cad kicad_pcb inspect` | [Checks](references/checks.md), [schematic](references/schematic.md#read-it) |\n| Draw or edit a schematic | `kicad_sch.edit`, then `cad kicad_sch erc` | [Schematic](references/schematic.md) |\n| Choose parts and footprints | The datasheet, then the project's libraries | [Parts](references/parts.md) |\n| Create or edit a board | `kicad_pcb.edit` ([below](#native-files-are-the-source)) | [Native files](references/board-api.md) |\n| Place and route | The schematic's netlist, one functional group at a time | [Layout](references/layout.md), [placement](references/placement.md) |\n| Check a change | `cad kicad_pcb drc`, snapshots | [Check each change](#check-each-change) |\n| Review before ordering | DRC, then measurements, then the checklist | [Before ordering](#before-ordering) |\n| Export fabrication files, a BOM, or a STEP for an enclosure | `cad kicad_pcb export`, `cad kicad_sch export` | [Manufacturing](references/manufacturing.md) |\n| 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](#show-the-model), [views](references/views.md) |\n\n## Setup\n\nWritten for `cad==0.11.17`. Before first use in a chat, run `cad --version`. If `cad` is missing or older than\n0.11.12, run `uv tool install cad`, adding `--force` if uv says `cad` already exists.\n\nIf cad is a major or minor version newer than this skill, tell the person to update the text-to-cad plugin:\nhttps://github.com/earthtojake/text-to-cad\nA project written for an earlier version may need changes; the migration guides say what:\nhttps://github.com/earthtojake/text-to-cad/tree/main/docs/migrations\n\nReading and inspecting a board or schematic needs no KiCad. DRC, ERC, exports, edits, and drawing a\nboard (its copper pours are refilled on a copy first) run KiCad's own `kicad-cli` and IPC API, which\n`cad` fetches the first time one is needed (kicode: about 100 MB to download, 340 MB on disk, once);\n`cad run` gives a script the same. Things to know about that KiCad:\n\n- **It is a nightly (10.99).** A file it saves is in the nightly's format, which a stable KiCad app\n refuses to open; viewing and snapshots still work, and the viewer tells the person which KiCad on\n this computer can open the file. Say so before the first save of a board the person opens in a\n stable KiCad.\n- **It runs headless with private settings**, never the person's KiCad app or its settings: never open\n a board in KiCad's app to check it. A project library row that names a stock library as KiCad's own\n tables do (`${KICAD10_SYMBOL_DIR}/Device.kicad_sym`) is read from the KiCad the person installed;\n with none installed, ERC warns `lib_symbol_issues` and DRC `lib_footprint_issues`. A project that\n carries its libraries (`${KIPRJMOD}`) needs no KiCad installed.\n- **An edit needs a local socket.** A shell sandbox that refuses sockets (an agent app's default) stops\n an edit at once, saying so: run the script outside the sandbox. Inspecting, DRC, exports and\n snapshots run inside it.\n- **A KiCad the person installed is never run.** Where the fetched one does not run on a computer,\n `CAD_KICAD_CLI` names another `kicad-cli` (KiCad 9 or newer; a nightly's for an edit).\n- **`CAD_KICAD_REFILL=0` in the server's environment turns the refill off**: showing a board then\n downloads nothing, and its pours are drawn as the file saved them.\n\n## Native files are the source\n\nEdit the `.kicad_pcb` itself and keep its `.kicad_pro`, `.kicad_dru`, libraries and schematic beside\nit. Reading or showing a board never writes it. Reread the file before an edit, preserve records and\nUUIDs you do not understand, and never regenerate an existing project from a partial description.\n\nA board changes inside a `with` block that hands over KiPy's open `Board` and saves at the end only if\nthe block changed it; a block that raises saves nothing. `kicad_sch.edit` does the same for a schematic\n([schematic](references/schematic.md#edit-it)). Run the script with `cad run board.py`:\n\n```python\nfrom cad import kicad_pcb\nfrom kicode.util.units import from_mm\n\nBOARD = \"board.kicad_pcb\"\n\nwith kicad_pcb.edit(BOARD) as b: # the board file is the source; the block edits it in place\n power = [t for t in b.get_tracks() if t.net.name in {\"+5V\", \"+3V3\"}]\n for track in power:\n track.width = from_mm(0.8)\n b.update_items(power)\n b.refill_zones()\ndrc = kicad_pcb.drc(BOARD)\nif not drc.ok:\n raise SystemExit(\"\\n\".join(drc.human_lines())) # each finding, then FAILED and the count\nfor kind in (\"gerbers\", \"drill\", \"pos\", \"bom\", \"step\"):\n kicad_pcb.export(BOARD, to=kind, out=f\"fab/{kind}\")\n```\n\n- **State the result, not the change**: \"U1 is at (10, 20)\", \"the power tracks are 0.8 mm\", never\n \"move U1 5 mm\". Set absolute positions, rotations, widths and nets, and create an item only when the\n board does not hold it yet, so a script stopped halfway and run again ends where one run would.\n- **Import KiPy's names from `kicode`** (`from kicode.proto.common.types import KIID`), never from\n `kipy`: the two cannot share a process.\n- **Coordinates are millimetres, y down.** Footprint-local positions and rotations are transformed into\n the board frame; route to a net's actual pad positions.\n- **Refill changed zones** (`b.refill_zones()`) before relying on their fill.\n- KiCad's first start in a new environment can take a minute.\n\nA board's design starts at its schematic, which says what connects to what: read it, check it with ERC\nand look at each sheet before laying out, and hold the board to it after. Place one functional group at\na time, route the nets whose path matters by hand, and direct cad's router (`cad.kicad.route`, inside\nthe edit, with the plan you give it; never a third-party autorouter) through the rest, with widths\nfor each net's current ([layout](references/layout.md)). A plausible-looking layout does not\nestablish electrical correctness: pin numbers, footprint orientation and connector mating side come\nfrom the datasheet.\n\nFor anything the typed commands do not cover, `cad run kicad-cli ...` runs the fetched KiCad's\ncommand line with its own subcommands and flags (`cad run kicad-cli pcb --help`); `CAD_KICAD_CLI`\ndoes not change which one that is:\n\n```bash\ncad run kicad-cli pcb render --side top --rotate -45,0,45 -o tmp/board.png board.kicad_pcb\ncad run kicad-cli project downgrade --dry-run --target 10.0 board.kicad_pro # then -o DIR without --dry-run\n```\n\nMost of its commands write only their `-o` (it may leave a `.kicad_prl` beside a board it reads).\nThese rewrite the source: `pcb upgrade`, `sch upgrade`, `fp upgrade` and `sym upgrade` without `-o`,\nand `pcb drc --refill-zones --save-board`.\n\n## Check each change\n\nCheck the saved board after every step, from the revision you will hand over:\n\n| The change | Check it with |\n| --- | --- |\n| 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 |\n| Board against schematic | The pin-by-pin comparison in [schematic](references/schematic.md#into-the-board-and-back): every pad on its schematic pin's net |\n| 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 |\n| Placement | `cad kicad_pcb snapshot board.kicad_pcb tmp/placement.png --display placement`: short, uncrossed ratsnest lines mean a group is placed well |\n| Routing | The layout's [property script](references/layout.md#a-property-check): segments off 45 degrees, detours, width for current |\n| How copper and silkscreen look | `cad kicad_pcb snapshot board.kicad_pcb tmp/copper.png --display copper` ([more views](references/views.md#board-snapshots)) |\n| Ready to order | The review below |\n\n- Warnings count: KiCad's silkscreen, mask and courtyard rules are warnings, and they are what a fab's\n CAM engineer flags.\n- Fix the cause; a rule weakened to get a clean report has shown nothing.\n- A clean DRC establishes the board's own rules, not the circuit's correctness and not the fab's\n limits. A number is measured from the board (`kicad_pcb.read`), never read off a snapshot.\n\n## Before ordering\n\nA review of one board for the fab and assembler it will be ordered from is a guided review, not the\nfab's own engineering check. Gather evidence in this order: KiCad's DRC (every error blocks ordering);\nthen what DRC cannot measure, from the board read back and the project's BOM; then the checklist of\nwhat no command measures.\n\n| Area | Reference | Measured by |\n| --- | --- | --- |\n| Fabrication | [review-fabrication](references/review-fabrication.md) | KiCad's DRC against the board's rules; the rest by inspection |\n| Electrical | [review-electrical](references/review-electrical.md) | The board read back: decoupling distances, narrowest track per net |\n| Assembly and sourcing | [review-assembly](references/review-assembly.md) | The part list and placement file |\n\n### Choosing the rules\n\nUse the chosen fab's own capability page for the board's layer count, copper weight and finish, and\ncompare it with the project's Board Setup, which may differ. Where the person names no fab, review\nagainst JLCPCB's standard service and say so. Record each limit's source, date and conditions; a rule\nthat cannot be checked is reported as missing, never invented. A fab's standard tier is a price, not a\nphysical limit.\n\n### The report\n\nScope first (board file and revision, fab and service, layers, copper, finish, assembled or bare),\nthen the findings, errors first, each naming its parts by board reference (`U2`, `C8`, `#net:VBUS`;\n`kicad_pcb.read(path).resolve(ref)` says where one is), with the evidence, the rule and its source,\nthe result and the fix. Then the coverage: checks run, and checks not run with what they need.\n\n| Item | Evidence | Rule | Result | Fix |\n| --- | --- | --- | --- | --- |\n| `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 |\n\nThe result is **pass** (measured, within a cited limit), **fail** (a measured violation or a KiCad\nerror), **review** (a risk a person decides) or **unverified** (evidence or the fab's rule is missing).\nNo findings is not a manufacturability approval. A review alone asks for no edits: fix only when\nasked, and recheck the neighbours of every fix.\n\nExport only the deliverables asked for, from the revision you checked\n([manufacturing](references/manufacturing.md)). A DRC or ERC error blocks writing fabrication files\nunless the person says to go ahead, and the report then names every error they went ahead with.\n\n## Show the model\n\nShow the person each model you create or change as soon as its first run succeeds, and any model\nor file they ask to see. A model's page is the `view:` line its run prints, and a file's is the `url`\nthat `cad viewer --json FILE [FILE ...]` prints for it (never guess the port). Show it with\nthe first of these you have:\n\n1. `cad_show` among your tools (your host may prefix it): call it with the model's id or the file's\n absolute path; its description says the rest.\n2. A tool that opens a page in the app's own browser pane, not in the person's own browser (in the\n Claude desktop app, the Browser pane's `preview_start` with the page's `url`, or its `navigate`):\n open the page there yourself, and give the person the link as well.\n3. Neither: give the person the link, to open in their browser.\n\nThe page follows every run of the model. A file you export is a download: give its path. Showing is\nfor the person: to check your own work, review with `cad <type> snapshot`, never a screenshot\nof the page. If it fails to launch, say so.\n\nWhat the board and schematic pages offer the person (layers, selection, 3D, part models), and what\nthey approximate, is in [views](references/views.md).\n""---\nname: pcb\ndescription: Designs, edits and reviews KiCad circuit boards and schematics (.kicad_pcb, .kicad_sch). Use for any request about a PCB, a schematic or a circuit - parts and nets, placement and routing, ERC and DRC, a review before ordering from JLCPCB, PCBWay or another fab, and fabrication files, a BOM, a netlist or a STEP of the board. Not for the enclosure or other mechanical parts, which the cad skill makes.\nlicense: MIT\nmetadata:\n repository: earthtojake/text-to-cad\n---\n\n# PCB design\n\nA board is its native KiCad files: the `.kicad_pcb`, its schematic and its project. text-to-cad reads,\ndraws and inspects them itself, and runs KiCad headless for everything KiCad owns: ERC, DRC, exports\nand edits through its IPC API. There is no board model or build step; the files are the source.\n\n## Start with the task\n\n| Task | Start with | Reference |\n| --- | --- | --- |\n| Read a board or a schematic | `kicad_pcb.read`, `kicad_sch.read` in a script; `cad kicad_pcb inspect` | [Checks](references/checks.md), [schematic](references/schematic.md#read-it) |\n| Draw or edit a schematic | `kicad_sch.edit`, then `cad kicad_sch erc` | [Schematic](references/schematic.md) |\n| Choose parts and footprints | The datasheet, then the project's libraries | [Parts](references/parts.md) |\n| Create or edit a board | `kicad_pcb.edit` ([below](#native-files-are-the-source)) | [Native files](references/board-api.md) |\n| Place and route | The schematic's netlist, one functional group at a time | [Layout](references/layout.md), [placement](references/placement.md) |\n| Check a change | `cad kicad_pcb drc`, snapshots | [Check each change](#check-each-change) |\n| Review before ordering | DRC, then measurements, then the checklist | [Before ordering](#before-ordering) |\n| Export fabrication files, a BOM, or a STEP for an enclosure | `cad kicad_pcb export`, `cad kicad_sch export` | [Manufacturing](references/manufacturing.md) |\n| 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](#show-the-model), [views](references/views.md) |\n\n## Setup\n\nWritten for `cad==0.11.18`. Before first use in a chat, run `cad --version`. If `cad` is missing or older than\n0.11.12, run `uv tool install cad`, adding `--force` if uv says `cad` already exists.\n\nIf cad is a major or minor version newer than this skill, tell the person to update the text-to-cad plugin:\nhttps://github.com/earthtojake/text-to-cad\nA project written for an earlier version may need changes; the migration guides say what:\nhttps://github.com/earthtojake/text-to-cad/tree/main/docs/migrations\n\nReading and inspecting a board or schematic needs no KiCad. DRC, ERC, exports, edits, and drawing a\nboard (its copper pours are refilled on a copy first) run KiCad's own `kicad-cli` and IPC API, which\n`cad` fetches the first time one is needed (kicode: about 100 MB to download, 340 MB on disk, once);\n`cad run` gives a script the same. Things to know about that KiCad:\n\n- **It is a nightly (10.99).** A file it saves is in the nightly's format, which a stable KiCad app\n refuses to open; viewing and snapshots still work, and the viewer tells the person which KiCad on\n this computer can open the file. Say so before the first save of a board the person opens in a\n stable KiCad.\n- **It runs headless with private settings**, never the person's KiCad app or its settings: never open\n a board in KiCad's app to check it. A project library row that names a stock library as KiCad's own\n tables do (`${KICAD10_SYMBOL_DIR}/Device.kicad_sym`) is read from the KiCad the person installed;\n with none installed, ERC warns `lib_symbol_issues` and DRC `lib_footprint_issues`. A project that\n carries its libraries (`${KIPRJMOD}`) needs no KiCad installed.\n- **An edit needs a local socket.** A shell sandbox that refuses sockets (an agent app's default) stops\n an edit at once, saying so: run the script outside the sandbox. Inspecting, DRC, exports and\n snapshots run inside it.\n- **A KiCad the person installed is never run.** Where the fetched one does not run on a computer,\n `CAD_KICAD_CLI` names another `kicad-cli` (KiCad 9 or newer; a nightly's for an edit).\n- **`CAD_KICAD_REFILL=0` in the server's environment turns the refill off**: showing a board then\n downloads nothing, and its pours are drawn as the file saved them.\n\n## Native files are the source\n\nEdit the `.kicad_pcb` itself and keep its `.kicad_pro`, `.kicad_dru`, libraries and schematic beside\nit. Reading or showing a board never writes it. Reread the file before an edit, preserve records and\nUUIDs you do not understand, and never regenerate an existing project from a partial description.\n\nA board changes inside a `with` block that hands over KiPy's open `Board` and saves at the end only if\nthe block changed it; a block that raises saves nothing. `kicad_sch.edit` does the same for a schematic\n([schematic](references/schematic.md#edit-it)). Run the script with `cad run board.py`:\n\n```python\nfrom cad import kicad_pcb\nfrom kicode.util.units import from_mm\n\nBOARD = \"board.kicad_pcb\"\n\nwith kicad_pcb.edit(BOARD) as b: # the board file is the source; the block edits it in place\n power = [t for t in b.get_tracks() if t.net.name in {\"+5V\", \"+3V3\"}]\n for track in power:\n track.width = from_mm(0.8)\n b.update_items(power)\n b.refill_zones()\ndrc = kicad_pcb.drc(BOARD)\nif not drc.ok:\n raise SystemExit(\"\\n\".join(drc.human_lines())) # each finding, then FAILED and the count\nfor kind in (\"gerbers\", \"drill\", \"pos\", \"bom\", \"step\"):\n kicad_pcb.export(BOARD, to=kind, out=f\"fab/{kind}\")\n```\n\n- **State the result, not the change**: \"U1 is at (10, 20)\", \"the power tracks are 0.8 mm\", never\n \"move U1 5 mm\". Set absolute positions, rotations, widths and nets, and create an item only when the\n board does not hold it yet, so a script stopped halfway and run again ends where one run would.\n- **Import KiPy's names from `kicode`** (`from kicode.proto.common.types import KIID`), never from\n `kipy`: the two cannot share a process.\n- **Coordinates are millimetres, y down.** Footprint-local positions and rotations are transformed into\n the board frame; route to a net's actual pad positions.\n- **Refill changed zones** (`b.refill_zones()`) before relying on their fill.\n- KiCad's first start in a new environment can take a minute.\n\nA board's design starts at its schematic, which says what connects to what: read it, check it with ERC\nand look at each sheet before laying out, and hold the board to it after. Place one functional group at\na time, route the nets whose path matters by hand, and direct cad's router (`cad.kicad.route`, inside\nthe edit, with the plan you give it; never a third-party autorouter) through the rest, with widths\nfor each net's current ([layout](references/layout.md)). A plausible-looking layout does not\nestablish electrical correctness: pin numbers, footprint orientation and connector mating side come\nfrom the datasheet.\n\nFor anything the typed commands do not cover, `cad run kicad-cli ...` runs the fetched KiCad's\ncommand line with its own subcommands and flags (`cad run kicad-cli pcb --help`); `CAD_KICAD_CLI`\ndoes not change which one that is:\n\n```bash\ncad run kicad-cli pcb render --side top --rotate -45,0,45 -o tmp/board.png board.kicad_pcb\ncad run kicad-cli project downgrade --dry-run --target 10.0 board.kicad_pro # then -o DIR without --dry-run\n```\n\nMost of its commands write only their `-o` (it may leave a `.kicad_prl` beside a board it reads).\nThese rewrite the source: `pcb upgrade`, `sch upgrade`, `fp upgrade` and `sym upgrade` without `-o`,\nand `pcb drc --refill-zones --save-board`.\n\n## Check each change\n\nCheck the saved board after every step, from the revision you will hand over:\n\n| The change | Check it with |\n| --- | --- |\n| 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 |\n| Board against schematic | The pin-by-pin comparison in [schematic](references/schematic.md#into-the-board-and-back): every pad on its schematic pin's net |\n| 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 |\n| Placement | `cad kicad_pcb snapshot board.kicad_pcb tmp/placement.png --display placement`: short, uncrossed ratsnest lines mean a group is placed well |\n| Routing | The layout's [property script](references/layout.md#a-property-check): segments off 45 degrees, detours, width for current |\n| How copper and silkscreen look | `cad kicad_pcb snapshot board.kicad_pcb tmp/copper.png --display copper` ([more views](references/views.md#board-snapshots)) |\n| Ready to order | The review below |\n\n- Warnings count: KiCad's silkscreen, mask and courtyard rules are warnings, and they are what a fab's\n CAM engineer flags.\n- Fix the cause; a rule weakened to get a clean report has shown nothing.\n- A clean DRC establishes the board's own rules, not the circuit's correctness and not the fab's\n limits. A number is measured from the board (`kicad_pcb.read`), never read off a snapshot.\n\n## Before ordering\n\nA review of one board for the fab and assembler it will be ordered from is a guided review, not the\nfab's own engineering check. Gather evidence in this order: KiCad's DRC (every error blocks ordering);\nthen what DRC cannot measure, from the board read back and the project's BOM; then the checklist of\nwhat no command measures.\n\n| Area | Reference | Measured by |\n| --- | --- | --- |\n| Fabrication | [review-fabrication](references/review-fabrication.md) | KiCad's DRC against the board's rules; the rest by inspection |\n| Electrical | [review-electrical](references/review-electrical.md) | The board read back: decoupling distances, narrowest track per net |\n| Assembly and sourcing | [review-assembly](references/review-assembly.md) | The part list and placement file |\n\n### Choosing the rules\n\nUse the chosen fab's own capability page for the board's layer count, copper weight and finish, and\ncompare it with the project's Board Setup, which may differ. Where the person names no fab, review\nagainst JLCPCB's standard service and say so. Record each limit's source, date and conditions; a rule\nthat cannot be checked is reported as missing, never invented. A fab's standard tier is a price, not a\nphysical limit.\n\n### The report\n\nScope first (board file and revision, fab and service, layers, copper, finish, assembled or bare),\nthen the findings, errors first, each naming its parts by board reference (`U2`, `C8`, `#net:VBUS`;\n`kicad_pcb.read(path).resolve(ref)` says where one is), with the evidence, the rule and its source,\nthe result and the fix. Then the coverage: checks run, and checks not run with what they need.\n\n| Item | Evidence | Rule | Result | Fix |\n| --- | --- | --- | --- | --- |\n| `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 |\n\nThe result is **pass** (measured, within a cited limit), **fail** (a measured violation or a KiCad\nerror), **review** (a risk a person decides) or **unverified** (evidence or the fab's rule is missing).\nNo findings is not a manufacturability approval. A review alone asks for no edits: fix only when\nasked, and recheck the neighbours of every fix.\n\nExport only the deliverables asked for, from the revision you checked\n([manufacturing](references/manufacturing.md)). A DRC or ERC error blocks writing fabrication files\nunless the person says to go ahead, and the report then names every error they went ahead with.\n\n## Show the model\n\nShow the person each model you create or change as soon as its first run succeeds, and any model\nor file they ask to see. A model's page is the `view:` line its run prints, and a file's is the `url`\nthat `cad viewer --json FILE [FILE ...]` prints for it (never guess the port). Show it with\nthe first of these you have:\n\n1. `cad_show` among your tools (your host may prefix it): call it with the model's id or the file's\n absolute path; its description says the rest.\n2. A tool that opens a page in the app's own browser pane, not in the person's own browser (in the\n Claude desktop app, the Browser pane's `preview_start` with the page's `url`, or its `navigate`):\n open the page there yourself, and give the person the link as well.\n3. Neither: give the person the link, to open in their browser.\n\nThe page follows every run of the model. A file you export is a download: give its path. Showing is\nfor the person: to check your own work, review with `cad <type> snapshot`, never a screenshot\nof the page. If it fails to launch, say so.\n\nWhat the board and schematic pages offer the person (layers, selection, 3D, part models), and what\nthey approximate, is in [views](references/views.md).\n"Full snapshot data
{
"description": "Designs, edits and reviews KiCad circuit boards and schematics (.kicad_pcb, .kicad_sch). Use for any request about a PCB, a schematic or a circuit - parts and nets, placement and routing, ERC and DRC, a review before ordering from JLCPCB, PCBWay or another fab, and fabrication files, a BOM, a netlist or a STEP of the board. Not for the enclosure or other mechanical parts, which the cad skill makes.",
"included_files": [
{
"relative_path": "LICENSE",
"size_in_bytes": 2230
},
{
"relative_path": "agents/openai.yaml",
"size_in_bytes": 268
},
{
"relative_path": "references/board-api.md",
"size_in_bytes": 4254
},
{
"relative_path": "references/checks.md",
"size_in_bytes": 5971
},
{
"relative_path": "references/layout.md",
"size_in_bytes": 13242
},
{
"relative_path": "references/manufacturing.md",
"size_in_bytes": 6004
},
{
"relative_path": "references/parts.md",
"size_in_bytes": 3634
},
{
"relative_path": "references/placement.md",
"size_in_bytes": 10203
},
{
"relative_path": "references/review-assembly.md",
"size_in_bytes": 3121
},
{
"relative_path": "references/review-electrical.md",
"size_in_bytes": 3197
},
{
"relative_path": "references/review-fabrication.md",
"size_in_bytes": 3046
},
{
"relative_path": "references/schematic.md",
"size_in_bytes": 13680
},
{
"relative_path": "references/views.md",
"size_in_bytes": 6765
}
],
"name": "pcb",
"skill_md_contents": "---\nname: pcb\ndescription: Designs, edits and reviews KiCad circuit boards and schematics (.kicad_pcb, .kicad_sch). Use for any request about a PCB, a schematic or a circuit - parts and nets, placement and routing, ERC and DRC, a review before ordering from JLCPCB, PCBWay or another fab, and fabrication files, a BOM, a netlist or a STEP of the board. Not for the enclosure or other mechanical parts, which the cad skill makes.\nlicense: MIT\nmetadata:\n repository: earthtojake/text-to-cad\n---\n\n# PCB design\n\nA board is its native KiCad files: the `.kicad_pcb`, its schematic and its project. text-to-cad reads,\ndraws and inspects them itself, and runs KiCad headless for everything KiCad owns: ERC, DRC, exports\nand edits through its IPC API. There is no board model or build step; the files are the source.\n\n## Start with the task\n\n| Task | Start with | Reference |\n| --- | --- | --- |\n| Read a board or a schematic | `kicad_pcb.read`, `kicad_sch.read` in a script; `cad kicad_pcb inspect` | [Checks](references/checks.md), [schematic](references/schematic.md#read-it) |\n| Draw or edit a schematic | `kicad_sch.edit`, then `cad kicad_sch erc` | [Schematic](references/schematic.md) |\n| Choose parts and footprints | The datasheet, then the project's libraries | [Parts](references/parts.md) |\n| Create or edit a board | `kicad_pcb.edit` ([below](#native-files-are-the-source)) | [Native files](references/board-api.md) |\n| Place and route | The schematic's netlist, one functional group at a time | [Layout](references/layout.md), [placement](references/placement.md) |\n| Check a change | `cad kicad_pcb drc`, snapshots | [Check each change](#check-each-change) |\n| Review before ordering | DRC, then measurements, then the checklist | [Before ordering](#before-ordering) |\n| Export fabrication files, a BOM, or a STEP for an enclosure | `cad kicad_pcb export`, `cad kicad_sch export` | [Manufacturing](references/manufacturing.md) |\n| 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](#show-the-model), [views](references/views.md) |\n\n## Setup\n\nWritten for `cad==0.11.18`. Before first use in a chat, run `cad --version`. If `cad` is missing or older than\n0.11.12, run `uv tool install cad`, adding `--force` if uv says `cad` already exists.\n\nIf cad is a major or minor version newer than this skill, tell the person to update the text-to-cad plugin:\nhttps://github.com/earthtojake/text-to-cad\nA project written for an earlier version may need changes; the migration guides say what:\nhttps://github.com/earthtojake/text-to-cad/tree/main/docs/migrations\n\nReading and inspecting a board or schematic needs no KiCad. DRC, ERC, exports, edits, and drawing a\nboard (its copper pours are refilled on a copy first) run KiCad's own `kicad-cli` and IPC API, which\n`cad` fetches the first time one is needed (kicode: about 100 MB to download, 340 MB on disk, once);\n`cad run` gives a script the same. Things to know about that KiCad:\n\n- **It is a nightly (10.99).** A file it saves is in the nightly's format, which a stable KiCad app\n refuses to open; viewing and snapshots still work, and the viewer tells the person which KiCad on\n this computer can open the file. Say so before the first save of a board the person opens in a\n stable KiCad.\n- **It runs headless with private settings**, never the person's KiCad app or its settings: never open\n a board in KiCad's app to check it. A project library row that names a stock library as KiCad's own\n tables do (`${KICAD10_SYMBOL_DIR}/Device.kicad_sym`) is read from the KiCad the person installed;\n with none installed, ERC warns `lib_symbol_issues` and DRC `lib_footprint_issues`. A project that\n carries its libraries (`${KIPRJMOD}`) needs no KiCad installed.\n- **An edit needs a local socket.** A shell sandbox that refuses sockets (an agent app's default) stops\n an edit at once, saying so: run the script outside the sandbox. Inspecting, DRC, exports and\n snapshots run inside it.\n- **A KiCad the person installed is never run.** Where the fetched one does not run on a computer,\n `CAD_KICAD_CLI` names another `kicad-cli` (KiCad 9 or newer; a nightly's for an edit).\n- **`CAD_KICAD_REFILL=0` in the server's environment turns the refill off**: showing a board then\n downloads nothing, and its pours are drawn as the file saved them.\n\n## Native files are the source\n\nEdit the `.kicad_pcb` itself and keep its `.kicad_pro`, `.kicad_dru`, libraries and schematic beside\nit. Reading or showing a board never writes it. Reread the file before an edit, preserve records and\nUUIDs you do not understand, and never regenerate an existing project from a partial description.\n\nA board changes inside a `with` block that hands over KiPy's open `Board` and saves at the end only if\nthe block changed it; a block that raises saves nothing. `kicad_sch.edit` does the same for a schematic\n([schematic](references/schematic.md#edit-it)). Run the script with `cad run board.py`:\n\n```python\nfrom cad import kicad_pcb\nfrom kicode.util.units import from_mm\n\nBOARD = \"board.kicad_pcb\"\n\nwith kicad_pcb.edit(BOARD) as b: # the board file is the source; the block edits it in place\n power = [t for t in b.get_tracks() if t.net.name in {\"+5V\", \"+3V3\"}]\n for track in power:\n track.width = from_mm(0.8)\n b.update_items(power)\n b.refill_zones()\ndrc = kicad_pcb.drc(BOARD)\nif not drc.ok:\n raise SystemExit(\"\\n\".join(drc.human_lines())) # each finding, then FAILED and the count\nfor kind in (\"gerbers\", \"drill\", \"pos\", \"bom\", \"step\"):\n kicad_pcb.export(BOARD, to=kind, out=f\"fab/{kind}\")\n```\n\n- **State the result, not the change**: \"U1 is at (10, 20)\", \"the power tracks are 0.8 mm\", never\n \"move U1 5 mm\". Set absolute positions, rotations, widths and nets, and create an item only when the\n board does not hold it yet, so a script stopped halfway and run again ends where one run would.\n- **Import KiPy's names from `kicode`** (`from kicode.proto.common.types import KIID`), never from\n `kipy`: the two cannot share a process.\n- **Coordinates are millimetres, y down.** Footprint-local positions and rotations are transformed into\n the board frame; route to a net's actual pad positions.\n- **Refill changed zones** (`b.refill_zones()`) before relying on their fill.\n- KiCad's first start in a new environment can take a minute.\n\nA board's design starts at its schematic, which says what connects to what: read it, check it with ERC\nand look at each sheet before laying out, and hold the board to it after. Place one functional group at\na time, route the nets whose path matters by hand, and direct cad's router (`cad.kicad.route`, inside\nthe edit, with the plan you give it; never a third-party autorouter) through the rest, with widths\nfor each net's current ([layout](references/layout.md)). A plausible-looking layout does not\nestablish electrical correctness: pin numbers, footprint orientation and connector mating side come\nfrom the datasheet.\n\nFor anything the typed commands do not cover, `cad run kicad-cli ...` runs the fetched KiCad's\ncommand line with its own subcommands and flags (`cad run kicad-cli pcb --help`); `CAD_KICAD_CLI`\ndoes not change which one that is:\n\n```bash\ncad run kicad-cli pcb render --side top --rotate -45,0,45 -o tmp/board.png board.kicad_pcb\ncad run kicad-cli project downgrade --dry-run --target 10.0 board.kicad_pro # then -o DIR without --dry-run\n```\n\nMost of its commands write only their `-o` (it may leave a `.kicad_prl` beside a board it reads).\nThese rewrite the source: `pcb upgrade`, `sch upgrade`, `fp upgrade` and `sym upgrade` without `-o`,\nand `pcb drc --refill-zones --save-board`.\n\n## Check each change\n\nCheck the saved board after every step, from the revision you will hand over:\n\n| The change | Check it with |\n| --- | --- |\n| 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 |\n| Board against schematic | The pin-by-pin comparison in [schematic](references/schematic.md#into-the-board-and-back): every pad on its schematic pin's net |\n| 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 |\n| Placement | `cad kicad_pcb snapshot board.kicad_pcb tmp/placement.png --display placement`: short, uncrossed ratsnest lines mean a group is placed well |\n| Routing | The layout's [property script](references/layout.md#a-property-check): segments off 45 degrees, detours, width for current |\n| How copper and silkscreen look | `cad kicad_pcb snapshot board.kicad_pcb tmp/copper.png --display copper` ([more views](references/views.md#board-snapshots)) |\n| Ready to order | The review below |\n\n- Warnings count: KiCad's silkscreen, mask and courtyard rules are warnings, and they are what a fab's\n CAM engineer flags.\n- Fix the cause; a rule weakened to get a clean report has shown nothing.\n- A clean DRC establishes the board's own rules, not the circuit's correctness and not the fab's\n limits. A number is measured from the board (`kicad_pcb.read`), never read off a snapshot.\n\n## Before ordering\n\nA review of one board for the fab and assembler it will be ordered from is a guided review, not the\nfab's own engineering check. Gather evidence in this order: KiCad's DRC (every error blocks ordering);\nthen what DRC cannot measure, from the board read back and the project's BOM; then the checklist of\nwhat no command measures.\n\n| Area | Reference | Measured by |\n| --- | --- | --- |\n| Fabrication | [review-fabrication](references/review-fabrication.md) | KiCad's DRC against the board's rules; the rest by inspection |\n| Electrical | [review-electrical](references/review-electrical.md) | The board read back: decoupling distances, narrowest track per net |\n| Assembly and sourcing | [review-assembly](references/review-assembly.md) | The part list and placement file |\n\n### Choosing the rules\n\nUse the chosen fab's own capability page for the board's layer count, copper weight and finish, and\ncompare it with the project's Board Setup, which may differ. Where the person names no fab, review\nagainst JLCPCB's standard service and say so. Record each limit's source, date and conditions; a rule\nthat cannot be checked is reported as missing, never invented. A fab's standard tier is a price, not a\nphysical limit.\n\n### The report\n\nScope first (board file and revision, fab and service, layers, copper, finish, assembled or bare),\nthen the findings, errors first, each naming its parts by board reference (`U2`, `C8`, `#net:VBUS`;\n`kicad_pcb.read(path).resolve(ref)` says where one is), with the evidence, the rule and its source,\nthe result and the fix. Then the coverage: checks run, and checks not run with what they need.\n\n| Item | Evidence | Rule | Result | Fix |\n| --- | --- | --- | --- | --- |\n| `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 |\n\nThe result is **pass** (measured, within a cited limit), **fail** (a measured violation or a KiCad\nerror), **review** (a risk a person decides) or **unverified** (evidence or the fab's rule is missing).\nNo findings is not a manufacturability approval. A review alone asks for no edits: fix only when\nasked, and recheck the neighbours of every fix.\n\nExport only the deliverables asked for, from the revision you checked\n([manufacturing](references/manufacturing.md)). A DRC or ERC error blocks writing fabrication files\nunless the person says to go ahead, and the report then names every error they went ahead with.\n\n## Show the model\n\nShow the person each model you create or change as soon as its first run succeeds, and any model\nor file they ask to see. A model's page is the `view:` line its run prints, and a file's is the `url`\nthat `cad viewer --json FILE [FILE ...]` prints for it (never guess the port). Show it with\nthe first of these you have:\n\n1. `cad_show` among your tools (your host may prefix it): call it with the model's id or the file's\n absolute path; its description says the rest.\n2. A tool that opens a page in the app's own browser pane, not in the person's own browser (in the\n Claude desktop app, the Browser pane's `preview_start` with the page's `url`, or its `navigate`):\n open the page there yourself, and give the person the link as well.\n3. Neither: give the person the link, to open in their browser.\n\nThe page follows every run of the model. A file you export is a download: give its path. Showing is\nfor the person: to check your own work, review with `cad <type> snapshot`, never a screenshot\nof the page. If it fails to launch, say so.\n\nWhat the board and schematic pages offer the person (layers, selection, 3D, part models), and what\nthey approximate, is in [views](references/views.md).\n"
}SHA-256 of public snapshot: 002ba40292ec73a613ff6ee9742e58f4bf600a753e27af2f0d383736ccb338c7