hashgraph-online/awesome-codex-plugins / plugins/aklofas/kicad-happy/skills/kicad
kicad
VerifiedAnalyze KiCad projects and PDF schematics: schematics, PCB layouts, Gerbers, footprints, symbols, netlists, and design rules. Reviews designs for bugs, traces nets, cross-references schematic to PCB, extracts BOM data, checks DRC/ERC, DFM, power trees, and regulator circuits. Every finding carries a confidence label and evidence source with trust_summary rollup. Analyzes PDF schematics from dev boards, reference designs, eval kits, and datasheets. Supports KiCad 5–10. Use whenever the user mentions .kicad_sch, .kicad_pcb, .kicad_pro, PCB design review, schematic analysis, PDF schematics, reference designs, Gerber files, DRC/ERC, netlist issues, BOM extraction, signal tracing, power budget, DFM, or wants to understand, debug, compare, or review any hardware design. Also for "check my board", "review before fab", "what's wrong with my schematic", "is this ready to order", "check my power supply", "verify this circuit", OSHWA certification readiness, or any electronics/PCB design question.
scripts/kicad_core/model.py
View on GitHub"""Typed records over the reader dict shapes (kicad_core.model).
TypedDicts describe what the readers already emit, so serialisation does not
change. Open boundaries stay plain dicts: finding ``extra``
fields, manufacturer payloads, datasheet category extensions.
"""
from __future__ import annotations
from dataclasses import dataclass, field
from typing import TypedDict
class _PinRequired(TypedDict):
number: str
name: str
type: str
x: float
y: float
class Pin(_PinRequired, total=False):
"""A placed-symbol pin as ``compute_pin_positions`` emits it (``Component['pins']``)."""
hidden: bool
base_name: str # the library pin name when a placed alternate replaced it
class NetPin(TypedDict):
"""One pin connection on a net (``Net['pins']``), as ``build_net_map`` emits it."""
component: str
pin_number: str
pin_name: str
pin_type: str
class NetLabel(TypedDict):
name: str
type: str
class _NetRequired(TypedDict):
name: str
pins: list[NetPin]
point_count: int
no_connect: bool
has_pwr_flag: bool
labels: list[NetLabel]
class Net(_NetRequired, total=False):
"""A net record (``nets[key]``). ``display_name`` appears on ``/<sheet>/<name>`` collision
keys and on ``__unnamed_N`` nets with exactly one named IC pin."""
display_name: str
class _ComponentRequired(TypedDict):
reference: str
value: str
lib_id: str
footprint: str
datasheet: str
description: str
mpn: str
manufacturer: str
digikey: str
mouser: str
lcsc: str
element14: str
x: float
y: float
angle: float
mirror_x: bool
mirror_y: bool
unit: str | int | None
uuid: str
in_bom: bool
dnp: bool
on_board: bool
pin_uuids: dict
type: str
class Component(_ComponentRequired, total=False):
"""A placed component. Required keys are those BOTH readers (``extract_components`` and the
legacy ``.sch`` reader) always set; everything else is optional. ``pins`` is stripped and
``category``/``parsed_value``/``pin_nets`` are added by result assembly; ``_sheet`` and
``instance_path`` (the board footprint path of the placed unit) are set by multi-sheet
assembly; ``_unit_pins`` (a set), ``_body_style`` (the placed De Morgan body,
default 1) and ``_dropped_values`` (earlier Value texts a later duplicate replaced, for
the property audit) are popped before output."""
lib_name: str
pins: list[Pin]
keywords: str
functional_class: str
is_external_connector: bool
connector_layout: str
transform_matrix: tuple
category: str
parsed_value: float
pin_nets: dict[str, str]
instance_path: str
_unit_pins: set
_body_style: int
_sheet: int
_power_scope: str
_pin_source: str
_dropped_values: list[str]
PinNetEntry = tuple[str, Net]
"""What ``AnalysisContext.pin_net`` holds: ``(net_name, net_record)`` — the record, not a pin name."""
@dataclass
class SheetData:
"""What ``parse_single_sheet`` returns for one ``.kicad_sch`` file (fields in the order the parser produces them)."""
root: list
components: list[Component]
wires: list[dict]
labels: list[dict]
junctions: list[dict]
no_connects: list[dict]
sub_sheet_paths: list[tuple[str, str]]
lib_symbols: dict
text_annotations: list[dict]
bus_elements: dict
title_block: dict
# sheet uuid -> {"fields": [(name, text)], "in_bom", "on_board", "dnp", "exclude_from_sim"}
# for each (sheet ...) block; the sheet name and file fields are named SHEETNAME / SHEETFILE
sheet_fields: dict = field(default_factory=dict)
# sheet files a (sheet ...) block names that do not exist, as resolved paths
missing_sheets: list[str] = field(default_factory=list)
@dataclass(frozen=True)
class ResolvedConfig:
"""The one resolved project configuration. Built by ``project_config.resolve_config``.
effective: the merged mapping consumers read (the ``config`` consumers read)
paths: files that contributed, in merge order (lowest precedence first); () when none
hash_input: the single file ``inputs.config_hash`` is computed from, or None
"""
effective: dict
paths: tuple[str, ...]
hash_input: str | None
@dataclass
class PcbReaderState:
"""Per-run PCB reader state: the KiCad-10 net-name → synthetic-ID map.
Built by ``_build_net_mapping`` after extraction (sorted names, IDs from 1); consulted only by
the backfill in ``read_board``. One instance per ``analyze_pcb()`` call — nothing module-level.
"""
net_name_to_id: dict[str, int] = field(default_factory=lambda: {"": 0})
def net_id(self, val: str | None) -> int:
if not val:
return 0
try:
return int(val)
except (ValueError, TypeError):
return self.net_name_to_id.get(val, 0)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |