datasheets

Extract 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 `therm

By aklofas · 412 installs

npx skills add aklofas/kicad-happy --skill datasheets

Source repository · Upstream listing

Datasheets Skill Related Skills Skill Relationship digikey / mouser / lcsc / element14 Producers — download the PDFs under <project /datasheets/ that this skill extracts from 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 emc Consumer — switching frequency, package Rθ JA, and operating voltage data sharpen EMC heuristics spice Consumer — SPICE model presence + IBIS data feed simulation readiness checks thermal Consumer — package Rθ JA + junction temperature limits drive Tj estimates (TS 001..TJ 001) bom Indirect — coverage of structured extractions affects BOM verification confidence 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. Purpose 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 ). Scope This skill owns: 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. Typed access layer (v1.4) — datasheet types/ package exposes DatasheetFacts , SpecValue , Pin , Pinout , lookup() , best() , trusted() , has data() . Recommended for all new consumers. PDF page selection — heuristics to pick pages most likely to contain pinouts, e chars, applications, SPICE models. 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. 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. 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). Non goals No PDF downloading. That is owned by distributor skills ( digikey , mouser , lcsc , element14 ). No global library. Each project's extractions live in <project /datasheets/extracted/ . There is no shared cross project cache. Cache location Reference guides references/extraction schema.md — canonical schema, every field defined references/field extraction guide.md — how to find each field in datasheets from common vendors (TI, ST, NXP, Espressif, Microchip) references/quality scoring.md — rubric details, score thresholds references/consumer api.md — how kicad/emc/spice/thermal consume extractions references/cache layout.md — v1.4 cache directory convention (per MPN files, families/ reservation, staleness rules) Entry point scripts scripts/datasheet extract cache.py — v1.3 cache manager, resolver, indexer scripts/datasheet page selector.py — page selection heuristics (used by both v1.3 and v1.4 pipelines) scripts/datasheet score.py — v1.3 extraction quality scoring scripts/datasheet verify.py — cross check extraction vs schematic usage (v1.3 + v1.4 verify v14 extraction mode) scripts/datasheet lookup.py — v1.4 typed lookup(mpn) → DatasheetFacts facade with staleness detection scripts/datasheet features.py — v1.3 consumer helper API (dual reads v1.4 caches via derive v14 translators) scripts/plan extraction.py — v1.4 orchestration plan generator (Phase 3 extraction pipeline) scripts/merge results.py — v1.4 per task result validator + merger datasheet types/ — v1.4 typed access layer package ( DatasheetFacts , SpecValue , Pin , Pinout , lookup , best , trusted , has data ) Extraction workflow Run python3 skills/datasheets/scripts/plan extraction.py <project to generate an orchestration plan, then merge results.py to validate and merge per task outputs. Full scout→plan→dispatch→merge procedure: [ references/extraction pipeline.md ](references/extraction pipeline.md). Consuming extractions (v1.4 typed API) The recommended consumer surface is the typed lookup(mpn, cache dir=...) facade plus the trust gating helpers from datasheet types . Import like: Defensive patterns (mirrors kicad/SKILL.md § "Probing Analyzer JSON"): lookup() returns None on cache miss, stale PDF (PDF newer than extraction), or quality score below the configured floor. Always guard with if facts is None: return . Category extensions are optional on DatasheetFacts . facts.regulator is None when the part isn't in the regulator category — check before dereferencing. SpecValue lists can be None (field not extracted), [] (extracted but empty), or list[SpecValue] . has data() collapses the first two to False ; pair with best() / trusted() for confidence gating. SpecValue.min / .max / .typ are each Optional[float] . A SpecValue carrying only typ (no range) makes / < comparisons against .min / .max raise TypeError — guard with explicit is not None chains on every numeric access. confidence is one of "low" / "medium" / "high" . Calling best() / trusted() with any other string raises ValueError . v1.3 compat shim Legacy detectors still call get regulator features(mpn) / get mcu features(mpn) / get pin function(mpn, pin) from scripts/datasheet features.py . These dual read v1.4 caches and translate to the v1.3 dict shape. Sunset planned for v1.6 — new code should use lookup() directly. When to trigger this skill Immediately after downloading datasheets via sync datasheets digikey.py , sync datasheets lcsc.py , or equivalent. Without extraction, IC aware checks (VM 001 rail voltage, PS 001 power good, PR 004 USB, DP 002 USB speed classification) fall back to heuristics on unknown ICs. Before running analyzers on a new project where datasheets are present but datasheets/extracted/ is empty — the analyzers won't produce the extractions themselves. When a review flags low trust level due to missing manufacturer evidence: extracting the ICs referenced by power regulators, MCUs, and high speed peripherals typically flips trust level: low → mixed or high . When a user asks for pin verification ("verify U1 pin names match datasheet") — this skill's cached extraction is the authoritative source.