$39
| Skill | Purpose |
|---|---|
bom | BOM extraction, enrichment, ordering, and export workflows |
digikey | Search DigiKey for parts (prototype sourcing) |
mouser | Search Mouser for parts (secondary prototype source) |
lcsc | Search LCSC for parts (production sourcing, JLCPCB) |
jlcpcb | PCB fabrication & assembly ordering |
pcbway | Alternative PCB fabrication & assembly |
Handoff guidance: Use this skill to parse schematics/PCBs and extract structured data. Hand off to bom for BOM enrichment, pricing, and ordering. Hand off to digikey/mouser/lcsc for part searches and datasheet fetching. Hand off to jlcpcb/pcbway for fabrication ordering and DFM rule validation.
This skill also handles PDF schematics — reference designs, dev board schematics, eval board docs, application notes, and datasheet typical-application circuits. Common use cases:
Workflow: Read the PDF pages visually → identify components and connections → extract structured data → translate to KiCad symbols and nets → validate against datasheets.
For the full methodology — component extraction, notation conventions, net mapping, subcircuit extraction, KiCad translation, and validation — read references/pdf-schematic-extraction.md.
For deep validation of extracted circuits against datasheets (verifying values, checking patterns, detecting errors), use the methodology in references/schematic-analysis.md.
This skill includes Python scripts that extract comprehensive structured JSON from KiCad files in a single pass. Run these first, then reason about the output.
Read analyzer JSON output directly with the Read tool rather than writing ad-hoc extraction scripts. The JSON schema has specific field names (documented below) that are easy to get wrong in custom code. To extract a specific section: python3 -c "import json; d=json.load(open('file.json')); print(json.dumps(d['key'], indent=2))".
In all commands below, <skill-path> refers to this skill's base directory (shown at the top of this file when loaded).
python3 <skill-path>/scripts/analyze_schematic.py <file.kicad_sch>
Outputs structured JSON (~60-220KB depending on board complexity) with:
vref_source and vout_net_mismatch fieldsSupports modern .kicad_sch (KiCad 6+) and legacy .sch (KiCad 4/5). Hierarchical designs parsed recursively.
Legacy format limitations: For KiCad 5 legacy .sch files, the analyzer provides component and net extraction only — no pin-to-net mapping, no signal analysis, no subcircuit detection. When signal analysis is missing from the output, use supplementary data sources to fill the gaps — see the section below.
When analyze_schematic.py returns incomplete data (typically legacy .sch format — missing pin-to-net mapping, signal analysis, and subcircuit detection), use additional project files to recover full analysis capability. The most valuable source is the .net netlist file, which provides explicit pin-to-net mapping that closes the signal analysis gap entirely.
For detailed parsing instructions, data recovery workflows, and a priority matrix of supplementary sources (netlist, cache library, PCB cross-reference, PDF exports), read references/supplementary-data-sources.md.
Verify analyzer output against reality. The analyzer can silently produce plausible-looking but incorrect results — wrong voltage estimates, missing MPNs, wrong pin-to-net mappings. These don't cause script errors; they just produce bad data that flows into your report. In testing across multiple boards, every project had at least one misleading analyzer output. Cross-reference against the raw .kicad_sch file:
(symbol (lib_id blocks, subtract power symbols. Must match analyzer count exactly.Q_NPN_BEC = pin 1=B, 2=E, 3=C) that doesn't match the actual part. Everything passes consistency checks, but the board is wrong. To catch this:
lib_id suffix encodes a pin ordering assumption. SOT-23 BJTs exist in at least 6 pinout variants (BEC, BCE, EBC, ECB, CBE, CEB); SOT-23 MOSFETs in GDS, GSD, SGD, DSG. If no MPN is specified, there's no way to verify the assumption — flag this as a critical ambiguity.See references/schematic-analysis.md Step 2 for the full verification checklist. If the script fails or returns unexpected results, see references/manual-schematic-parsing.md for the complete fallback methodology.
python3 <skill-path>/scripts/analyze_pcb.py <file.kicad_pcb>
python3 <skill-path>/scripts/analyze_pcb.py <file.kicad_pcb> --proximity # add crosstalk analysis
Outputs structured JSON (~50-300KB depending on board complexity) with:
--proximity)Add --full to include individual track/via coordinates. Supports KiCad 5 legacy format.
Zone fills must be current. The copper presence analysis uses KiCad's filled polygon data, which is computed when the user runs Edit → Fill All Zones (shortcut B) and stored in the .kicad_pcb file. If the board was modified after the last fill, the filled polygon data may be stale and the copper presence results will be inaccurate. When reviewing copper presence data, note whether the fill_ratio seems reasonable — a zone with 0 filled area or is_filled: false likely hasn't been filled.
Zone outline ≠ actual copper. The zone outline_bbox is the user-drawn boundary; filled_bbox is where copper actually exists after clearances, keepouts, and priority cuts. The copper_presence section shows which components have zone copper on the opposite layer — use this for capacitive touch pad isolation, antenna keep-out, and thermal analysis instead of inferring copper presence from zone outlines.
Verify after every run: Confirm footprint count and board outline dimensions against the raw .kicad_pcb file. Verify pad-to-net assignments for IC footprints against the schematic's pin-to-net mapping — this catches library footprint errors where pad numbering doesn't match the symbol pinout. If the script fails, see references/manual-pcb-parsing.md for the fallback methodology.
python3 <skill-path>/scripts/analyze_gerbers.py <gerber_directory/>
Outputs: layer identification (X2 attributes), component/net/pin mapping (KiCad 6+ TO attributes), aperture function classification, trace width distribution, board dimensions, drill classification (via/component/mounting), layer completeness, alignment verification, pad type summary (SMD/THT ratio). Add --full for complete pin-to-net connectivity dump. ~10KB JSON.
If the script fails or returns unexpected results, see references/manual-gerber-parsing.md for the complete fallback methodology for parsing raw Gerber/Excellon files directly.
All scripts output JSON to stdout by default. Use --output file.json to write to a file, --compact for single-line JSON.
Analyzer JSON is worth keeping — these are expensive to regenerate (large schematics take time). Use --output to save them for multi-pass analysis. They're not worth committing to git, but don't delete them between analysis steps.
The analysis workflow creates files in the project tree. Analyzer JSON and design review reports use user-chosen filenames, so track what you create:
CLAUDE.md under a "Generated files" section (create one if needed) so future sessions can find or clean them upCLAUDE.md for the file list — filenames vary per session.| File Type | Example | Regenerable? | Commit to git? |
|---|---|---|---|
Analyzer JSON (--output) | schematic_analysis.json | Yes (expensive) | No |
| Design review report | review.md, power_tree_review.md | Yes | Optional — user may want to keep for reference |
See also the bom skill's cleanup section for datasheets, order CSVs, and backups.
Schematic analyzer top-level keys:
file, kicad_version, file_version, title_block, statistics, bom, components,
nets, subcircuits, ic_pin_analysis, signal_analysis, design_analysis,
connectivity_issues, labels, no_connects, power_symbols, annotation_issues,
label_shape_warnings, pwr_flag_warnings, footprint_filter_warnings,
sourcing_audit, ground_domains, bus_topology, wire_geometry,
simulation_readiness, property_issues, placement_analysis, hierarchical_labels
Optional (present when non-empty): text_annotations, alternate_pin_summary, pin_coverage_warnings, instance_consistency_warnings, pdn_impedance, sleep_current_audit, voltage_derating, power_budget, power_sequencing, bom_optimization, test_coverage, assembly_complexity, usb_compliance, inrush_analysis, sheets
Key nested structures:
statistics: {total_components, unique_parts, dnp_parts, total_nets, total_wires, total_no_connects, component_types, power_rails, missing_mpn, ...}bom[]: {reference, references[], value, footprint, mpn, manufacturer, datasheet, quantity, dnp, ...}components[]: {reference, value, footprint, lib_id, type, mpn, datasheet, dnp, in_bom, parsed_value, ...}nets{net_name}: {pins[], wires, labels[], ...} — each pin: {component, pin_number, pin_name, pin_type, ...} (NOT ref or pin)signal_analysis: {power_regulators[], voltage_dividers[], rc_filters[], opamp_circuits[], transistor_circuits[], bridge_circuits[], crystal_circuits[], current_sense[], decoupling_analysis[], protection_devices[], buzzer_speaker_circuits[], design_observations[], ...}PCB analyzer top-level keys:
file, kicad_version, file_version, statistics, layers, setup, nets,
board_outline, component_groups, footprints, tracks, vias, zones,
connectivity, net_lengths
Optional: power_net_routing, decoupling_placement, ground_domains, current_capacity, thermal_analysis, layer_transitions, placement_analysis, silkscreen, dfm, board_metadata, dimensions, groups, net_classes, tombstoning_risk, thermal_pad_vias, copper_presence, trace_proximity
Key nested structures:
net_lengths is a list (not dict): [{net, net_number, total_length_mm, segment_count, via_count, layers{}}, ...] sorted by length descendingpower_net_routing is a list: [{net, track_count, total_length_mm, min_width_mm, max_width_mm, widths_used[]}, ...]footprints[]: {reference, value, footprint, layer, pads[], sch_path, sch_sheetname, sch_sheetfile, connected_nets[], ...}statistics: {footprint_count, copper_layers_used, smd_count, tht_count, zone_count, via_count, routing_complete, ...}Gerber analyzer top-level keys:
statistics, completeness, alignment, drill_classification, pad_summary,
board_dimensions, gerbers, drills
Workflow: When analyzing a KiCad project, scan the project directory for all available file types and run every applicable analyzer — not just the one the user mentioned. A complete analysis uses all the data available:
.kicad_sch, .kicad_pcb, .kicad_pro, gerber directories, and .net/.xml netlist filesanalyze_schematic.py. If the PCB exists, run analyze_pcb.py. If gerbers exist, run analyze_gerbers.py. Run them in parallel when possible..kicad_pro project file directly (it's JSON) for design rules, net classes, and DRC/ERC settingsreferences/report-generation.md for the report template.The more data sources you combine, the more confident the analysis. A schematic-only review misses layout issues; a PCB-only review misses design intent. Always use everything available.
Default to thorough analysis unless the user asks for a quick review. The reason: the bugs that kill boards are the ones that look correct at a glance. A spot-check might confirm 5 ICs are correct while the 6th has pins 3 and 4 swapped — and that's the one that kills the board. Thoroughness principles:
Datasheets are what separate a consistency check from a correctness check. Without them, you can confirm the design agrees with itself — but not that it matches the real-world parts. Obtain datasheets early in the workflow.
Automated sync (preferred): Run datasheet sync scripts early in the workflow. They download datasheets for all components with MPNs into a shared datasheets/ directory with an index.json manifest. Run the preferred source first; if some parts fail, try others — they share the same directory and skip already-downloaded files.
python3 <digikey-skill-path>/scripts/sync_datasheets_digikey.py <file.kicad_sch>
python3 <lcsc-skill-path>/scripts/sync_datasheets_lcsc.py <file.kicad_sch>
python3 <element14-skill-path>/scripts/sync_datasheets_element14.py <file.kicad_sch>
python3 <mouser-skill-path>/scripts/sync_datasheets_mouser.py <file.kicad_sch>
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).
Check for existing datasheets: Before downloading, look for:
<project>/datasheets/ with index.json (from a previous sync)<project>/docs/ or <project>/documentation/Datasheet property URLs embedded in the KiCad symbolsFallback methods when automated sync isn't available or misses parts:
Datasheet property URL from the schematic symbol — many KiCad libraries include direct PDF linksdigikey skill to search by MPN and download individual datasheetsWhat to extract from each datasheet (note page/section/figure/equation numbers for citations):
For passives: While individual resistor/capacitor datasheets are rarely needed, verify the component values against the IC datasheets that specify them. The IC's datasheet says "use a 10µF input cap" — verify the schematic actually has 10µF there, not 1µF.
When both files exist, cross-reference them. This catches the most expensive bugs — swapped pins, missing nets, and footprint mismatches pass DRC/ERC but produce non-functional boards.
Footprint property vs actual PCB footprint (e.g., SOT-23 vs SOT-23-5).The PCB analyzer's sch_path, sch_sheetname, and sch_sheetfile fields in each footprint enable automated cross-referencing.
Detailed methodology and format documentation lives in reference files. Read these as needed — they provide deep-dive content beyond what the scripts output automatically.
| Reference | Lines | When to Read |
|---|---|---|
schematic-analysis.md | 1117 | Deep schematic review: datasheet validation, design patterns, error taxonomy, tolerance stacking, GPIO audit, motor control, battery life, supply chain |
pcb-layout-analysis.md | 414 | Advanced PCB: impedance calculations, differential pairs, return paths, copper balance, edge clearance, copper-sensitive components (capacitive touch, antennas), custom analysis scripts |
file-formats.md | 361 | Manual file inspection: S-expression structure, field-by-field docs for all KiCad file types, version detection |
gerber-parsing.md | 729 | Gerber/Excellon format details, X2 attributes, analysis techniques |
pdf-schematic-extraction.md | 315 | PDF schematic analysis: extraction workflow, notation conventions, KiCad translation |
supplementary-data-sources.md | 301 | Legacy KiCad 5 data recovery: netlist parsing, cache library, PCB cross-reference |
net-tracing.md | 109 | Manual net tracing: coordinate math, Y-axis inversion, rotation transforms |
manual-schematic-parsing.md | 285 | Fallback when schematic script fails |
manual-pcb-parsing.md | 457 | Fallback when PCB script fails |
manual-gerber-parsing.md | 621 | Fallback when Gerber script fails |
report-generation.md | 479 | Report template (critical findings at top), analyzer output field reference (schematic/PCB/gerber), severity definitions, writing principles, domain-specific focus areas, known analyzer limitations |
standards-compliance.md | 597 | IPC/IEC standards tables: conductor spacing (IPC-2221A Table 6-1), current capacity (IPC-2221A/IPC-2152), annular rings, hole sizes, impedance, via protection (IPC-4761), creepage/clearance (ECMA-287/IEC 60664-1). Consider for all boards; auto-trigger for professional/industrial designs, high voltage, mains input, or safety isolation. |
For script internals, data structures, signal analysis patterns, and batch test suite documentation, see scripts/README.md.
| Extension | Format | Purpose |
|---|---|---|
.kicad_pro | JSON | Project settings, net classes, DRC/ERC severity, BOM fields |
.kicad_sch | S-expr | Schematic sheet (symbols, wires, labels, hierarchy) |
.kicad_pcb | S-expr | PCB layout (footprints, tracks, vias, zones, board outline) |
.kicad_sym | S-expr | Symbol library (schematic symbols with pins, graphics) |
.kicad_mod | S-expr | Single footprint (in .pretty/ directory) |
.kicad_dru | Custom | Custom design rules (DRC constraints) |
fp-lib-table / sym-lib-table | S-expr | Library path tables |
.sch / .lib / .dcm | Legacy | KiCad 5 schematic, symbol library, descriptions |
.net / .xml | S-expr/XML | Netlist export, BOM export |
.gbr / .g* / .drl | Gerber/Excellon | Manufacturing files (copper, mask, silk, outline, drill) |
For version detection and detailed field-by-field format documentation, read references/file-formats.md.
For a thorough datasheet-driven schematic review — identifying subcircuits, fetching datasheets, validating component values against manufacturer recommendations, comparing against common design patterns, detecting errors, and suggesting improvements — read references/schematic-analysis.md. Use this reference whenever the user asks to review, validate, or analyze a schematic in depth.
Fetching datasheets: When the analysis requires datasheet data, use the DigiKey API as the preferred source (see the digikey skill) — it returns direct PDF URLs via the DatasheetUrl field without web scraping. Search by MPN from the schematic's component properties. Fall back to WebSearch only for parts not on DigiKey.
For advanced layout analysis beyond what the PCB analyzer script provides — impedance calculations from stackup parameters, DRC rule authoring, power electronics design review techniques, differential pair validation, return path analysis, copper balance assessment, board edge clearance rules, and manual script-writing patterns — read references/pcb-layout-analysis.md.
Most routine PCB analysis (via types, annular ring, placement, connectivity, thermal vias, current capacity, signal integrity, DFM scoring, tombstoning risk, thermal pad vias) is handled automatically by analyze_pcb.py. Use the reference for deeper manual investigation.
Schematic — verify: decoupling caps on every IC VCC/GND pair, I2C pull-ups, reset pin circuits, unconnected pins have no-connect markers, consistent net naming across sheets, ESD protection on external connectors, power sequencing (EN/PG), adequate bulk capacitance.
PCB — verify: power trace widths for current (IPC-2221), via current capacity, creepage/clearance for high voltage, decoupling cap proximity to IC power pins, continuous ground plane (no splits under signals), controlled impedance traces (USB/DDR), board outline closed polygon, silkscreen readability. Consider references/standards-compliance.md for IPC/IEC standard values — conductor spacing and current capacity are relevant for most boards; creepage/clearance and via protection apply to mains-connected or safety-isolated designs.
Common bugs (ranked by board-killing potential): swapped IC pins (library symbol vs datasheet pinout — invisible to DRC/ERC), transistor pinout ambiguity (SOT-23 without MPN — symbol assumes a pin ordering that may not match the real part; assess plausibility against common conventions when verification isn't possible), wrong footprint pad numbering, missing nets from un-synced schematic→PCB, wrong package variant (SOT-23 vs SOT-23-5), floating digital inputs, missing bulk caps, reversed polarity, incorrect feedback divider values, wrong crystal load caps, USB impedance mismatch, QFN thermal pad missing vias, connector pinout errors, unusual passive values (a value that's technically valid but uncommon for the application — e.g., a non-standard pull-up resistance, an unusual decoupling capacitor value).
When producing a design review report, read references/report-generation.md for the standard report template, severity definitions, writing principles, and domain-specific focus areas. The report format covers: overview, component summary, power tree, analyzer verification (spot-checks), signal/power/design analysis review, quality & manufacturing, prioritized issues table, positive findings, and known analyzer gaps. Always cross-reference analyzer output against the raw schematic before reporting findings.
When comparing two designs, diff: component counts/types, net classes/design rules, track widths/via sizes, board dimensions/layer count, power supply topology, KiCad version differences.
vref_source"lookup""heuristic"vout_net_mismatch