بنقرة واحدة
pcb-library
Footprint library management — search, list, inspect footprint details (KiCAD MCP tools 32-35)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Footprint library management — search, list, inspect footprint details (KiCAD MCP tools 32-35)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Full PCB verification loop using local kicad-cli (DRC + 3D render + gerbers)
Create a new Claude Code skill for this project. Use when you need to add a new skill, improve an existing skill, or convert a workflow into a reusable skill.
Verifies that every PCB pad-to-net assignment matches the manufacturer datasheet pin specifications. Use when changing board.py/routing.py/footprints.py, after GPIO remapping, before releases, or when adding new components. Automated guard against wiring errors like unconnected VBUS, wrong pin assignments, or missing GND connections.
Design intent adversary — cross-checks GPIO, nets, power chains, signal paths across firmware/schematic/PCB/datasheet sources to find lost connections and inconsistencies
Analyze a DFM report and fix all issues in the PCB generation scripts
Run DFM guard tests and add new regression tests after fixing PCB issues
| name | pcb-library |
| model | claude-opus-4-7 |
| description | Footprint library management — search, list, inspect footprint details (KiCAD MCP tools 32-35) |
| disable-model-invocation | true |
| allowed-tools | Bash, Read, Grep, Glob, WebSearch, WebFetch |
| argument-hint | ["list | search <query> | info <footprint> | pads <footprint>"] |
Map KiCAD MCP library tools to our project's custom footprint infrastructure and the KiCad CLI.
Footprints are defined procedurally in scripts/generate_pcb/footprints.py. Each footprint is a Python function that returns a list of pad S-expression strings for embedding inside a (footprint ...) block. Coordinates are relative to the footprint origin (center).
Pad dimensions are sourced from:
Depending on the argument:
list: Show all registered footprints from our custom library:
cd /Users/pierrejonnycau/Documents/WORKS/esp32-emu-turbo && python3 -c "
import inspect
from scripts.generate_pcb import footprints as FP
funcs = [name for name, obj in inspect.getmembers(FP) if inspect.isfunction(obj) and not name.startswith('_')]
for f in sorted(funcs):
print(f)
"
search <query>: Search the KiCad official footprint library:
kicad-cli fp search "<query>"
Or use WebSearch for datasheets and JLCPCB part footprints.
info <footprint>: Show pad count, dimensions, and pin assignments for a custom footprint:
cd /Users/pierrejonnycau/Documents/WORKS/esp32-emu-turbo && python3 -c "
from scripts.generate_pcb import footprints as FP
pads = FP.<footprint_function>()
print(f'Pad count: {len(pads)}')
for p in pads:
print(p.strip())
"
pads <footprint>: List all pad positions, sizes, and layers for a footprint. Use pad_positions.py utilities:
cd /Users/pierrejonnycau/Documents/WORKS/esp32-emu-turbo && python3 -c "
from scripts.generate_pcb.pad_positions import get_all_pad_positions, get_pad
pads = get_all_pad_positions()
# Show pads for a specific reference designator:
for pad_num in range(1, 10):
try:
x, y = get_pad(pads, '<REF>', str(pad_num))
print(f'Pad {pad_num}: ({x:.2f}, {y:.2f})')
except:
break
"
For custom footprints: Read scripts/generate_pcb/footprints.py
For KiCad library footprints: Use kicad-cli fp list or kicad-cli fp search
| File | Purpose |
|---|---|
scripts/generate_pcb/footprints.py | All custom footprint definitions (pad geometry, pin assignments) |
scripts/generate_pcb/pad_positions.py | Pad position utilities: get_all_pad_positions(), get_pad(), esp32_gpio_pos(), fpc_pin_pos() |
scripts/generate_pcb/primitives.py | Low-level pad helper used by footprints |
_pad(num, typ, shape, x, y, w, h, layers, net, drill) -- Generate a single KiCad pad S-expression_smd(num, x, y, w, h, layer) -- Shorthand for SMD rectangular pad_fp_line(x1, y1, x2, y2, layer, width) -- Footprint-local silkscreen/fab line_fp_circle(cx, cy, r, layer, width) -- Footprint-local circle (pin 1 marker)SMD_F (front), SMD_B (back), THT (through-hole)| MCP Tool | Our Implementation |
|---|---|
list_libraries | kicad-cli fp list --libraries (KiCad official) + list functions in footprints.py (custom) |
search_footprints | kicad-cli fp search <query> + grep through footprints.py |
list_library_footprints | kicad-cli fp list <library> |
get_footprint_info | Read footprint generator function from footprints.py and inspect pad output |
.kicad_mod files.board.py.footprints.py following the existing pattern, then reference it in board.py's _component_placeholders().