bom

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

BOM Management

BOM管理

BOM data lives in KiCad schematic symbol properties as the single source of truth. This skill orchestrates the full lifecycle: analyze the schematic, search distributors, validate parts, write properties back, export tracking CSVs, and generate order files.
BOM数据存储在KiCad原理图符号属性中,作为唯一可信数据源。此技能统筹管理完整生命周期:分析原理图、搜索分销商、验证零件、写回属性、导出跟踪CSV、生成订购文件。

Related Skills

相关技能

SkillPurpose
kicad
Read/analyze schematics, PCB, footprints
digikey
Search DigiKey, download datasheets (primary prototype source)
mouser
Search Mouser (secondary prototype source)
lcsc
Search LCSC (production/JLCPCB parts)
element14
Search Newark/Farnell/element14 (international)
jlcpcb
PCB fabrication & assembly ordering
pcbway
Alternative PCB fab & assembly
技能用途
kicad
读取/分析原理图、PCB、封装
digikey
搜索DigiKey、下载 datasheet(原型制作首选渠道)
mouser
搜索Mouser(原型制作次要渠道)
lcsc
搜索LCSC(量产/JLCPCB专用零件)
element14
搜索Newark/Farnell/element14(国际渠道)
jlcpcb
PCB制造与装配订购
pcbway
备选PCB制造与装配服务商

Scripts

脚本

Use
<skill-path>
to reference the BOM skill directory.
bash
undefined
使用
<skill-path>
引用BOM技能目录。
bash
undefined

Analyze schematic (JSON output, recursive sub-sheets)

Analyze schematic (JSON output, recursive sub-sheets)

python3 <skill-path>/scripts/bom_manager.py analyze path/to/schematic.kicad_sch --json --recursive
python3 <skill-path>/scripts/bom_manager.py analyze path/to/schematic.kicad_sch --json --recursive

Export BOM tracking CSV (creates new or merges with existing)

Export BOM tracking CSV (creates new or merges with existing)

python3 <skill-path>/scripts/bom_manager.py export path/to/schematic.kicad_sch -o bom/bom.csv --recursive
python3 <skill-path>/scripts/bom_manager.py export path/to/schematic.kicad_sch -o bom/bom.csv --recursive

Generate per-distributor order files (5 boards + 2 spares/line)

Generate per-distributor order files (5 boards + 2 spares/line)

python3 <skill-path>/scripts/bom_manager.py order bom/bom.csv --boards 5 --spares 2
python3 <skill-path>/scripts/bom_manager.py order bom/bom.csv --boards 5 --spares 2

Quick single-distributor order (bypasses Chosen_Distributor column)

Quick single-distributor order (bypasses Chosen_Distributor column)

python3 <skill-path>/scripts/bom_manager.py order bom/bom.csv --distributor digikey
python3 <skill-path>/scripts/bom_manager.py order bom/bom.csv --distributor digikey

Write properties to schematic (dry-run first, then apply)

Write properties to schematic (dry-run first, then apply)

echo '{"R1": {"MPN": "RC0805FR-0710KL", "Manufacturer": "Yageo"}}'
| python3 <skill-path>/scripts/edit_properties.py path/to/schematic.kicad_sch --dry-run
echo '{"R1": {"MPN": "RC0805FR-0710KL", "Manufacturer": "Yageo"}}'
| python3 <skill-path>/scripts/edit_properties.py path/to/schematic.kicad_sch --dry-run

Sync datasheet URLs from manifest.json back into schematic Datasheet properties

Sync datasheet URLs from manifest.json back into schematic Datasheet properties

python3 <skill-path>/scripts/sync_datasheet_urls.py path/to/schematic.kicad_sch --recursive --dry-run
python3 <skill-path>/scripts/sync_datasheet_urls.py path/to/schematic.kicad_sch --recursive --dry-run

Translate KiCad/Altium BOM and CPL files into JLCPCB upload format

Translate KiCad/Altium BOM and CPL files into JLCPCB upload format

(
pnp --bom
filter drops orphan designators — see skills/jlcpcb/SKILL.md

(
pnp --bom
filter drops orphan designators — see skills/jlcpcb/SKILL.md

for the 3-step PCBA upload workflow)

for the 3-step PCBA upload workflow)

python3 <skill-path>/scripts/translate_bom_pnp.py bom input_bom.csv -o jlc_bom.csv python3 <skill-path>/scripts/translate_bom_pnp.py pnp input_cpl.csv -o jlc_cpl.csv --bom jlc_bom.csv
undefined
python3 <skill-path>/scripts/translate_bom_pnp.py bom input_bom.csv -o jlc_bom.csv python3 <skill-path>/scripts/translate_bom_pnp.py pnp input_cpl.csv -o jlc_cpl.csv --bom jlc_bom.csv
undefined

Workflow

工作流程

Skip steps that don't apply. Common shortcuts:
  • "Add Mouser PNs" — search Mouser by MPN for each part → validate → write to schematic → update CSV
  • "Fill in the gaps" — run analyzer with
    --gaps-only
    , address each missing field
  • "Update datasheet URLs" — run
    sync_datasheet_urls.py
    to backfill empty Datasheet fields from the datasheets manifest
  • "Prepare for production" — ensure every part has an LCSC number, check stock, set Chosen_Distributor to LCSC
跳过不适用的步骤。常用快捷操作:
  • "添加Mouser零件编号" —— 通过MPN搜索Mouser的每个零件 → 验证 → 写入原理图 → 更新CSV
  • "填补缺口" —— 使用
    --gaps-only
    参数运行分析器,处理每个缺失字段
  • "更新datasheet链接" —— 运行
    sync_datasheet_urls.py
    ,从datasheets清单回填空的Datasheet字段
  • "量产准备" —— 确保每个零件都有LCSC编号,检查库存,将Chosen_Distributor设置为LCSC

Step 1: Understand the Project

步骤1:了解项目

bash
python3 <skill-path>/scripts/bom_manager.py analyze path/to/schematic.kicad_sch --json --recursive
The output tells you the project's field naming convention, which distributors are populated, what's missing, and the preferred distributor. Also look for an existing BOM tracking CSV in the project directory or
bom/
folder.
The script covers common patterns, but some projects use internal key systems or parametric fields. See
references/part-number-conventions.md
for the full catalog. Read the schematic if something seems off.
bash
python3 <skill-path>/scripts/bom_manager.py analyze path/to/schematic.kicad_sch --json --recursive
输出内容会告知你项目的字段命名规范、已填充的分销商信息、缺失内容以及首选分销商。同时查看项目目录或
bom/
文件夹中是否存在已有的BOM跟踪CSV。
脚本覆盖了常见模式,但部分项目使用内部密钥系统或参数化字段。完整目录请参考
references/part-number-conventions.md
。如果发现异常,请阅读原理图。

Step 2: Sync Datasheets

步骤2:同步Datasheet

Do this immediately. Datasheets are essential context for validation and part selection. Run the preferred distributor's sync first; if some fail, try others — they share the same
datasheets/
directory and skip already-downloaded parts.
bash
python3 <digikey-skill-path>/scripts/sync_datasheets_digikey.py path/to/schematic.kicad_sch --recursive
python3 <lcsc-skill-path>/scripts/sync_datasheets_lcsc.py path/to/schematic.kicad_sch --recursive
python3 <element14-skill-path>/scripts/sync_datasheets_element14.py path/to/schematic.kicad_sch --recursive
DigiKey is best (direct PDF URLs). element14 is reliable (no bot protection). LCSC works for LCSC-only parts. Mouser is a last resort (often blocks downloads).
Tell the user where datasheets are (e.g.,
hardware/<project>/datasheets/
). They'll reference them often.
Cross-revision projects: Use a single shared datasheets directory at the project level rather than per-revision. The same MPN's datasheet doesn't change between revisions.
Re-sync after writing new MPNs (Step 5) — the scripts are idempotent. Then backfill Datasheet URLs into the schematic:
bash
python3 <skill-path>/scripts/sync_datasheet_urls.py path/to/schematic.kicad_sch --recursive
This reads
datasheets/manifest.json
(legacy name
index.json
still supported) and writes discovered datasheet URLs into empty schematic
Datasheet
properties. Opportunistic — only fills blanks. If a schematic already has a different URL, it warns about the mismatch without overwriting (use
--overwrite
to replace). Run with
--dry-run
first to preview.
请立即执行此步骤。Datasheet是验证和零件选择的关键上下文。优先运行首选分销商的同步脚本;如果部分同步失败,尝试其他分销商——它们共享同一个
datasheets/
目录,会跳过已下载的零件。
bash
python3 <digikey-skill-path>/scripts/sync_datasheets_digikey.py path/to/schematic.kicad_sch --recursive
python3 <lcsc-skill-path>/scripts/sync_datasheets_lcsc.py path/to/schematic.kicad_sch --recursive
python3 <element14-skill-path>/scripts/sync_datasheets_element14.py path/to/schematic.kicad_sch --recursive
DigiKey是最佳选择(提供直接PDF链接)。element14可靠性高(无机器人防护限制)。LCSC适用于仅在LCSC售卖的零件。Mouser是最后选择(经常阻止下载)。
告知用户datasheet的存储位置(例如
hardware/<project>/datasheets/
),他们会经常查阅这些文件。
跨版本项目:在项目级别使用单个共享datasheets目录,而非每个版本单独存储。同一MPN的datasheet不会随版本变更而改变。
在步骤5写入新MPN后重新同步——脚本具有幂等性。然后将Datasheet链接回填到原理图中:
bash
python3 <skill-path>/scripts/sync_datasheet_urls.py path/to/schematic.kicad_sch --recursive
该脚本读取
datasheets/manifest.json
(仍支持旧名称
index.json
),并将发现的datasheet链接写入原理图中空的
Datasheet
属性。此操作是机会性的——仅填充空白字段。如果原理图已有不同的链接,脚本会发出不匹配警告但不会覆盖(使用
--overwrite
参数可强制替换)。请先使用
--dry-run
参数预览结果。

Step 3: Gather Part Information

步骤3:收集零件信息

Watch for comma-separated MPNs. Some symbols track multiple physical parts (e.g., battery holder + clip). Split on commas and search each MPN independently — searching the combined string matches the wrong product.
Search strategy based on what's available:
  • Has MPN → search distributors by MPN to get their PNs and stock
  • Has distributor PN but no MPN → search that distributor, get MPN, then search others
  • Has only Value + Footprint → search by description (e.g., "100nF 0402 X7R 16V")
Use the project's preferred distributor first, then alternates. Prototype: DigiKey primary, Mouser secondary. Production: LCSC.
注意逗号分隔的MPN。部分符号会跟踪多个物理零件(例如电池座+弹片)。按逗号拆分并单独搜索每个MPN——搜索组合字符串会匹配错误产品。
根据现有信息选择搜索策略:
  • 已有MPN → 通过MPN搜索分销商,获取其零件编号和库存
  • 已有分销商零件编号但无MPN → 搜索该分销商,获取MPN后再搜索其他渠道
  • 仅有名值+封装 → 通过描述搜索(例如“100nF 0402 X7R 16V”)
优先使用项目的首选分销商,再考虑备选渠道。原型制作:首选DigiKey,次选Mouser。量产:LCSC。

Step 4: Validate Matches

步骤4:验证匹配结果

Don't assume existing PNs are correct — distributor PNs go stale (discontinued, renumbered). Verify existing PNs resolve against the API. If a PN returns 404, flag it for replacement.
For every match, verify:
  1. Package matches the schematic footprint (see cross-reference table below)
  2. Specs match (capacitance, resistance, voltage, tolerance)
  3. Description makes sense (a resistor ref should get a resistor)
  4. Lifecycle — not obsolete or EOL
  5. Datasheet URL is a direct PDF link (not a product page)
If ambiguous, ask the user. A wrong part is worse than a missing part.
不要假设现有零件编号是正确的——分销商零件编号会过期(停产、重新编号)。验证现有零件编号是否能通过API正常查询。如果零件编号返回404,标记为需要替换。
对于每个匹配结果,验证以下内容:
  1. 封装与原理图封装匹配(见下方交叉参考表)
  2. 规格匹配(电容值、电阻值、电压、公差)
  3. 描述合理(电阻参考应匹配电阻产品)
  4. 生命周期——未过时或停产
  5. Datasheet链接是直接PDF链接(而非产品页面)
如果存在歧义,请询问用户。错误的零件比缺失零件更糟糕。

Step 5: Update the Schematic

步骤5:更新原理图

KiCad coexistence. The script detects KiCad's lock file and warns but proceeds. KiCad doesn't auto-detect external changes — it keeps its in-memory copy. If KiCad is open, tell the user: "Close and reopen the schematic (File → Open Recent) to see the changes. Don't save from KiCad first."
If unsaved KiCad work exists, ask them to save first (Ctrl+S), then run the script, then reopen.
bash
echo '{"R1": {"MPN": "RC0805FR-0710KL", "Manufacturer": "Yageo", "DigiKey": "311-10.0KCRCT-ND"}}' \
  | python3 <skill-path>/scripts/edit_properties.py path/to/schematic.kicad_sch
Backups: By default, no
.bak
file is created (git tracks changes). Pass
--backup
if the schematic is not in a git repo or has uncommitted changes the user wants to preserve.
Respect the project's convention. Write to
"Digi-Key_PN"
if that's what exists, not
"DigiKey"
. Use canonical names only for new projects.
Always write Manufacturer alongside MPN — every API returns it, it's free data.
KiCad共存注意事项。脚本会检测KiCad的锁定文件并发出警告,但仍会继续执行。KiCad不会自动检测外部更改——它会保留内存中的副本。如果KiCad处于打开状态,请告知用户:“关闭并重新打开原理图(文件→最近打开)以查看更改。请勿先在KiCad中保存。”
如果KiCad存在未保存的工作,请先让用户保存(Ctrl+S),再运行脚本,最后重新打开。
bash
echo '{"R1": {"MPN": "RC0805FR-0710KL", "Manufacturer": "Yageo", "DigiKey": "311-10.0KCRCT-ND"}}' \
  | python3 <skill-path>/scripts/edit_properties.py path/to/schematic.kicad_sch
备份:默认情况下不会创建
.bak
文件(git会跟踪更改)。如果原理图未在git仓库中,或存在用户想要保留的未提交更改,请传递
--backup
参数。
遵循项目规范。如果项目使用
"Digi-Key_PN"
字段,请写入该字段,而非
"DigiKey"
。仅在新项目中使用标准名称。
始终随MPN一起写入Manufacturer信息——所有API都会返回该信息,这是免费可用的数据。

Step 6: Update the BOM Tracking CSV

步骤6:更新BOM跟踪CSV

bash
python3 <skill-path>/scripts/bom_manager.py export path/to/schematic.kicad_sch -o bom/bom.csv --recursive
CSV columns are dynamic — only distributors the project uses get columns. Base columns: Reference, Qty, Value, Footprint, MPN, Manufacturer. Each active distributor gets a PN column + stock column. Tail columns: Chosen_Distributor, Datasheet, Validated, DNP, Notes.
The Notes column is seeded from schematic
BOM Comments
properties (or aliases like
Notes
,
Remarks
,
Ordering Notes
, etc.) on first export. On re-export, user edits in the CSV take priority — existing Notes values are preserved and schematic-sourced comments won't overwrite them.
Merge behavior: Re-exporting preserves user-managed columns (stock, Chosen_Distributor, Validated, Notes) while updating schematic-derived columns.
bash
python3 <skill-path>/scripts/bom_manager.py export path/to/schematic.kicad_sch -o bom/bom.csv --recursive
CSV列是动态的——仅包含项目使用的分销商列。基础列:Reference、Qty、Value、Footprint、MPN、Manufacturer。每个活跃分销商对应一个零件编号列+库存列。尾部列:Chosen_Distributor、Datasheet、Validated、DNP、Notes。
首次导出时,Notes列会从原理图的
BOM Comments
属性(或
Notes
Remarks
Ordering Notes
等别名)导入数据。重新导出时,CSV中用户编辑的内容优先——现有Notes值会被保留,原理图中的注释不会覆盖它们。
合并行为:重新导出时会保留用户管理的列(库存、Chosen_Distributor、Validated、Notes),同时更新原理图衍生的列。

Step 7: Check Stock

步骤7:检查库存

For each part with a distributor PN, query current stock via the corresponding distributor skill. Update stock columns in the CSV. Stock data goes stale — note the date and re-check before ordering.
If the chosen distributor is out of stock, flag it and suggest the alternate.
对于每个带有分销商零件编号的零件,通过对应分销商技能查询当前库存。更新CSV中的库存列。库存数据会过期——记录日期并在订购前重新检查。
如果首选分销商缺货,标记该零件并建议备选渠道。

Step 8: Set Chosen Distributor

步骤8:设置首选分销商

Factors: stock availability, price at order qty, minimum order/multiples, lead time, shipping consolidation (fewer distributors = fewer shipments).
For prototypes, consolidate to 1-2 distributors (DigiKey + Mouser). For production, LCSC/JLCPCB is cheapest.
考虑因素:库存可用性、订购数量对应的价格、最小订购量/倍数、交货期、发货整合(分销商越少,发货次数越少)。
原型制作:整合到1-2个分销商(DigiKey + Mouser)。量产:LCSC/JLCPCB成本最低。

Step 9: Re-Sync Datasheets & URLs

步骤9:重新同步Datasheet与链接

Re-run Step 2 (download + URL backfill) to pick up parts added in Steps 3-5. Fast — already-downloaded files are skipped.
重新运行步骤2(下载+链接回填),以获取步骤3-5中添加的零件。此操作速度很快——已下载的文件会被跳过。

Step 10: Validate Datasheets Against Design

步骤10:验证Datasheet与设计匹配

Read downloaded datasheets and verify parts are functionally correct for the circuit. This catches wrong-part-number errors that Step 4 might miss.
What to check by type:
  • Passives — voltage rating vs rail voltage, temperature coefficient, power dissipation
  • Regulators — Vin range, Vout, max current, quiescent current
  • MCUs/ICs — supply voltage, I/O levels, peripherals, pinout
  • Connectors — pin count, pitch, current/voltage rating
  • MOSFETs — Vds, Rds(on), gate threshold, thermal dissipation
  • Diodes — Vf, Vr, current rating, recovery time
For large BOMs (50+ parts), focus on power components, critical signal paths, and anything the user flagged. Commodity passives usually don't need deep review.
阅读下载的datasheet,验证零件在电路中的功能是否正确。这可以捕获步骤4可能遗漏的零件编号错误。
按类型检查要点
  • 无源器件——额定电压与电源轨电压、温度系数、功耗
  • 稳压器——输入电压范围、输出电压、最大电流、静态电流
  • MCU/IC——电源电压、I/O电平、外设、引脚分配
  • 连接器——引脚数、间距、电流/电压额定值
  • MOSFET——漏源电压、导通电阻、栅极阈值、散热能力
  • 二极管——正向压降、反向电压、电流额定值、恢复时间
对于大型BOM(50个零件以上),重点检查电源组件、关键信号路径以及用户标记的零件。通用无源器件通常无需深入审查。

Step 11: Generate Order Files

步骤11:生成订购文件

Ask how many boards if not already known — this sets the
--boards
multiplier.
Pre-flight: verify no gaps, CSV is current, Chosen_Distributor is set (or use
--distributor
flag), stock is fresh.
bash
undefined
如果未知,请询问用户需要多少块电路板——这会设置
--boards
乘数。
预检查:验证无缺口、CSV为最新版本、已设置Chosen_Distributor(或使用
--distributor
参数)、库存数据为最新。
bash
undefined

Using Chosen_Distributor column, 5 boards + 2 spares

使用Chosen_Distributor列,5块电路板 + 每列额外2个备用件

python3 <skill-path>/scripts/bom_manager.py order bom/bom.csv -o bom/orders/ --boards 5 --spares 2
python3 <skill-path>/scripts/bom_manager.py order bom/bom.csv -o bom/orders/ --boards 5 --spares 2

Or quick single-distributor order

或快速生成单个分销商的订购文件

python3 <skill-path>/scripts/bom_manager.py order bom/bom.csv --distributor digikey

`--boards` multiplies all quantities. `--spares` adds a flat extra per line after multiplication. `--distributor` bypasses Chosen_Distributor — generates an order for all parts with that distributor's PN.

Comma-separated PNs (accessories) are auto-split into separate order lines. DNP parts excluded. The script produces one file per distributor in the correct upload format (see `references/ordering-and-fabrication.md` for format details).

Present the order summary and let the user review/edit before ordering.

**Cost estimate:** After generating order files, query pricing from distributor APIs at the order quantity and present a total per distributor. See `references/ordering-and-fabrication.md` for the cost summary template.
python3 <skill-path>/scripts/bom_manager.py order bom/bom.csv --distributor digikey

`--boards`参数会乘以所有数量。`--spares`参数会在乘法后为每行添加固定数量的备用件。`--distributor`参数会绕过Chosen_Distributor——为所有带有该分销商零件编号的零件生成订购文件。

逗号分隔的零件编号(配件)会自动拆分为单独的订购行。DNP零件会被排除。脚本会为每个分销商生成一个符合上传格式的文件(格式详情请参考`references/ordering-and-fabrication.md`)。

展示订购摘要,让用户在订购前查看/编辑。

**成本估算**:生成订购文件后,通过分销商API查询订购数量对应的价格,并展示每个分销商的总成本。成本摘要模板请参考`references/ordering-and-fabrication.md`。

BOM Corner Cases & Per-Component Notes

BOM特殊情况与零件备注

Real projects have BOM quirks that don't fit neatly into standard fields. These are the things that get lost between design and ordering — a connector that's only for prototyping, a cable shared between two boards, a part that needs to be ordered from a specific vendor lot. Actively look for these during BOM analysis; don't wait for the user to mention them.
实际项目中的BOM存在不符合标准字段的特殊情况。这些信息容易在设计与订购环节丢失——例如仅用于原型的连接器、两块电路板共享的线缆、需要从特定供应商批次订购的零件。在BOM分析过程中主动查找这些信息,不要等待用户提及。

BOM Comments Field

BOM Comments字段

The
BOM Comments
symbol property (canonical name) captures per-component freeform notes. It flows into the
Notes
column in the exported CSV. The script recognizes many aliases:
BOM Notes
,
Ordering Notes
,
Assembly Notes
,
Notes
,
Remarks
,
Comment
, and underscore/space variants.
When to suggest adding BOM Comments:
  • Component is prototype-only (DNP in production, or vice versa)
  • Component has ordering constraints (minimum order qty, long lead time, specific vendor lot)
  • Component is shared with another board (ribbon cables, mating connectors, shared harnesses)
  • Component has assembly notes (orientation matters, hand-solder only, apply after reflow)
  • Component has substitution rules (acceptable alternates, pin-compatible swaps)
  • Component has conditional population (different value for different product variants/SKUs)
Example values:
"Proto only — DNP in production"
"Shares ribbon cable with power board — don't double-order"
"Must be Murata GRM series, no substitution (validated for EMI)"
"Hand-solder after reflow — temperature sensitive"
"Order 10% extra — fragile QFN rework difficult"
"Use 10K for rev A, 4.7K for rev B"
"Mating connector: Molex 39-01-2040 on cable side"
BOM Comments
符号属性(标准名称)用于捕获每个零件的自由格式备注。它会导入到导出CSV的
Notes
列中。脚本支持多个别名:
BOM Notes
Ordering Notes
Assembly Notes
Notes
Remarks
Comment
以及下划线/空格变体。
建议添加BOM Comments的场景
  • 零件仅用于原型(量产时不安装,反之亦然)
  • 零件有订购限制(最小订购量、长交货期、特定供应商批次)
  • 零件与另一块电路板共享(带状线缆、配对连接器、共享线束)
  • 零件有装配备注(方向重要、仅手工焊接、回流焊后安装)
  • 零件有替代规则(可接受的替代品、引脚兼容的替换件)
  • 零件有条件安装(不同产品变体/SKU使用不同值)
示例值
"仅用于原型——量产时不安装"
"与电源板共享带状线缆——请勿重复订购"
"必须使用Murata GRM系列,不可替代(已通过EMI验证)"
"回流焊后手工焊接——温度敏感"
"多订购10%——QFN封装返修难度大"
"Rev A使用10K,Rev B使用4.7K"
"配对连接器:线缆端使用Molex 39-01-2040"

Where Else to Look for BOM Quirks

其他查找BOM特殊情况的位置

The schematic symbol property is the best place for per-component notes, but projects scatter this information everywhere. Check all of these:
  1. Schematic text annotations — free text placed on the schematic sheet. The
    kicad
    skill's analyzer extracts these as
    text_annotations
    . Look for notes near components about ordering, assembly, or variants.
  2. Title block comments — the title block has numbered comment fields. Sometimes used for board-level BOM notes ("All passives 0402 unless marked", "Order from DigiKey for proto").
  3. Project README / docs — look for
    README.md
    ,
    docs/
    ,
    bom/README.md
    , or any text file mentioning parts, ordering, or assembly. These often contain the highest-level BOM decisions.
  4. Existing BOM CSV Notes column — if a
    bom.csv
    already exists, read the Notes column. The user may have added notes there that aren't in the schematic.
  5. Project-level config (
    .kicad-happy.json
    ) —
    preferred_suppliers
    sets sourcing priority,
    bom
    section sets field naming and grouping conventions. See
    skills/kicad/references/config-reference.md
    for the full schema.
  6. Schematic symbol Description field — sometimes used for assembly notes rather than part description (e.g., "100nF bypass - place close to U3 pin 4").
  7. KiCad custom fields with non-standard names — fields like
    Assembly
    ,
    Order
    ,
    Variant
    ,
    Config
    ,
    SKU
    may contain BOM-relevant info. The analyzer flags these as
    unrecognized_fields
    .
  8. DNP with context — a DNP component may need a note about why it's DNP and when to populate it. KiCad's DNP flag is boolean — the reason belongs in BOM Comments.
原理图符号属性是存储零件备注的最佳位置,但项目会将这些信息分散在各处。请检查以下所有位置:
  1. 原理图文本注释——放置在原理图上的自由文本。
    kicad
    技能的分析器会将这些提取为
    text_annotations
    。查找零件附近关于订购、装配或变体的备注。
  2. 标题栏注释——标题栏包含编号的注释字段。有时用于电路板级BOM备注(“所有无源器件默认0402,除非标记”、“原型从DigiKey订购”)。
  3. 项目README/文档——查找
    README.md
    docs/
    bom/README.md
    或任何提及零件、订购或装配的文本文件。这些通常包含最高级别的BOM决策。
  4. 现有BOM CSV的Notes列——如果已存在
    bom.csv
    ,请阅读Notes列。用户可能已在其中添加了原理图中没有的备注。
  5. 项目级配置
    .kicad-happy.json
    )——
    preferred_suppliers
    设置采购优先级,
    bom
    部分设置字段命名和分组规范。完整架构请参考
    skills/kicad/references/config-reference.md
  6. 原理图符号的Description字段——有时用于装配备注而非零件描述(例如“100nF旁路电容——靠近U3引脚4放置”)。
  7. KiCad非标准名称的自定义字段——
    Assembly
    Order
    Variant
    Config
    SKU
    等字段可能包含与BOM相关的信息。分析器会将这些标记为
    unrecognized_fields
  8. 带上下文的DNP——DNP零件可能需要备注说明为什么不安装以及何时需要安装。KiCad的DNP标记是布尔值——原因应放在BOM Comments中。

Multi-Board / System-Level BOM Concerns

多电路板/系统级BOM注意事项

When a project has multiple boards (e.g., main board + daughter board, or sender + receiver):
  • Shared cables/connectors — document on both boards which connector mates with which, and note "don't double-order" on cables shared between boards
  • Shared power supplies — if boards share a PSU, document which board's BOM includes it
  • Common parts across boards — when ordering, consolidate quantities across boards. Note in each board's BOM which parts are shared
  • Board-specific variants — if the same PCB is used with different stuffing options (e.g., different resistor values for different output voltages), use BOM Comments to document the variant rules
当项目包含多块电路板时(例如主板+子板,或发送器+接收器):
  • 共享线缆/连接器——在两块电路板上记录哪个连接器与哪个配对,并在线缆备注中注明“请勿重复订购”
  • 共享电源——如果电路板共享电源,记录哪块电路板的BOM包含该电源
  • 跨电路板通用零件——订购时整合跨电路板的数量。在每块电路板的BOM中注明哪些零件是共享的
  • 电路板特定变体——如果同一PCB使用不同的装配选项(例如不同电阻值对应不同输出电压),使用BOM Comments记录变体规则

Non-BOM Items

非BOM项目

Some project-specific items aren't on the schematic but need ordering alongside the BOM. Commonly forgotten:
  • Mating connectors & cables — if the schematic has a connector, the other half needs ordering too (board-to-board, ribbon cables, wire harnesses)
  • Stencil — order a framed stencil with the PCBs (~$7 from JLCPCB/PCBWay)
  • Programming/debug adapter — Tag-Connect cable, SWD ribbon, specific USB cable for the board's debug connector
  • Antenna cables — U.FL to SMA pigtails if the board has an RF connector
  • Mounting hardware — standoffs, screws, nuts specific to the enclosure
  • Thermal management — heat sinks, thermal pads for specific components
Track these as rows in the BOM CSV with
Reference
=
--
and a Note, or in a separate
bom/non-bom-items.csv
. Mention them separately in cost estimates.
部分项目特定项目不在原理图上,但需要与BOM一起订购。这些项目常被遗忘:
  • 配对连接器与线缆——如果原理图有连接器,另一半也需要订购(板对板、带状线缆、线束)
  • 钢网——订购PCB时一起订购带框钢网(JLCPCB/PCBWay约7美元)
  • 编程/调试适配器——Tag-Connect线缆、SWD带状线、电路板调试连接器专用USB线缆
  • 天线线缆——如果电路板有RF连接器,需要U.FL转SMA跳线
  • 安装硬件——与外壳匹配的支撑柱、螺丝、螺母
  • 热管理组件——特定零件的散热片、导热垫
将这些作为BOM CSV中的行,
Reference
设为
--
并添加备注,或存储在单独的
bom/non-bom-items.csv
中。在成本估算中单独提及这些项目。

Presenting BOM Comments

展示BOM Comments

When generating reports or order summaries, always surface BOM comments prominently — they're the designer's voice about exceptions and gotchas. Don't bury them. In the order summary, list any component with a BOM comment separately after the main table so the user sees them before clicking "order."
生成报告或订购摘要时,务必突出显示BOM Comments——它们是设计师关于例外情况和注意事项的说明。不要将其隐藏。在订购摘要中,将所有带有BOM Comment的零件单独列在主表格之后,让用户在点击“订购”前看到这些内容。

Package/Footprint Cross-Reference

封装/封装交叉参考表

ImperialMetricKiCad Footprint
02010603
R_0201_0603Metric
04021005
R_0402_1005Metric
06031608
R_0603_1608Metric
08052012
R_0805_2012Metric
12063216
R_1206_3216Metric
Replace
R_
with
C_
or
L_
as appropriate. Prefix with
Resistor_SMD:
,
Capacitor_SMD:
, etc.
英制公制KiCad封装
02010603
R_0201_0603Metric
04021005
R_0402_1005Metric
06031608
R_0603_1608Metric
08052012
R_0805_2012Metric
12063216
R_1206_3216Metric
根据需要将
R_
替换为
C_
L_
。前缀可使用
Resistor_SMD:
Capacitor_SMD:
等。

BOM Diffing

BOM对比

When the schematic changes between revisions, compare the old and new BOM to identify added, removed, and changed parts. Highlight which new parts need sourcing.
当原理图在版本间变更时,对比新旧BOM以识别新增、移除和更改的零件。突出显示需要采购的新零件。

Interactive BOM (ibom)

交互式BOM (ibom)

Generates an HTML page showing component locations on the PCB — essential for hand-assembly.
bash
pip install InteractiveHtmlBom
generate_interactive_bom board.kicad_pcb \
  --dest-dir bom/ --name-format "%f_ibom_%r" \
  --extra-fields "MPN,Manufacturer,DigiKey,Mouser,LCSC" \
  --group-fields "Value,Footprint,MPN" \
  --checkboxes "Sourced,Placed" --dnp-field "DNP" --no-browser
生成HTML页面展示PCB上的零件位置——这对手工装配至关重要。
bash
pip install InteractiveHtmlBom
generate_interactive_bom board.kicad_pcb \
  --dest-dir bom/ --name-format "%f_ibom_%r" \
  --extra-fields "MPN,Manufacturer,DigiKey,Mouser,LCSC" \
  --group-fields "Value,Footprint,MPN" \
  --checkboxes "Sourced,Placed" --dnp-field "DNP" --no-browser

Reference Files

参考文件

Read these when you need detailed lookup data:
  • references/kicad-fields.md
    — field definitions, aliases, S-expression format, part number patterns
  • references/ordering-and-fabrication.md
    — distributor paste formats, gerber export, CPL, cost templates
  • references/part-number-conventions.md
    — detailed analysis of naming patterns across 56+ real projects
需要详细查找数据时,请阅读以下文件:
  • references/kicad-fields.md
    —— 字段定义、别名、S表达式格式、零件编号模式
  • references/ordering-and-fabrication.md
    —— 分销商粘贴格式、Gerber导出、CPL、成本模板
  • references/part-number-conventions.md
    —— 56+实际项目的命名模式详细分析

Production Readiness Checklist

量产就绪检查清单

  • All parts have MPN and LCSC numbers (for JLCPCB) or MPN (for PCBWay)
  • No obsolete or EOL parts
  • Stock verified, basic vs extended parts identified
  • BOM and CPL exported in correct format
  • Gerbers exported and verified
  • Design rules meet manufacturer minimums (see
    jlcpcb
    or
    pcbway
    skill)
  • Prototype fully tested
  • 所有零件都有MPN和LCSC编号(针对JLCPCB)或MPN(针对PCBWay)
  • 无过时或停产零件
  • 已验证库存,区分基础零件与扩展零件
  • 已导出正确格式的BOM和CPL
  • 已导出并验证Gerber文件
  • 设计规则符合厂商最低要求(请参考
    jlcpcb
    pcbway
    技能)
  • 原型已完成全面测试

Generated Files & Cleanup

生成文件与清理

The BOM and distributor skills create files in the project tree. Know what they are so you can clean up or
.gitignore
them.
BOM和分销商技能会在项目目录中创建文件。了解这些文件的用途,以便清理或添加到
.gitignore

Files created in the project directory

项目目录中创建的文件

File/DirCreated ByPurposeKeep in git?
datasheets/
DigiKey, LCSC, element14, Mouser sync scriptsDownloaded PDF datasheetsNo — large binaries, re-downloadable
datasheets/manifest.json
Datasheet sync scriptsTracks download status per MPN (legacy name:
index.json
)
No — regenerated by sync
bom/bom.csv
bom_manager.py export
BOM tracking spreadsheetYes — user-curated data
bom/orders/*.csv
bom_manager.py order
Per-distributor order upload filesNo — regenerated before each order
*.YYYYMMDD_HHMMSS.bak
edit_properties.py --backup
Schematic backup before editsNo — use git instead
The
kicad
skill also creates analyzer JSON and design review markdown reports with user-chosen filenames — see its "Generated Files" section for tracking and cleanup guidance.
文件/目录创建者用途是否纳入git跟踪?
datasheets/
DigiKey、LCSC、element14、Mouser同步脚本下载的PDF datasheet否——大二进制文件,可重新下载
datasheets/manifest.json
Datasheet同步脚本跟踪每个MPN的下载状态(旧名称:
index.json
否——同步时会重新生成
bom/bom.csv
bom_manager.py export
BOM跟踪电子表格是——用户整理的数据
bom/orders/*.csv
bom_manager.py order
分销商专用订购上传文件否——订购前会重新生成
*.YYYYMMDD_HHMMSS.bak
edit_properties.py --backup
编辑前的原理图备份否——使用git替代
kicad
技能还会创建分析器JSON和设计审查markdown报告,文件名由用户选择——请参考其“生成文件”部分了解跟踪和清理指南。

Temporary files (outside project)

临时文件(项目外部)

FileLocationPurpose
digikey_token_cache.json
System temp dirOAuth token cache (9-min TTL, mode 0600)
manifest.tmp
datasheets/
Atomic write staging — renamed to
manifest.json
, never persists
文件位置用途
digikey_token_cache.json
系统临时目录OAuth令牌缓存(9分钟TTL,权限0600)
manifest.tmp
datasheets/
原子写入临时文件——会重命名为
manifest.json
,不会持久化

Cleanup commands

清理命令

bash
undefined
bash
undefined

Remove downloaded datasheets (re-downloadable)

删除下载的datasheet(可重新下载)

rm -rf datasheets/
rm -rf datasheets/

Remove order files (regenerate before ordering)

删除订购文件(订购前重新生成)

rm -rf bom/orders/
rm -rf bom/orders/

Remove schematic backups

删除原理图备份

rm -f *.bak
rm -f *.bak

Remove KiCad analyzer/report files (filenames vary — check project instructions file)

删除KiCad分析器/报告文件(文件名各异——请查看项目说明文件)

undefined
undefined

Suggested .gitignore additions

建议添加到.gitignore的内容

gitignore
undefined
gitignore
undefined

BOM skill working files

BOM技能工作文件

datasheets/ bom/orders/ *.bak

Keep `bom/bom.csv` tracked — it contains user-curated data (Chosen_Distributor, Validated, Notes) that can't be regenerated from the schematic alone.
datasheets/ bom/orders/ *.bak

请跟踪`bom/bom.csv`——它包含用户整理的数据(Chosen_Distributor、Validated、Notes),这些数据无法仅从原理图重新生成。

Tips

提示

  • MPN is the universal key — populate it first, enables cross-referencing everything
  • Schematic is source of truth — all BOM data in symbol properties, exported as needed
  • DigiKey first, Mouser second for prototyping; LCSC for production
  • CSV round-trip — Edit Symbol Fields > Export/Import CSV for bulk updates
  • Field Name Templates (KiCad 9+) — pre-define MPN, Manufacturer, LCSC, DigiKey, Mouser
  • DigiKey token reuse — cached to temp file with 9-minute TTL; no need to re-auth per call
  • Second source — use
    AltMPN
    field for critical parts
  • Price at target qty — prototype pricing != production pricing
  • BOM Comments — use the
    BOM Comments
    symbol property for ordering/assembly quirks that don't fit in standard fields. Flows into CSV Notes column. Check schematic text annotations, README, and existing CSV notes for scattered BOM info too.
  • MPN是通用密钥——优先填充MPN,这是所有交叉引用的基础
  • 原理图是可信源——所有BOM数据存储在符号属性中,按需导出
  • 原型制作首选DigiKey,次选Mouser;量产首选LCSC
  • CSV往返更新——编辑符号字段 > 导出/导入CSV进行批量更新
  • 字段名称模板(KiCad 9+)——预定义MPN、Manufacturer、LCSC、DigiKey、Mouser字段
  • DigiKey令牌复用——缓存到临时文件,TTL为9分钟;无需每次调用重新授权
  • 备选源——对关键零件使用
    AltMPN
    字段
  • 按目标数量定价——原型价格≠量产价格
  • BOM Comments——使用
    BOM Comments
    符号属性存储不适合标准字段的订购/装配特殊情况。它会导入到CSV的Notes列。同时检查原理图文本注释、README和现有CSV备注中分散的BOM信息。