AugmentClaude

KiCAD PCB Layout

Design and route circuit boards using KiCAD's PCB editor tools.

Installation

  1. Make sure Claude is on your device and in your terminal.

    Skills load from ~/.claude/skills/ when Claude Code starts up β€” so you need it on your machine first. If you don't have it yet, install it once with the command below, then run claude in any terminal to verify.

    One-time setup
    npm i -g @anthropic-ai/claude-code

    Already have it? Skip ahead.

  2. Paste into Claude Code or into your terminal.

    This copies the whole skill folder into ~/.claude/skills/kicad-pcb-mixelpixx/ β€” the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.

    Faster alternative (instruction-only skills)

    Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates β€” they won't be downloaded and the skill will fail when it tries to load them.

    Quick install (SKILL.md only)
    Sign up to copy
  3. Restart Claude Code.

    Quit and reopen Claude Code (or any other agent that loads from ~/.claude/skills/). New skills are picked up on startup.

  4. Just ask Claude.

    Skills auto-activate when your request matches the skill's description β€” no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the β€œWhat this skill does” section above.

Prefer to read the source first? Open on GitHub.

When Claude uses it

Workflow skill for KiCAD PCB layout and routing via MCP tools. Triggers on: "layout the board", "route traces", "PCB", "place footprints", "copper pour", "board outline", "differential pair", "board setup", "track width", "via", "zone", "design rules", "stackup", "silkscreen".

What this skill does

KiCAD PCB Layout Workflow

This skill guides Claude to perform PCB layout using Konnect MCP tools. ALL modifications go through MCP tools β€” never edit .kicad_pcb files directly.


Prerequisites

PCB layout operations require KiCAD to be running with the board file open. The IPC connection communicates with the running KiCAD instance in real-time.

If connection fails:

  • Tell the user to open KiCAD and load the project
  • The board (.kicad_pcb) must be open in the PCB editor
  • KiCAD's IPC API must be enabled (default in KiCAD 8+)

Toolset Loading

Before any PCB work, load the required toolsets:

load_toolset('pcb_board')        # board outline, layers, setup, stackup
load_toolset('pcb_components')   # place, move, rotate, align footprints
load_toolset('pcb_routing')      # traces, vias, differential pairs

Zones (pcb_board: add_zone; pcb_routing: add_copper_pour), component/net queries (pcb_components: find_component, get_component_list; pcb_board: get_board_info), and bulk placement (pcb_components: place_component_array, align_components, duplicate_component) are already covered by the toolsets loaded above.

Load additional toolsets as needed:

load_toolset('config')           # design rule storage: add_design_rule, list_design_rules
load_toolset('verification')     # run_drc, set_design_rules, get_design_rules, check_clearance

Always call get_active_toolsets() first to see what is already loaded.


Layout Order

Follow this sequence for a clean PCB workflow:

  1. Board outline β€” set_board_size or draw Edge.Cuts geometry
  2. Import netlist β€” sync with schematic (update_pcb_from_schematic)
  3. Place components β€” position all footprints
  4. Route traces β€” connect all nets
  5. Copper pour β€” add ground/power zones last
  6. DRC β€” run design rule check
  7. Save β€” save_project

Do NOT add copper pours before routing is complete β€” they interfere with interactive routing.


Placement

Strategy

  • Group components by functional block (power, digital, analog, connectors)
  • Place ICs first, then their associated passives
  • Decoupling caps: within 2mm of their IC power pins, on same layer
  • Connectors: at board edges, accessible for cables
  • High-frequency components: minimize trace lengths between them
  • Thermal considerations: power components away from sensitive analog

Placement Tools

ToolUse Case
place_componentPosition a single footprint at x,y
move_componentRelocate an existing footprint
rotate_componentRotate footprint (0/90/180/270)
align_componentsAlign multiple components (top/bottom/left/right/center)
place_component_arrayGrid placement for repeated elements

Placement Tips

  • Use mm coordinates (KiCAD default for PCB)
  • Standard grid: 0.5mm for placement, 0.25mm for fine adjustment
  • Check component courtyard overlaps after placement
  • Reference designator text: F.SilkS layer, 1mm height default

Routing

Routing Tools

ToolUse Case
route_pad_to_padDirect connection, auto L-bend routing
route_traceManual segment-by-segment routing
route_differential_pairMatched-length USB/LVDS/Ethernet pairs
add_viaLayer transition
create_netclassDefine width/clearance rules for net groups

route_pad_to_pad

The primary routing tool. Automatically creates an L-shaped trace between two pads.

route_pad_to_pad(from_reference, from_pad, to_reference, to_pad, width, layer)
  • Handles 90-degree bends automatically
  • Specify width in mm (e.g., 0.25 for signal, 0.5 for power)
  • Will use vias if pads are on different layers

route_trace

For manual control over trace path. Specify waypoints.

route_trace(net_name, points, width, layer)
  • Use when auto-routing creates suboptimal paths
  • Provide intermediate points for complex routes
  • Each segment is a straight line between points

route_differential_pair

For high-speed differential signals (USB, HDMI, Ethernet, LVDS).

route_differential_pair(net_positive, net_negative, width, spacing)
  • Maintains constant spacing between P and N traces
  • Matches trace lengths automatically
  • Common pairs: USB_D+/USB_D-, LVDS_P/LVDS_N

Netclasses

Define routing rules for groups of nets:

create_netclass(name, track_width, clearance, via_drill, via_diameter)

Common netclass configurations:

  • Signal: 0.25mm track, 0.2mm clearance
  • Power: 0.5-1.0mm track, 0.3mm clearance
  • USB: 0.3mm track, 0.15mm spacing (90 ohm differential)

Via Defaults

  • Standard signal via: 0.4mm drill, 0.8mm pad diameter
  • Power via: 0.6mm drill, 1.0mm pad diameter
  • Micro via (HDI): 0.1mm drill, 0.3mm pad diameter

Copper Pour

Zone tools live in the pcb_board toolset.

add_zone

Creates a copper pour area (polygon fill).

add_zone(net_name, layer, outline_points, priority)
  • Almost always GND net on both F.Cu and B.Cu
  • Define outline slightly inside board edge (0.5mm inset)
  • Priority: higher number fills on top of lower
  • Add thermal relief to pads (default behavior)

refill_zones

Must call refill_zones after any change that affects copper pour:

  • After adding/moving components
  • After routing new traces
  • After modifying zone outlines
  • After changing design rules

Zones do not auto-update β€” stale fills cause DRC errors.

Zone Tips

  • GND pour on both layers is standard practice
  • Leave spoke thermal reliefs for through-hole pads (easier soldering)
  • Use keepout zones to prevent copper in sensitive areas
  • Zone clearance typically 0.3-0.5mm from traces

Layer Reference

LayerNamePurpose
F.CuFront CopperTop copper traces and pads
B.CuBack CopperBottom copper traces and pads
F.SilkSFront SilkTop silkscreen (text, outlines)
B.SilkSBack SilkBottom silkscreen
F.MaskFront MaskTop solder mask openings
B.MaskBack MaskBottom solder mask openings
Edge.CutsBoard OutlinePhysical board boundary
F.FabFront FabTop fabrication drawing
B.FabBack FabBottom fabrication drawing
F.CrtYdFront CourtyardTop component clearance area
B.CrtYdBack CourtyardBottom component clearance area
In1.CuInner 1Internal copper layer 1
In2.CuInner 2Internal copper layer 2

Layer Usage Guidelines

  • Route signals on F.Cu and B.Cu (2-layer) or add inner layers for complex boards
  • Board outline MUST be on Edge.Cuts (closed polygon or rectangle)
  • Silkscreen for reference designators and polarity marks
  • Courtyard defines minimum spacing between components
  • Use F.Fab/B.Fab for assembly drawings and component outlines

Design Rule Check

After completing layout:

run_drc()

Common DRC errors and fixes:

  • Clearance violation: move trace or component further apart
  • Unconnected net: route missing connection
  • Track too close to edge: move inward from board outline
  • Courtyard overlap: increase spacing between components
  • Zone fill error: run refill_zones

Rules

  1. Never edit .kicad_pcb directly β€” all changes go through MCP tools
  2. Always verify placement after moves β€” components may snap to unexpected positions
  3. Board outline first β€” define the physical boundary before placing anything
  4. Refill zones after changes β€” stale zone fills cause phantom DRC errors
  5. Check DRC before finishing β€” run run_drc() and resolve all errors
  6. Use netclasses for consistency β€” define track widths per net type, not per trace
  7. KiCAD must be running β€” PCB tools require the live IPC connection
  8. Save frequently β€” call save_project after major operations
  9. Load toolsets first β€” check get_active_toolsets() and load what you need
  10. Copper pour last β€” add zones only after routing is substantially complete

Related skills