From kicad
Use when placing footprints on a PCB, routing traces, adding vias or copper zones, deciding trace widths, or planning board layout strategy. Also use when the user asks about PCB stackup, ground planes, trace spacing, or component placement on a board.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kicad:pcb-layoutThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<CRITICAL-RULE>
EVERY KiCad operation has a corresponding MCP tool. Do NOT claim a tool does not exist without first listing all available tools. Key tools that MUST be used instead of file writes:
add_symbol — create custom symbol definitions in .kicad_sym filescreate_symbol_library — create new .kicad_sym library filescreate_schematic — create new .kicad_sch filescreate_project — create new .kicad_pro project files
If you find yourself thinking "there's no MCP tool for this," you are
wrong. Check the tool list again.
Place footprints and route traces to produce a manufacturable board. This skill assumes you have a completed schematic with a netlist.
When this skill activates, print exactly:
Using pcb-layout to place footprints and route traces.
Then proceed directly to the Pre-flight Checks. This is a mechanical
execution phase — do not ask the user what to do unless board size or
layer count is ambiguous and not specified in specs/bom.md.
Report progress at natural milestones: after footprint placement, after critical trace routing, after autoroute, after post-route refinement. Keep status updates to one line each.
These are the kicad MCP tools you should be using during PCB layout:
Reading / inspection:
list_pcb_footprints — list footprints on the boardlist_pcb_traces — list traces on the boardlist_pcb_nets — list nets on the boardlist_pcb_zones — list zones on the boardlist_pcb_layers — list layers on the boardlist_pcb_graphic_items — list graphic items on the boardget_board_info — get board outline, layer count, design rulesget_footprint_pads — get pad positions and net assignmentsget_footprint_bounds — get board-coordinate bounding box of a placed footprintcheck_placement — check if placing a footprint at (x, y) violates keepout or board edgePlacing and moving footprints:
place_footprint — place a footprint on the boardmove_footprint — reposition a placed footprint (warns on keepout/edge violations)remove_footprint — delete a placed footprintRouting:
add_trace — add a trace segment with layer, width, coordinatesadd_via — add a via at a coordinateautoroute_pcb — run Freerouting autorouter (requires Java 17+, auto-downloads JAR)Post-routing refinement:
add_copper_zone — create a copper zone (ground plane, power fill) with polygon outlineadd_keepout_zone — create a keep-out zone restricting tracks, vias, pads, copper pour, or footprintsfill_zones — compute copper fills for all zones (requires pcbnew)set_trace_width — change width of existing traces by net, layer, or regionadd_thermal_vias — add a via array under a footprint pad (QFN thermal pads)remove_traces — delete traces by net, layer, or regionset_net_class — create/update net classes with design rules (requires pcbnew)remove_dangling_tracks — clean up unconnected trace stubsDrawing and annotation:
add_pcb_text — add silkscreen text or other layer textadd_pcb_line — draw lines (board outline on Edge.Cuts, etc.)Verification and export:
run_drc — run design rules checkexport_pcb — export PCB as PDF/SVGexport_gerbers — export Gerber manufacturing filesexport_3d — export 3D model (STEP/VRML)export_positions — export pick-and-place fileexport_ipc2581 — export IPC-2581 dataexport_hierarchical_netlist — use instead of standard netlist export
for hierarchical designs with sub-sheetsFootprint libraries:
list_lib_footprints — browse .pretty library directoriesget_footprint_info — check pad dimensions and pin mappingBefore starting PCB layout, verify these prerequisites:
run_erc and confirm violation_count = 0.
If ERC has not been run or has violations, STOP and invoke the
verification skill first.validate_hierarchy on the root schematic.
Netlist import fails if references contain ? or have duplicates
across sheets. Fix with annotate_schematic (pass project_path
for hierarchical designs) before proceeding.list_lib_footprints to verify the assigned footprint exists.specs/bom.md exists, cross-reference
footprints against the BOM's footprint column.autoroute_pcb).set_net_class (e.g., "Power" class with 0.5mm+ width)
b. Widen power traces: set_trace_width on power nets (VIN, VOUT, SW, GND paths)
c. Add thermal vias: add_thermal_vias under QFN/exposed pads
d. Clean up: remove_dangling_tracks to remove autorouter stubs
e. Remove and re-route if needed: remove_traces + add_trace for problem areasadd_copper_zone for ground planes on both layers, then fill_zones.Group by functional stage — keep components from each schematic stage physically together. The schematic's block diagram maps directly to PCB placement regions.
Placement priority order:
Orientation conventions:
Spacing minimums:
Use place_footprint with coordinates in mm. Use move_footprint
to adjust after initial placement. Use get_footprint_pads to check
pad locations before routing.
| Current (A) | Min width (mm) | Recommended (mm) | Notes |
|---|---|---|---|
| < 0.3 | 0.15 | 0.25 | Signal traces |
| 0.3–1.0 | 0.25 | 0.5 | Low power |
| 1.0–2.0 | 0.5 | 0.75 | Moderate power |
| 2.0–3.0 | 0.75 | 1.0 | Power traces |
| 3.0–5.0 | 1.0 | 1.5 | High current |
| > 5.0 | Calculate | Calculate | Use IPC-2152 |
These assume 1oz (35um) copper, 10C rise, outer layer. Inner layers need ~2x width for the same current.
Power traces first:
Signal traces:
Return paths:
Sensitive traces:
Use add_trace with layer, width, and coordinate list. Use add_via
to transition between layers.
After using autoroute_pcb, the board has connectivity but needs refinement
before it's manufacturing-ready. The autorouter uses minimum-width traces for
everything and has no concept of power integrity or thermal design.
Step 1: Define net classes
Use set_net_class to establish design rules for power nets:
track_width=0.5 (or wider per current table)
for VIN, VOUT, and other power rails.track_width=1.0 for switch nodes (SW)
and high-current ground paths.Step 2: Widen power traces
Use set_trace_width to bring power traces up to their net class width:
set_trace_width(width=0.5, net_name="VIN")set_trace_width(width=1.0, net_name="SW")Step 3: Add thermal vias
Use add_thermal_vias for any QFN or exposed-pad IC:
add_thermal_vias(reference="U1", rows=3, cols=3, spacing=1.0, via_drill=0.3)Step 4: Clean up
Use remove_dangling_tracks to remove autorouter stubs — trace ends that
connect to nothing. These are cosmetic but will show as DRC warnings.
If any trace routing is unsatisfactory, use remove_traces to delete traces
on a specific net, then re-route manually with add_trace.
Step 5: Add copper zones
Use add_copper_zone on both layers:
fill_zones to compute the actual copper fillStep 6: Final DRC
Run run_drc and fix any remaining violations. Common post-refinement issues:
IMPORTANT: Use TodoWrite to create todos for EACH checklist item below.
validate_hierarchy — no unannotated/duplicate refs2-layer board (default for simple designs):
4-layer board (for complex or noise-sensitive designs):
Rule of thumb: if the design has > 1 switching regulator, > 20 ICs, or any signal > 10MHz, use 4 layers.
Use add_pcb_text for silkscreen annotations. Use add_pcb_line
for board outline on Edge.Cuts layer.
Standard 2-layer PCB fab capabilities (most manufacturers):
| Parameter | Minimum | Recommended |
|---|---|---|
| Trace width | 0.15mm | 0.25mm |
| Trace spacing | 0.15mm | 0.2mm |
| Via drill | 0.3mm | 0.3mm |
| Via annular ring | 0.15mm | 0.2mm |
| Pad to pad | 0.2mm | 0.25mm |
| Copper to edge | 0.3mm | 0.5mm |
After routing is complete:
run_drc — fix all violations before exporting.export_gerbers — full Gerber set for manufacturingexport_positions — pick-and-place file for assemblyexport_3d — 3D model for mechanical fit checkFull export deliverables (post-DRC):
Post-export verification: Confirm Gerber layer count matches design, BOM export matches schematic BOM.
Use list_lib_footprints on .pretty directories to browse available
footprints. Common libraries:
Resistor_SMD.pretty — 0402, 0603, 0805, 1206, etc.Capacitor_SMD.pretty — ceramic SMD capsCapacitor_THT.pretty — electrolytic, film through-holePackage_TO_SOT_SMD.pretty — SOT-23, SOT-223, TO-263, etc.Package_SO.pretty — SOIC, SSOP, TSSOPPackage_QFP.pretty — QFP, LQFP, TQFPConnector_PinHeader_2.54mm.pretty — standard pin headersDiode_SMD.pretty — SMD diodesInductor_SMD.pretty — SMD inductorsUse get_footprint_info to check pad dimensions and spacing before
committing to a footprint.
For complex boards (>30 components, 4+ layers, high-speed signals),
consider creating a pcb-plan artifact following the same pattern as
schematic-plan. For simpler boards, pre-flight checks and existing
placement strategy are sufficient.
npx claudepluginhub productofamerica/mcp-server-kicadRoutes 17 KiCad MCP tools for schematic creation, PCB layout, autorouting, DRC, and Gerber export. Enforces serialized PCB ops and library-first lookup.
Automates KiCad to EasyEDA to JLCPCB PCB workflow: project setup, LCSC part sourcing, pin-map fetching, fully-wired .kicad_pcb generation via pcbnew, and EasyEDA handoff for routing and ordering.
Generates BOM/CPL for JLCPCB assembly, manages ordering workflow, and checks design rules for prototype and production PCBs.