$npx -y skills add aklofas/kicad-happy --skill datasheetsExtract 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,
| 1 | # Datasheets Skill |
| 2 | |
| 3 | ## Related Skills |
| 4 | |
| 5 | | Skill | Relationship | |
| 6 | |-------|--------------| |
| 7 | | `digikey` / `mouser` / `lcsc` / `element14` | **Producers** — download the PDFs under `<project>/datasheets/` that this skill extracts from | |
| 8 | | `kicad` | **Primary consumer** — VM-001/PU-001/FS-001/PP-001/LR-001/XT-001 + Phase 4b lookup detectors (AM-001/OV-001/TJ-001/FT-001/EX-001) query extractions via `lookup(mpn)` for verified-IC knowledge | |
| 9 | | `emc` | **Consumer** — switching-frequency, package-Rθ_JA, and operating-voltage data sharpen EMC heuristics | |
| 10 | | `spice` | **Consumer** — SPICE model presence + IBIS data feed simulation-readiness checks | |
| 11 | | `thermal` | **Consumer** — package Rθ_JA + junction temperature limits drive Tj estimates (TS-001..TJ-001) | |
| 12 | | `bom` | **Indirect** — coverage of structured extractions affects BOM verification confidence | |
| 13 | |
| 14 | **Handoff guidance:** This skill is consumer infrastructure. The typical flow is `distributor skill downloads PDF → datasheets skill extracts → analyzer skill queries`. Use this skill directly when (a) the user asks to extract or verify a specific MPN, (b) an analyzer reports `trust_level: low` and the gap is per-MPN extraction quality, or (c) a new MPN was added to the BOM and downstream detectors should pick up its verified specs. Don't run this skill in isolation if the user just wants a design review — call it from the kicad workflow at the "Sync datasheets" step instead. |
| 15 | |
| 16 | ## Purpose |
| 17 | |
| 18 | Extract structured, machine-readable specifications from component datasheet PDFs and make them available to analyzer skills. Works on whatever PDFs are downloaded under `<project>/datasheets/` (downloads are owned by distributor skills like `digikey`, `mouser`, `lcsc`, `element14`). |
| 19 | |
| 20 | ## Scope |
| 21 | |
| 22 | This skill owns: |
| 23 | - **Extraction schemas** — canonical JSON structures for per-MPN specs. v1.4 ships 6 JSON Schema Draft 2020-12 schemas under `schemas/` (`base`, `pinout`, `spec_value`, `regulator`, `extraction`, `manifest`) plus 5 v1.4 category extensions (diode, transistor, opamp, mcu, crystal). v1.3 cache format (`EXTRACTION_VERSION` in `scripts/datasheet_extract_cache.py`) is still read for compat. |
| 24 | - **Typed access layer (v1.4)** — `datasheet_types/` package exposes `DatasheetFacts`, `SpecValue`, `Pin`, `Pinout`, `lookup()`, `best()`, `trusted()`, `has_data()`. Recommended for all new consumers. |
| 25 | - **PDF page selection** — heuristics to pick pages most likely to contain pinouts, e-chars, applications, SPICE models. |
| 26 | - **Quality scoring** — v1.4 uses a three-dimension rubric (pinout completeness, base completeness, category-extension completeness, 0–100 scale). v1.3 5-dimension weighted rubric still applies to legacy caches. |
| 27 | - **Consumer APIs** — `scripts/datasheet_lookup.py` for v1.4 typed access; `scripts/datasheet_features.py` for the v1.3 dict-shaped helpers (`get_regulator_features`, `get_mcu_features`, `get_pin_function`) — the v1.3 helpers dual-read v1.4 caches and translate to v1.3 dict shape for legacy detector code. Sunset planned for v1.6. |
| 28 | - **Verification** — `datasheet_verify.py` (v1.3, schema-vs-usage cross-check) plus `datasheet_verify_v14_extraction` (v1.4, power_domain references resolve, recommended ≤ absolute, regulator pin references exist). |
| 29 | |
| 30 | ## Non-goals |
| 31 | |
| 32 | - **No PDF downloading.** That is owned by distributor skills (`digikey`, `mouser`, `lcsc`, `element14`). |
| 33 | - **No global library.** Each project's extractions live in `<project>/datasheets/extracted/`. There is no shared cross-project cache. |
| 34 | |
| 35 | ## Cache location |
| 36 | |
| 37 | ``` |
| 38 | <project>/ |
| 39 | design.kicad_sch |
| 40 | datasheets/ |
| 41 | TPS61023DRLR.pdf # downloaded by distributor skills |
| 42 | extracted/ |
| 43 | manifest.json # extraction manifest (legacy name: index.json) |
| 44 | TPS61023DRLR.json # structured extraction (this skill's output) |
| 45 | ``` |
| 46 | |
| 47 | ## Reference guides |
| 48 | |
| 49 | - `references/extraction-schema.md` — canonical schema, every field defined |
| 50 | - `references/field-extraction-guide.md` — how to find each field in datasheets from common vendors (TI, ST, NXP, Espressif, Microchip) |
| 51 | - `references/quality-scoring.md` — rubric details, score thresholds |
| 52 | - `references/consumer-api.md` — how kicad/emc/spice/thermal consume extractions |
| 53 | - `references/cache-layout.md` — v1. |