pcb-from-bom
Start a PCB project from an existing LCSC BOM file (CSV with C-numbers) and a design-intent description.
Start a new PCB project from a text description. Sources parts, generates a wired .kicad_pcb, and hands off to EasyEDA for routing + JLCPCB ordering.
> /plugin marketplace add BeckhamLabsLLC/kicad-jlcpcb > /plugin install kicad-jlcpcb@beckhamlabs
How it fires
How this command gets triggered: by you, by Claude, or both.
/pcb-newContext preview
What this command does when you run it.
Start a new PCB project from a text description. Sources parts, generates a wired .kicad_pcb, and hands off to EasyEDA for routing + JLCPCB ordering.
name: pcb-new description: Start a new PCB project from a text description. Sources parts, generates a wired .kicad_pcb, and hands off to EasyEDA for routing + JLCPCB ordering. argument-hint: "[short description of the board you want to design]" allowed-tools: - Read - Write - Glob - Grep - Task - mcp__kicad-jlcpcb__detect_kicad - mcp__kicad-jlcpcb__create_project - mcp__kicad-jlcpcb__load_project - mcp__kicad-jlcpcb__session_resume - mcp__kicad-jlcpcb__lcsc_search - mcp__kicad-jlcpcb__lcsc_resolve_bom - mcp__kicad-jlcpcb__part_pin_map - mcp__kicad-jlcpcb__pcb_generate - mcp__kicad-jlcpcb__fetch_part_library - mcp__kicad-jlcpcb__sch_generate - mcp__kicad-jlcpcb__sch_run_erc - mcp__kicad-jlcpcb__package_for_jlcpcb - mcp__kicad-jlcpcb__easyeda_handoff
Take a text description of a PCB and deliver a ready-to-import KiCad board file the user drags into EasyEDA for routing and ordering.
Call `detect_kicad`. If `meets_min` is false, stop and pass the `install_hint` to the user. KiCad's `pcbnew` Python module is required by `pcb_generate`.
Ask the user where the project should live (default: current working directory) and what to name it.
If a `<parent_dir>/<name>/` directory already exists:
Otherwise, call `create_project` with `parent_dir` and `name`. Each subsequent tool call automatically updates the session file, so mid-flow restarts are safe.
Read the user's description carefully. List the components the board will need: microcontroller, regulator, decoupling caps, connectors, indicator LEDs, etc. For each, write a one-line generic spec like `"3.3V LDO, SOT-23-5, 500mA, basic-tier preferred"`.
Dispatch one `part-sourcer` agent per generic spec, in parallel — a single message with one Task call per spec. Each agent applies the basic-first ladder and returns a structured pick. For parts the user already has LCSC C-numbers for, skip to step 5.
For one or two specs, or when an agent comes back with no match and you want to retry by hand, call `lcsc_search` directly instead: `basic_only=true` first, then `basic_only=false`.
When writing a spec, put the **value and package in the query** (`10k 0603`, `0.1uF 0402`). Values route to an exact structured lookup; `0.1uF` and `100nF` are the same part. Keep queries short — the catalog AND-matches every word, so `TVS SMB 30V` finds parts that `bidirectional TVS diode rated 30 volts in SMB package` does not.
Collect picks into a BOM array of `{lcsc, qty}` rows and call `lcsc_resolve_bom` to validate and tally the extended-part setup fee.
Watch for a `stock_unknown` flag on any resolved part — its JLCPCB stock could not be verified, and you must say so at the checkpoint rather than presenting the number as fact.
Show the user:
Ask whether to swap any extended parts for basic alternatives or proceed. **Do not call `pcb_generate` until the user confirms.**
Construct a spec dict for `pcb_generate`:
{
"name": "<project name>",
"board": {"width_mm": 80, "height_mm": 60, "layer_count": 2},
"components": [
{
"ref": "U1",
"value": "ESP32-C3-WROOM-02",
"lcsc": "C2934560",
"lib": "RF_Module",
"fp": "ESP32-C3-WROOM-02"
},
...
],
"nets": {
"3V3": [["U1", "3V3"], ["C1", "1"], ...],
"GND": [["U1", "GND"], ["C1", "2"], ...],
"SPI_SCK": [["U1", "GPIO10"], ["U2", "SCK"]],
...
}
}**Do not hardcode pin maps.** The plugin auto-fetches them from EasyEDA. Reference pins by their **functional names** (GND, VCC, 3V3, GPIO10, SDA, MOSI, SCK, NSS, etc.) and the plugin resolves them to pad numbers at generation time. If you're unsure what pin names a specific IC exposes, call `part_pin_map` for that C-number first.
For the KiCad stdlib footprint fields (`lib`, `fp`), use standard KiCad footprint library names. Common picks:
Call `pcb_generate` with the spec. First run may pause ~12 seconds per unique IC while the plugin fetches pin maps from EasyEDA. Subsequent runs on the same parts are instant (SQLite cache).
Inspect the result:
**Read `warnings` before you r
From "I want a board that does X" to a wired .kicad_pcb EasyEDA can auto-route and JLCPCB can build — in a single Claude Code conversation. kicad-jlcpcb is a Claude Code plugin + MCP server that automates the tedious half of going from idea to fab.
Start a PCB project from an existing LCSC BOM file (CSV with C-numbers) and a design-intent description.