boom-vitt/kicad-thai/kicad-fab-export

Claude Code and agent skill by boom-vitt/kicad-thai

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Generate a fab-ready manufacturing package from a KiCad 8/9/10 board in one command — Gerber + Excellon drill zip, BOM and pick-and-place (CPL/centroid) in JLCPCB or PCBWay format, optional STEP — and walk through the order settings. Use when the user wants to order or manufacture a PCB or PCBA, export Gerbers, make a BOM or CPL, or says ส่งโรงงาน, สั่งผลิต PCB, สั่งทำแผ่นปริ้น, ทำไฟล์ Gerber, ไฟล์ส่ง JLCPCB, ยิง SMT, ประกอบบอร์ด, ทำ BOM, ไฟล์ตำแหน่งชิ้นส่วน, even if they don't name kicad-cli.

Install

npx vskill@latest install boom-vitt/kicad-thai/kicad-fab-export

SKILL.md

KiCad fab export (Gerber, drill, BOM, CPL)

Reply in Thai when the user writes Thai. Run the checks first: exporting a board that fails DRC just ships the mistake. If kicad-check hasn't passed with the fab's preset in this session, run it before exporting.

One command

bash
python3 "<skill>/scripts/export_fab.py" path/to/project.kicad_pro --fab jlcpcb
python3 "<skill>/scripts/export_fab.py" path/to/project.kicad_pro --fab pcbway
python3 "<skill>/scripts/export_fab.py" path/to/project.kicad_pro --fab generic --no-assembly

Output goes to fab/ next to the project (-o DIR to change) and a JSON summary is printed. Source .kicad_* files are never modified.

FileWhat it is
<name>-gerbers.zipall copper layers found in the board + paste, silk, mask, Edge.Cuts, Excellon drill (mm, decimal) + drill map — upload this
<name>-bom-<fab>.csvgrouped BOM. JLCPCB: Comment, Designator, Footprint, LCSC Part #. PCBWay: their quote template columns
<name>-cpl-<fab>.csvDesignator, Val, Package, Mid X, Mid Y, Rotation, Layer in mm, rotation 0–359
<name>.stepwith --step, for the mechanical/enclosure designer

Options: --no-assembly (bare PCB, no BOM/CPL), --step, --rot PATTERN=DEG (see below), --kicad-cli PATH.

BOM fields: set them in the schematic

The BOM comes from symbol fields, so fix data in the schematic, not in the CSV:

  • JLCPCB assembly needs an LCSC part number (C + digits) per line. The script

reads the first non-empty of these fields: LCSC, LCSC Part, LCSC Part #, LCSC#, JLCPCB Part #, JLC. Lines without one are listed in warnings.

  • PCBWay / Thai EMS quote from Manufacturer + MPN; add both.
  • Parts that must not be fitted: set Do not populate (DNP) in symbol

properties. DNP parts, power symbols and "exclude from BOM" parts are left out.

  • Identical parts are grouped by Value + Footprint + part number, designators

listed in full (R1,R2,R10) because fabs can't parse ranges like R1-R3.

  • Unannotated symbols (R?) stop the export. Parts in the BOM but not on the

board, or with a different footprint on the board, are listed in warnings: the schematic and the board are out of sync — fix with Update PCB from Schematic (F8).

CPL rotations (the classic JLCPCB problem)

KiCad's footprint zero orientation and the assembler's library don't always agree (common with SOT-23, SOT-223, QFN, some diodes and connectors). Export, upload, and check the fab's placement preview. For every part shown rotated wrong, add a correction and export again:

bash
python3 "<skill>/scripts/export_fab.py" board.kicad_pro --fab jlcpcb --rot "SOT-23*=180" --rot "*QFN*=90"

PATTERN is a glob on the footprint name (Package column), first match wins; the degrees are added to KiCad's rotation for top-side parts and subtracted for bottom-side parts (they are seen mirrored). Write down the corrections that worked in the project README so the next order uses them. Bottom-side parts are the other usual suspect: check them in the preview separately.

Ordering

Order-form settings and fab-specific notes for JLCPCB, PCBWay and Thai local fabs: references/fab-houses.md. Before the user pays, summarise: layers, size, thickness, finish, quantity, assembly side(s), number of BOM lines without part numbers, and anything that changes price (castellated holes, impedance control, ENIG, odd colours).

For where to manufacture in Thailand, import VAT on parcels from China and local parts sources, use thai-pcb-sourcing.

Manual commands (if the script can't be used)

bash
kicad-cli pcb export gerbers -o fab/gerbers/ --layers F.Cu,B.Cu,F.Paste,B.Paste,F.SilkS,B.SilkS,F.Mask,B.Mask,Edge.Cuts --subtract-soldermask board.kicad_pcb
kicad-cli pcb export drill -o fab/gerbers/ --format excellon --excellon-units mm --excellon-zeros-format decimal --excellon-separate-th --generate-map --map-format gerberx2 board.kicad_pcb
kicad-cli sch export bom -o fab/bom.csv --fields "Value,Reference,Footprint,LCSC" --labels "Comment,Designator,Footprint,LCSC Part #" --group-by "Value,Footprint,LCSC" --ref-range-delimiter "" --string-delimiter '"' --exclude-dnp board.kicad_sch
kicad-cli pcb export pos -o fab/pos.csv --side both --format csv --units mm --exclude-dnp board.kicad_pcb

Add In1.Cu,In2.Cu,… to --layers for multilayer boards. If a copper layer has a user name ((0 "F.Cu" signal "top_layer") in the board file), also list that name — kicad-cli 8/9 silently skip it otherwise — and count the copper Gerbers in the output before uploading. On KiCad 10 add --check-zones to the Gerber command; on 8/9 refill zones (B) and save first.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/boom-vitt/kicad-thai/kicad-fab-export/badge)](https://verified-skill.com/skills/boom-vitt/kicad-thai/kicad-fab-export)

Something wrong with this skill or its page? Tell us.