kicad-routing
Installation
SKILL.md
Route a board
Route by hand, net by net, after placement (kicad-placement), with board.py (kicad-board-edit): connect,
track, via, gnd_via and zone. Run DRC (printed on every save) until nothing is unconnected.
Rules and net classes
These live in the .kicad_pro JSON; edit it only while the PCB editor is closed.
- Setting them:
board.py ruleswrites the fab's minimums, the Default class and a Power class;set_rules(pro, classes={...})adds others.connectandtracktake their width from the net's class. - Classes:
net_settings.classes, each withname,track_width,clearance,via_diameter,via_drillandpriority(lower wins). - Assigning nets:
net_settings.netclass_patternsentries such as{"netclass": "Power", "pattern": "+5V"}. Patterns match the board's net names exactly (/VBUS) and accept wildcards (/USB_D*). - Minimums:
board.design_settings.rules(min_clearance,min_track_width, …), at or above the fab's limits.
DRC enforces a class's clearance but not its track width. Where width matters, add a rule to <board>.kicad_dru
(comments on their own lines):