Repair Flat Symbols
repair_flat_symbolsRepairs flat vendor symbols that crash kicad-skip by wrapping pins and graphics in a proper sub-unit, making .kicad_sym and .kicad_sch files parseable.
Instructions
Repair "flat" vendor symbols so schematic tools can parse the file.
SnapEDA/SamacSys .kicad_sym captures often put pins and graphics directly under the top-level (symbol "NAME" ...) with no _1_1 sub-unit. KiCad and kicad-cli tolerate this, but the kicad-skip parser used by the schematic edit/inspect tools (list_schematic_components, batch_connect, ...) crashes on it — for any sheet that uses, or embeds a snapshot of, such a symbol.
This tool wraps the drawable/pin children in a proper (symbol "NAME_1_1") sub-unit via pure text insertion (formatting preserved, render-neutral). Works on standalone .kicad_sym libraries and on the embedded (lib_symbols) block of a .kicad_sch. Idempotent; already-wrapped and extends-derived symbols are skipped. Dry-run by default — files are edited in place, so keep them under version control before repairing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | .kicad_sym library or .kicad_sch schematic to repair | |
| dryRun | No | Report flat symbols without writing (default true) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |