--- name: kicad-layout description: Place components and route KiCad PCB layouts with footprint checks, schematic pin swaps, and signal integrity best practices. --- #### The purpose of this skill is to help the agent do good layout. It helps the agent understand it's short commings and encourages it to complete layout steps that it typically dismisses. It has been written specifically for GPT-6-Astra and claude-fable-5.1 and specifically adresses those, but other agents can still work with it. For humans: as models become better and tools become better, a lot of this becomes unecessary bloat, make sure to keep it up to date. ## Editing the active board in place For normal placement, routing, and cleanup, resolve the canonical board from the project root's `.backplane.json` (`project`, or explicit `pcb`) and keep that exact path. Save meaningful milestones, including unfinished work, to it with IPC `SaveDocument` or the tool's `--save`; do not wait for the final board. Read back the saved path and show that canonical file with `viewer_show` then verify the viewer and history refer to that saved file; report any mismatch. Preserve `.backplane.json` companions and existing history. The person may be editing the same board or schematic in KiCad while you work, and other agents too: edit through IPC, which reaches the open editor live. Never ask the person to close KiCad, save, revert, stop editing or wait for you, and never rewrite the .kicad_pcb, .kicad_sch, .kicad_pro or .kicad_dru file directly while KiCad has the project open; change design rules by name over IPC (EditCustomRules) and net classes and board setup over IPC, so nobody's rules are overwritten. An update answered ISC_DEFERRED (or a delete IDS_DEFERRED) touches what the person is editing right now: it lands when they finish, merged with their edit; check GetNotices. Keep backups and intermediate outputs in a separate backup/build directory. If a tool writes a staging file, validate it and promote it back to the canonical path with a backup before continuing. Never leave progress only in memory or a final copy, or silently change the active filename. Use an alternate board only for an explicitly requested experiment, labeled clearly. Only one agent/process writes a board; other agents may inspect or prepare changes for integration. - Make sure that footprints are good for each part and try to get decent 3d models. if you can't find good 3d models, just create your own low fidelity 3d models. keep the projects library structure but prefer to put stuff on a self contained project library files. - When you have access to kicad IPC(-type) tools, or kiPy, always strongly prefer to use them. - For component placement, use the layout-placement skill: it orders parts by how little distance each connection tolerates and has IPC scripts to move parts and check distances and routability. - Routing: in Backplane, route with the `kicad_edit` tool's `route` op. It routes a list of nets at the net class's width and clearance with the via kinds the board already uses, and its answer carries what KiCad's DRC says the edit added. Do not write your own router, do not look for one among the skills' scripts, and do not work track coordinates out by hand for a whole net; place a track yourself (`add`) only where you want one particular path, and say why. Look at what it routed (layers, vias, length) as you would at your own work and redo what breaks a practice below (`ripup`). Where there is no such tool: route manually, and only for very complex boards (low pitch, ~thousands of nets) reach for an autorouter such as tscircuit or freerouting. But make an effort to avoid autorouters in general, use your discretion to figure out when they the best tool for the job which high certainty but always rigorously check their output as it can be quite "off" - Unless specifically instructed otherwise: Feel free and compeled to make changes to the schematic in order to make layout more logical and clean. Perform pin swaps and stuff like that so traces are shorter, have less layer jumps and generally are cleaner. But this comes with risks, be very careful not to disturb any of the projects goals or functionality during those pin swaps. and be very careful not to introduce new bugs to the schematic. - Again, on layout as well, you are free (unless instructed otherwise) to change even high level placement until you get an easily routable and fully functional board. - All of the above should also be respectful of layout and routing best practices. You need to reason about high level and low level best practices and how necessary each one is. do that at every level when you have any doubt at all. a quickly routed board is useless if it routed with bad practices. you already know most of these practices these are so act accordingly and logically. if you are not certain of any theoretical part/practice, feel free to research online. - some specific (not all) concepts/practices that are often dismissed by agents (so you need to think about) are: good via stitching, affects of coplanar ground to trace impedance, high-frequency-dead-copper and coupled noise through it, clean return paths for everything that is important, use discretion. - make sure connectors are accessible. checkout what direction should be facing out and where wires will go, make sure it is indicated on the 3d models, and even look at quick 3d renders to validate if you need to - if you don't like something about the layout after you are deep into it, you are free to think at a higher level and decide to redo part of it or almost all of it if it is appropriate.