kicad-pcb-synthesizer

Generate complete KiCad PCB layout files via the pcbnew API.

15|1|Updated Oct 23, 2025
One-click install
npx skills add https://github.com/synqing/K1.hardware --skill kicad-pcb-synthesizer
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: kicad-pcb-synthesizer
Source: https://github.com/synqing/K1.hardware/tree/main/.claude/skills/kicad-pcb-synthesizer
Command: npx skills add https://github.com/synqing/K1.hardware --skill kicad-pcb-synthesizer

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill requires pcbnew, python3.

What problem does it solve?

Manually creating PCB layouts, configuring stackups, and defining design rules is a meticulous and time-consuming process. This Skill automates the generation of a complete PCB layout file using KiCad's Python pcbnew API, configuring stackup, design rules, initial component placement, and pre-routing based on a design specification, saving significant design time and ensuring consistency.

Core Features & Use Cases

  • Automated Board Setup: Configures board dimensions, layer count, and stackup based on manufacturer presets (e.g., JLCPCB 4-layer).
  • Dynamic Design Rules: Defines net classes, trace widths, via sizes, and differential pair settings programmatically.
  • Heuristic Placement & Pre-routing: Performs initial component placement and pre-routes critical nets (power, clocks) to optimize for downstream routing.
  • Use Case: Rapidly generate initial PCB layouts for new designs, ensure consistent design rules across multiple projects, or automate the setup phase for complex board designs.

Quick Start

Example: Setting up a KiCad board with JLC 4-layer stackup

import pcbnew def setup_board(): board = pcbnew.BOARD(); board.SetBoardThickness(pcbnew.FromMM(1.6)); board.SetCopperLayerCount(4); # ... call setup_jlc_4layer_stackup(board, preset) ... drc = board.GetDesignSettings(); drc.SetMinClearance(pcbnew.FromMM(0.15)); return board

Frequently Asked Questions about kicad-pcb-synthesizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate PCB layout generation in KiCad?โ–ผ

Automate PCB layout generation using KiCad's pcbnew Python API to programmatically configure board stackup, design rules, component placement, and pre-routing from a design specification, eliminating manual setup.

Can I configure design rules and net classes programmatically in KiCad?โ–ผ

Yes, the pcbnew API lets you define net classes, trace widths, via sizes, differential pair settings, and clearance rules in code, ensuring consistent design rules across projects.

How do I set up a 4-layer stackup and board properties automatically?โ–ผ

Use the pcbnew API to configure board dimensions, layer count, copper thickness, and manufacturer presets like JLCPCB 4-layer stackup, then apply DRC values programmatically.

Does KiCad's pcbnew API support component placement and routing automation?โ–ผ

Yes, pcbnew enables deterministic component placement heuristics and pre-routing of critical nets like power and clock signals to optimize for downstream manual routing.

What input files do I need to generate a KiCad PCB layout automatically?โ–ผ

You need a design specification file and footprint mapping to provide board requirements; the Skill reads these inputs and generates a complete PCB layout with configured stackup and pre-routed critical nets.

When should I use automated PCB layout generation instead of manual design?โ–ผ

Use automation for rapid prototyping, consistent multi-project setups, complex designs with many design rules, or when initial placement and critical-net pre-routing can accelerate downstream manual routing.