Convert KiCad exported BOM and position files to JLCPCB PCBA order format. Use when: (1) User has KiCad BOM CSV and .pos files, (2) User needs to prepare files for JLCPCB PCBA ordering, (3) User mentions converting KiCad exports for JLCPCB, (4) User asks about CPL (Component Placement List) format. Handles BOM conversion (Designation→Comment, sorting), CPL conversion (negating Y, adding mm suffix), integrates with jlcpcb-component-finder for LCSC numbers.
Convert KiCad exported BOM and position files to JLCPCB PCBA order format. Use when: (1) User has KiCad BOM CSV and .pos files, (2) User needs to prepare files for JLCPCB PCBA ordering, (3) User mentions converting KiCad exports for JLCPCB, (4) User asks about CPL (Component Placement List) format. Handles BOM conversion (Designation→Comment, sorting), CPL conversion (negating Y, adding mm suffix), integrates with jlcpcb-component-finder for LCSC numbers.
KiCad to JLCPCB BOM/CPL Converter
Convert KiCad exported BOM and position files to JLCPCB PCBA order format.
Quick Start
IMPORTANT: This skill includes ready-to-use Python scripts! Use them instead of copying inline code.
Scripts Location
$HOME/.claude/skills/jlcpcb-bom-generate-from-kicad/scripts/
├── convert_to_jlcpcb.py # Main conversion script
├── add_lcsc_numbers.py # Add LCSC part numbers
└── create_parts_mapping.py # Generate mapping template
Basic Usage
# Step 1: Convert KiCad exports to JLCPCB format
python3 $HOME/.claude/skills/jlcpcb-bom-generate-from-kicad/scripts/convert_to_jlcpcb.py \
bom.csv top.pos bottom.pos output_dir/
# Step 2: Add LCSC part numbers (interactive mode)
python3 $HOME/.claude/skills/jlcpcb-bom-generate-from-kicad/scripts/add_lcsc_numbers.py \
output_dir/jlcpcb-bom.csv --interactive
# Or use mapping file
python3 $HOME/.claude/skills/jlcpcb-bom-generate-from-kicad/scripts/add_lcsc_numbers.py \
output_dir/jlcpcb-bom.csv --map parts_mapping.json --filter-test-points
Template Files
Reference templates (downloaded from JLCPCB) are located at:
Exported from KiCad's BOM tool. Format (semicolon-delimited):
"Id";"Designator";"Footprint";"Quantity";"Designation";"Supplier and ref";
1;"U6";"TO-263-2_L10.0-W9.1-P5.08-LS15.2-TL";1;"L7812CD2T-TR";;;
2;"R12,R3,R13";"R0603";3;"5.1k";;;
KiCad Position Files (.pos)
Exported from KiCad's Fabrication Outputs > Component Placement. Format:
# Ref Val Package PosX PosY Rot Side
C1 10uF C1206 46.7500 -12.4325 180.0000 top
R1 10k R0603 38.8600 -29.5025 90.0000 top
Output Files (JLCPCB Format)
JLCPCB BOM CSV
Comment,Designator,Footprint,JLCPCB Part #
L7812CD2T-TR,U6,TO-263-2_L10.0-W9.1-P5.08-LS15.2-TL,C13456
5.1k,"R13,R3,R12",R0603,C23186
The add_lcsc_numbers.py script includes --filter-test-points flag to auto-exclude:
Designators starting with TP, H, MH
Comments like "GND", "+5V", "+12V" (test point labels)
Real-World Example
From the zudo-power-usb-pd project:
# 1. Convert KiCad exports
python3 convert_to_jlcpcb.py \
zudo-pd.csv \
zudo-pd-top.pos \
zudo-pd-bottom.pos \
jlcpcb-ready/
# Output:# ✅ Converted BOM saved to: jlcpcb-ready/jlcpcb-bom.csv# Total components: 43# ✅ Converted CPL saved to: jlcpcb-ready/jlcpcb-cpl.csv# Total components: 72# 2. Add LCSC numbers from project BOM documentation
python3 add_lcsc_numbers.py \
jlcpcb-ready/jlcpcb-bom.csv \
--map parts_mapping.json \
--filter-test-points \
--output jlcpcb-ready/jlcpcb-bom-with-lcsc.csv
# Output:# ✅ Updated BOM saved to: jlcpcb-ready/jlcpcb-bom-with-lcsc.csv# Total components: 38# With LCSC part #: 38# Missing part #: 0# 3. Ready for JLCPCB upload!
Troubleshooting
BOM Upload Fails
Check CSV format (no special characters in designators)
Verify LCSC part numbers are valid (all start with 'C')
Ensure all required fields are present
CPL Upload Fails
Verify coordinate format (must include "mm" suffix)
Check rotation values (must be 0-360)
Ensure Layer field is "Top" or "Bottom" (capitalized)
Components Don't Match
Some LCSC parts may be out of stock temporarily
Check JLCPCB's suggested alternatives
Use jlcpcb-component-finder skill to find replacements
Wrong Coordinate System
If components appear in wrong locations:
Verify Y-coordinates were negated (script does this automatically)
Check KiCad board origin settings
Ensure Gerber and CPL use same origin
Notes
JLCPCB may adjust placement coordinates based on their manufacturing process
Board origin in KiCad affects coordinates - use "Drill/Place file origin" for consistency
Some footprints may need renaming to match JLCPCB's library conventions
Always verify the first assembly order carefully
Integration with Other Skills
This skill works well with:
jlcpcb-component-finder: Search JLCPCB database for LCSC part numbers
easyeda2kicad: Download footprints/symbols for JLCPCB parts
Example workflow:
1. Use easyeda2kicad to download footprints from LCSC
2. Design PCB in KiCad
3. Use THIS skill to convert BOM/CPL
4. Use jlcpcb-component-finder to find missing LCSC numbers
5. Upload to JLCPCB for assembly