hashgraph-online/awesome-codex-plugins / plugins/aklofas/kicad-happy/skills/datasheets
datasheets
VerifiedExtract structured specifications from electronic component datasheet PDFs — pinouts, electrical characteristics, peripherals, topology, and features. Cache extractions per project for consumption by schematic and PCB analyzers. Primary consumer infrastructure for `kicad`, `emc`, `spice`, and `thermal` analyzers. Use this skill whenever the user asks to extract, verify, or read specs from a component datasheet; when analyzers need verified IC knowledge (EN pin thresholds, PG presence, USB peripheral speed); or when a review mentions datasheet coverage, extraction quality, or per-MPN specifications. Also triggers on "extract this datasheet", "what are the specs for MPN X", "verify datasheet extraction", or "check pin functions for part Y".
scripts/extraction_schema.py
View on GitHub"""JSON Schema validation for datasheet extraction results, shared by merge_results.py and
validate_extraction_result.py.
jsonschema and referencing are optional packages: they are imported when validation runs, and a
RuntimeError names them when they are missing.
"""
from __future__ import annotations
import json
from pathlib import Path
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from referencing import Registry
SCHEMA_DIR = Path(__file__).resolve().parents[1] / "schemas"
_MISSING = ("full schema validation needs the optional packages jsonschema and referencing "
"(pip install jsonschema referencing)")
def schema_registry() -> "Registry":
"""Build a referencing Registry so $ref between local schemas resolves."""
try:
from referencing import Registry, Resource
except ImportError as exc:
raise RuntimeError(_MISSING) from exc
registry = Registry()
for schema_path in SCHEMA_DIR.glob("*.schema.json"):
schema = json.loads(schema_path.read_text(encoding="utf-8"))
uri = schema.get("$id")
if uri:
registry = registry.with_resource(uri, Resource.from_contents(schema))
return registry
def validate_against_schema(data, schema: dict) -> str | None:
"""Return the first error as '<path>: <message>' (errors sorted by path), or None when *data* is valid."""
try:
from jsonschema import Draft202012Validator
except ImportError as exc:
raise RuntimeError(_MISSING) from exc
registry = schema_registry()
validator = Draft202012Validator(schema, registry=registry)
errors = sorted(validator.iter_errors(data), key=lambda e: list(e.absolute_path))
if not errors:
return None
e0 = errors[0]
path = "/".join(str(p) for p in e0.absolute_path) or "<root>"
return f"{path}: {e0.message}"
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: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | 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: 196k | Updated | Claude CodeCodex | Verified | Install |