This skill should be used when the user asks how to lay out or route a PCB, or about stackups, decoupling, return paths, USB and RF routing, impedance, vias, switching-regulator layout, thermal design, protection, mains creepage and clearance, JLCPCB rules, EMC, CE / FCC marking, or changing a finished board (ECO). It gives sourced rules, numbers and checklists. Load it before giving a layout rule or a spacing, even for a short question, because its numbers are sourced. To review a finished b...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Pcb Design?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/gkochievi-pcb-design)
---
name: pcb-design
description: This skill should be used when the user asks how to lay out or route a PCB, or about stackups, decoupling, return paths, USB and RF routing, impedance, vias, switching-regulator layout, thermal design, protection, mains creepage and clearance, JLCPCB rules, EMC, CE / FCC marking, or changing a finished board (ECO). It gives sourced rules, numbers and checklists. Load it before giving a layout rule or a spacing, even for a short question, because its numbers are sourced. To review a finished board use board-review.
user-invocable: false
---
# PCB design
Sourced design rules for electronics and PCB layout, written as defaults to apply and numbers to use. Use this skill whenever a board is specified, drawn, generated, routed or reviewed. The `kicad-generator` skill turns the decisions into a KiCad project; this skill decides what the board should be.
## How to work
1. **Pin down the requirements before any geometry:** supply range and current per rail, interfaces and their speeds, environment (temperature, humidity, pollution degree, mains or not), enclosure and connector positions, quantity, assembly route (hand / JLCPCB Economic / Standard), budget, certification needs. Ask the user for what cannot be inferred; record the answers in the project README.
2. **Choose the layer count and stackup** (`references/stackups-and-routing.md`, section 1–2): 2 layers for low-speed boards and ESP32 boards with full-speed USB; 4 layers (SIG / GND / GND / SIG on JLC04161H-7628) for controlled impedance, USB high speed, RF feeds or tighter emissions; 1 layer only for cost-driven simple through-hole boards (`references/flex-and-single-sided.md`); flex only when the product bends or folds.
3. **Draw the power tree** with currents, dissipation and protection (`references/power-and-thermal.md`, `references/protection-and-mains-safety.md`; numbers from `engineering-calculators`: trace and via widths, impedance, regulator stages, junction temperatures): input protection order (fuse, reverse block, TVS, filter), regulators with their losses, which rails need sequencing or monitoring.
4. **Pick parts** for availability first (`references/part-selection.md`, `references/jlcpcb-dfm-assembly.md`): JLCPCB basic parts where possible, KiCad standard footprints (missing ones from the datasheet with the `kicad-library` skill), stock for the order quantity, an alternate for every extended part (`parts-sourcing` checks stock, prices and lifecycle through distributor APIs). Verify every LCSC number on its page.
5. **Assign MCU pins** with the module's restrictions (`references/esp32-hardware.md` section 10): strapping pins, flash / PSRAM pins, ADC1 vs ADC2, USB pins, power-up glitches. Write the map once and share it with the firmware.
6. **Floor-plan** (`references/stackups-and-routing.md` section 4): connectors and mechanical parts first at the edges, antenna at an edge with its keep-out, then hot loops, decoupling, crystals, high-voltage areas with their spacing, analog away from switchers, thermal parts with copper and airflow.
7. **Route in priority order:** power hot loops and high-current copper, then differential pairs / RF / crystals / clocks, then sensitive analog, then everything else; ground stitching and pours last. Keep every signal over an unbroken reference plane.
8. **Design for EMC and plan compliance early** (`references/emc-design-and-precompliance.md`, `references/compliance-ce-fcc.md`): know the markets, the directives and the standards before layout; use a pre-certified radio module unless volume pays for RF certification; do a pre-compliance scan before booking a lab.
9. **Review** with `references/design-review-checklist.md` before any order, and again after any change (`board-review` runs the checklist with automated checks). After a board exists, record every change as an ECO and bump the revision (`references/layout-eco-playbook.md`).
## Defaults that apply to almost every board
- One solid ground; never split it to "separate" analog and digital. Separate by placement. Never route a signal across a gap in its reference plane; put a ground via within 5 mm of every layer change of a fast signal.
- Decoupling: the smallest package nearest the pin, vias right at the pads, one via pair per capacitor; a 10–100 µF bulk capacitor where each rail enters.
- Switching regulators: input capacitor first, hot loop smallest and on one layer, switch node small, feedback divider at the IC and away from the switch node and inductor; follow the regulator datasheet's layout when it differs.
- Trace width from current with IPC-2152 (no-plane values on 2-layer boards), not from habit; about one 0.3 mm via per amp at every layer change of a power path, never fewer than two.
- USB 2.0 full speed (ESP32-S3 native USB): keep D+ / D− together, skew within 1.27 mm, no stubs, ESD array at the connector, 5.1 kΩ on each CC pin for a USB-C device; impedance control is optional on a short full-speed run, required for high speed (90 Ω differential).
- Antenna: module at the board edge, no copper on any layer under or beside the antenna, keep metal and the enclosure wall clear by the module datasheet's distance.
- Mains: decide overvoltage category, pollution degree and insulation class first; take clearance and creepage from the tables; slots where creepage is short; a fence of keep-outs and a custom DRC rule so nothing creeps in later. Treat the numbers as a design aid: a certified product needs the standard and a test lab.
- Connectors: keyed and locking where cables can be pulled; current per pin derated; silkscreen pin names readable with the plug in; ESD and reverse-connection protection on every off-board line.
- Manufacturing: stay inside the fab's free rules (JLCPCB: 0.10 / 0.10 mm trace / space on 1–2 layers; 0.3 mm drill vias at 0.45 mm or more cost nothing extra, and the generator's 0.6 / 0.3 mm default keeps margin; 0.2 mm copper to edge); three fiducials for assembly; body-centred CPL coordinates; rotation offsets checked in the fab's preview.
- Test and bring-up: test points on every rail and key signal, a way to measure each rail's current, LEDs on rails, a reset and boot key on MCUs, a programming header or USB.
These defaults summarise the references; where the references give conditions or disagreeing sources, follow the references.
## References
| File | Use for |
|---|---|
| `references/stackups-and-routing.md` | layer count, stackups 1–8 layers, JLCPCB stackups, return paths, floor planning, decoupling, trace widths by purpose, crosstalk, length matching, USB, RF, crystals, impedance tables, vias, pours, EMC |
| `references/power-and-thermal.md` | trace width vs current (IPC-2221 / IPC-2152 tables), vias and via arrays, copper areas, thermal pads and vias, buck / boost / LDO layout and dissipation, power distribution, worked examples |
| `references/protection-and-mains-safety.md` | reverse polarity, TVS, fuses and PTCs, inrush, ESD, 230 VAC clearance / creepage (IEC 60664-1, IEC 62368-1), slots, relays, MOVs and snubbers, optocouplers, KiCad mains DRC rules, mains checklist |
| `references/flex-and-single-sided.md` | 1-layer boards (jumpers, ground layout, THT); flex: materials, bend radius, routing in bends, stiffeners, rigid-flex transitions, JLCPCB flex limits, flex checklist |
| `references/esp32-hardware.md` | ESP32-S3 modules and grades, supply and decoupling, EN circuit, strapping pins, GPIO restrictions, USB-C, UART fallback, antenna, MSL / reflow, pin assignment, C3 / C6 differences, ESP32 checklist |
| `references/jlcpcb-dfm-assembly.md` | JLCPCB capabilities and costs, KiCad rule set for JLCPCB, Economic vs Standard assembly, part spacing, fiducials, Gerbers, BOM / CPL format, rotations, pre-order checklist |
| `references/part-selection.md` | choosing parts for LCSC / JLCPCB assembly, basic vs extended, packages, passive derating, connectors, verifying LCSC numbers, part table template |
| `references/emc-design-and-precompliance.md` | EMC by design: loops and return paths, edge rates and harmonics, cable radiation estimates, filtering, switching regulators, shielding, ESD / EFT / surge levels, pre-compliance with near-field probes, LISN and current probe, FCC Part 15 / CISPR 32 limit tables, EMC checklist |
| `references/compliance-ce-fcc.md` | CE route as of October 2026 (RED with the cybersecurity delegated act and EN 18031, EMC, LVD, RoHS, REACH, WEEE, batteries, GPSR, CRA), harmonised standards for a Wi-Fi / BLE device, technical file, DoC, pre-certified modules, FCC / ISED / UKCA, compliance plan template |
| `references/layout-eco-playbook.md` | changes after a board exists: revision naming, the ECO record, rework techniques, KiCad change workflow and revision diffs, JLCPCB BOM / CPL regeneration, hardware revision IDs for firmware |
| `references/design-review-checklist.md` | the review before ordering: requirements, schematic, parts, layout, mains, manufacturing, firmware cross-check, documentation |
## With the Engineering plugin
When the Engineering plugin is installed, use it around this skill: `/engineering:system-design` or `/engineering:architecture` for the product architecture and the decision record (MCU, power tree, connectivity), `/engineering:testing-strategy` for the bring-up and production test plan, `/engineering:code-review` and `/engineering:debug` for the firmware, `/engineering:deploy-checklist` before ordering boards or releasing firmware, `/engineering:documentation` for the README and assembly notes, `/engineering:incident-response` for a field failure. Apply this skill's rules inside those steps.
## Next step
When this is done, say what comes next: `kicad-generator` or `kicad-projects` to apply the rule, `board-review` to check the result.