From claude-resources
Edits and creates KiCad 6+ schematic (.kicad_sch) files: modifies values, adds/removes components, updates connections, generates from specs or ASCII diagrams. Ideal after GUI placement for labels and tweaks.
npx claudepluginhub takazudo/claude-resourcesThis skill uses the workspace's default tool permissions.
Edit KiCad 6+ schematic files (.kicad_sch) using S-expression text format.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
Edit KiCad 6+ schematic files (.kicad_sch) using S-expression text format.
Best practice for adding components:
lib_symbols section with full symbol definitionsWhy this workflow?
lib_symbols - tedious and error-proneWorkflow example:
Before editing, always:
git status to confirm changes can be revertedsym-lib-table for available symbol library names.kicad_sym file(s) referenced in sym-lib-table.kicad_sch for sheet hierarchy and UUIDsClarify with user if needed:
Use the Edit tool for targeted changes. Always copy patterns from existing components in the same file.
Change component value:
(property "Value" "10k" ;; Change to new value
Add new component: Copy existing symbol block from same file, then update:
uuid (generate new unique UUID)(at X Y rotation) coordinates(property "Reference" "R99" - next available designator(property "Value" "..." - component valueAdd wire:
(wire
(pts (xy X1 Y1) (xy X2 Y2))
(stroke (width 0) (type default))
(uuid "a1b2c3d4-e5f6-7890-abcd-ef1234567890")
)
Add net label:
(label "SIGNAL_NAME"
(at X Y rotation)
(effects (font (size 1.27 1.27)) (justify left bottom))
(uuid "a1b2c3d4-e5f6-7890-abcd-ef1234567890")
)
After editing:
a1b2c3d4-e5f6-7890-abcd-ef1234567890)lib_id matches library in sym-lib-table)For any KiCad project, find these key files:
| File | Purpose | Key Info |
|---|---|---|
*.kicad_pro | Project config | Project name, settings |
sym-lib-table | Symbol libraries | Library names and paths |
fp-lib-table | Footprint libraries | Footprint library names |
Root .kicad_sch | Main schematic | Sheet UUIDs, hierarchy |
*.kicad_sym | Symbol definitions | Available component symbols |
Get library prefix: Read sym-lib-table to find (name "...") - use as lib_id prefix (e.g., "mylib:ComponentName").
Get sheet UUID: Read root schematic's (uuid "...") field for root UUID. For sub-sheets, find (sheet ... (uuid "...")) blocks.
CRITICAL: Copy from existing component in same file first! This ensures UUID format and other details match.
If creating from scratch, check the file's UUID format first (quoted vs unquoted), then use:
(symbol
(lib_id "LIBRARY:SYMBOL_NAME")
(at X Y ROTATION)
(unit 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(dnp no)
(uuid UNIQUE-UUID-HERE)
(property "Reference" "R1"
(at X Y 0)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Value" "10k"
(at X Y 0)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Footprint" "LIBRARY:FOOTPRINT"
(at X Y 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(property "Datasheet" ""
(at X Y 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(property "Description" ""
(at X Y 0)
(effects
(font
(size 1.27 1.27)
)
(hide yes)
)
)
(pin "1"
(uuid PIN1-UUID-HERE)
)
(pin "2"
(uuid PIN2-UUID-HERE)
)
(instances
(project ""
(path "/ROOT-UUID"
(reference "R1")
(unit 1)
)
)
)
)
Notes:
"uuid" or unquoted uuid to matchPROJECT_NAME_OR_EMPTY: Check existing components - usually ""ROTATION: 0, 90, 180, or 270 degrees.kicad_sym fileUse built-in power: library:
(symbol
(lib_id "power:GND")
(at X Y 0)
(unit 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(dnp no)
(fields_autoplaced yes)
(uuid "UNIQUE-UUID")
(property "Reference" "#PWR01" (at X Y 0) (effects (font (size 1.27 1.27)) (hide yes)))
(property "Value" "GND" (at X Y 0) (effects (font (size 1.27 1.27))))
(pin "1" (uuid "PIN-UUID"))
(instances
(project "..."
(path "/..." (reference "#PWR01") (unit 1))
)
)
)
Common power symbols: power:GND, power:+5V, power:+12V, power:-12V, power:VCC, power:VDD
| Prefix | Component |
|---|---|
| R | Resistors |
| C | Capacitors |
| L | Inductors |
| D | Diodes |
| U | ICs/Modules |
| J | Connectors |
| TP | Test points |
| F | Fuses |
| #PWR | Power symbols (hidden) |
When adding a NEW symbol type to a schematic, you MUST also add its definition to the lib_symbols section.
KiCad caches symbol definitions inside the schematic file. If you add a symbol instance without adding its definition to lib_symbols, the file will crash on open.
.kicad_sym library file"zudo-bus:CL10B104KB8NNNC")Example lib_symbols entry:
(lib_symbols
(symbol "library-name:SymbolName"
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(property "Reference" "C"
...
)
;; Copy entire symbol definition from .kicad_sym file
;; Including all properties, graphics, and pins
(embedded_fonts no)
)
)
Notes:
"library:Symbol" not just "Symbol"(symbol "Name_0_1" ...) graphics blocks(embedded_fonts no) at the end of each symbol in lib_symbolsALWAYS match the existing file's format exactly. Different KiCad projects may use slightly different S-expression styles. Key variations:
Check how UUIDs appear in the existing file:
;; Some projects use UNQUOTED UUIDs:
(uuid 26efc87e-0264-438c-bf9f-152a5d6f0f11)
;; Some projects use QUOTED UUIDs:
(uuid "26efc87e-0264-438c-bf9f-152a5d6f0f11")
You MUST use the same format as existing UUIDs in the file! Mixing formats causes KiCad to crash on open.
Pins should have uuid on its own line:
(pin "1"
(uuid 00000001-0001-0001-0001-000000000002)
)
The path should have reference and unit on separate lines:
(instances
(project ""
(path "/26efc87e-0264-438c-bf9f-152a5d6f0f11"
(reference "C1")
(unit 1)
)
)
)
Text elements should NOT have (exclude_from_sim no):
;; CORRECT:
(text "POWER INPUT"
(at 25.4 25.4 0)
(effects (font (size 3.81 3.81) (bold yes)))
(uuid a0000001-0001-0001-0001-000000000001)
)
;; WRONG - causes crashes:
(text "POWER INPUT"
(exclude_from_sim no) ;; <-- DO NOT ADD THIS TO TEXT
(at 25.4 25.4 0)
...
)
Net labels follow this format:
(label "SIGNAL_NAME"
(at X Y rotation)
(effects
(font
(size 1.27 1.27)
)
(justify left bottom)
)
(uuid c0000001-0001-0001-0001-000000000001)
)
If the project doesn't have a sym-lib-table file, create one:
(sym_lib_table
(version 7)
(lib (name "library-name")(type "KiCad")(uri "${KIPRJMOD}/symbols/library-name.kicad_sym")(options "")(descr ""))
)
All libraries referenced by lib_id in the schematic MUST be listed in sym-lib-table.
If schematic won't open in KiCad:
KiCad crashes on open:
(exclude_from_sim no)Parenthesis mismatch: Check line-by-line for missing ). Common: deleted symbol block with dangling reference.
Invalid UUID: Must be exactly 36 chars, lowercase hex (0-9, a-f). Quick fix: copy existing UUID and change last 4 digits.
Missing lib_id: Symbol not in library. Check:
sym-lib-table file exists.kicad_sym fileRevert changes:
git checkout -- path/to/file.kicad_sch
Required properties: Reference, Value, Footprint (Datasheet and Description recommended).