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 `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".
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1.6k
- Forks
- 491
01 前言 Front Matter
- name
- datasheets
- description
- 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 `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".
02 资源文件 67
- 脚本datasheet_types/__init__.py1.9 KB
- 脚本datasheet_types/base_block.py6.5 KB
- 脚本datasheet_types/cache_reader.py11.6 KB
- 脚本datasheet_types/codec.py6.3 KB
- 脚本datasheet_types/extraction.py8.0 KB
- 脚本datasheet_types/pinout.py5.2 KB
- 脚本datasheet_types/regulator.py5.3 KB
- 脚本datasheet_types/spec_value.py2.4 KB
- 脚本datasheet_types/trust_gating.py4.1 KB
- 脚本distributor_core/__init__.py—
- 脚本distributor_core/cli.py2.9 KB
- 脚本distributor_core/download.py25.3 KB
- 脚本distributor_core/inputs.py8.9 KB
- 脚本distributor_core/manifest.py5.7 KB
- 脚本distributor_core/sync.py20.2 KB
- 脚本distributor_core/verify.py11.9 KB
- 参考文档examples/abm8g-106-12.000mhz-t.json9.4 KB
- 参考文档examples/irlml6344.json16.0 KB
- 参考文档examples/lm2596-adj.json14.3 KB
- 参考文档examples/lm358.json15.6 KB
- 参考文档examples/mbrs540t3g.json12.3 KB
- 参考文档examples/stm32f103c8t6.json51.1 KB
- 参考文档prompts/base.md4.5 KB
- 参考文档prompts/crystal.md8.8 KB
- 参考文档prompts/diode.md8.3 KB
- 参考文档prompts/mcu.md9.6 KB
- 参考文档prompts/opamp.md10.7 KB
- 参考文档prompts/pinout.md4.7 KB
- 参考文档prompts/regulator.md4.4 KB
- 参考文档prompts/scout.md3.5 KB
- 参考文档prompts/transistor.md12.5 KB
- 参考文档references/cache-layout.md8.2 KB
- 参考文档references/consumer-api.md10.8 KB
- 参考文档references/dispatch-claude-code.md9.4 KB
- 参考文档references/dispatcher-contract.md8.2 KB
- 参考文档references/extraction-pipeline.md1.7 KB
- 参考文档references/extraction-schema.md18.0 KB
- 参考文档references/field-extraction-guide.md14.9 KB
- 参考文档references/quality-scoring.md8.4 KB
- 参考文档schemas/base.schema.json9.3 KB
- 参考文档schemas/CHANGELOG.md16.0 KB
- 参考文档schemas/crystal.schema.json7.2 KB
- 参考文档schemas/diode.schema.json7.9 KB
- 参考文档schemas/extraction.schema.json3.7 KB
- 参考文档schemas/fixtures/lm2596-adj.example.json14.3 KB
- 参考文档schemas/fixtures/manifest.example.json1000 B
- 参考文档schemas/fixtures/minimal.example.json2.1 KB
- 参考文档schemas/manifest.schema.json3.0 KB
- 参考文档schemas/mcu.schema.json12.4 KB
- 参考文档schemas/opamp.schema.json9.2 KB
- 参考文档schemas/pinout.schema.json5.9 KB
- 参考文档schemas/plan.schema.json4.6 KB
- 参考文档schemas/regulator.schema.json8.4 KB
- 参考文档schemas/scout.schema.json2.9 KB
- 参考文档schemas/spec_value.schema.json3.0 KB
- 参考文档schemas/transistor.schema.json12.0 KB
- 脚本scripts/_smoke_v14_roundtrip.py8.9 KB
- 脚本scripts/datasheet_extract_cache.py17.8 KB
- 脚本scripts/datasheet_features.py17.4 KB
- 脚本scripts/datasheet_page_selector.py16.7 KB
- 脚本scripts/datasheet_score.py15.5 KB
- 脚本scripts/datasheet_verify.py46.1 KB
- 脚本scripts/extraction_schema.py1.7 KB
- 脚本scripts/merge_results.py12.5 KB
- 脚本scripts/plan_extraction.py9.5 KB
- 脚本scripts/validate_extraction_result.py3.9 KB
- 脚本scripts/validate_sanity_vector.py6.2 KB
03 SKILL.md 正文
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 + the datasheet-backed lookup detectors (AM-001/OV-001/TJ-001/FT-001/EX-001/PM-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 (limited) — the model resolver reads legacy spice_specs fields only; v1.4 typed facts are not used |
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_VERSIONinscripts/datasheet_extract_cache.py) is still read for compat. - Typed access layer (v1.4) —
datasheet_types/package exposesDatasheetFacts,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 scores 0–100 on pinout completeness (20 %), base completeness (25 %) and category-extension completeness (25 %), plus a reserved 30 % awarded in full. v1.3 5-dimension weighted rubric still applies to legacy caches.
- Consumer APIs —
datasheet_types.cache_reader(from datasheet_types import lookup) for v1.4 typed access;scripts/datasheet_features.pyfor 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. - Verification —
datasheet_verify.py(v1.3, schema-vs-usage cross-check) plusverify_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
<project>/
design.kicad_sch
datasheets/
TPS61023DRLR.pdf # downloaded by distributor skills
extracted/
manifest.json # extraction manifest (legacy name: index.json)
TPS61023DRLR.json # structured extraction (this skill's output)
Reference guides
references/extraction-schema.md— legacy v1.3 cache fields; the current v1.4 contracts areschemas/extraction.schema.json,schemas/base.schema.jsonand the category schemas, with extraction instructions underprompts/references/field-extraction-guide.md— how to find each field in datasheets from common vendors (TI, ST, NXP, Espressif, Microchip)references/quality-scoring.md— legacy v1.3 0–10 rubric; the current 0–100 score is summarised at its topreferences/consumer-api.md— how kicad/emc/spice/thermal consume extractionsreferences/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, indexerscripts/datasheet_page_selector.py— page selection heuristics (manual helper; no pipeline script imports it)scripts/datasheet_score.py— v1.3 extraction quality scoringscripts/datasheet_verify.py— cross-check extraction vs schematic usage (v1.3 + v1.4verify_v14_extractionmode)scripts/datasheet_features.py— v1.3 consumer helper API (dual-reads v1.4 caches via_derive_*_v14translators)scripts/plan_extraction.py— v1.4 orchestration plan generator (extraction pipeline)scripts/merge_results.py— v1.4 per-task result validator + mergerdatasheet_types/— v1.4 typed access layer package (DatasheetFacts,SpecValue,Pin,Pinout,lookup,best,trusted,has_data)distributor_core/— shared sync/fetch plumbing for the four distributor skills (BOM projection,manifest.json, download, verification, the sync driver); not an entry point of this skill
Extraction workflow
Run the scout first: dispatch prompts/scout.md for the MPN and PDF and save its schema-valid, unwrapped output, with the PDF's "pdf_sha256": "sha256:<hex>" added, as <cache_dir>/<sanitized_mpn>.scout.json (the MPN with every character outside [A-Za-z0-9_.-] replaced by _: LM317/NOPB → LM317_NOPB) (references/dispatch-claude-code.md Step 1). Then run python3 <skill-path>/scripts/plan_extraction.py <mpn> <pdf_path> --use-cached-scout --cache-dir <cache_dir> (<skill-path> is this skill's directory) to write the plan, dispatch its tasks, and run merge_results.py <mpn> --cache-dir <cache_dir> to validate and merge their results. Without --use-cached-scout it exits 2 (it cannot run the scout itself); with the flag and no saved scout it stops with a FileNotFoundError. merge_results.py and validate_extraction_result.py need the jsonschema package (pip install jsonschema); everything else here is stdlib-only. Full scout→plan→dispatch→merge procedure: 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:
import sys, pathlib
sys.path.insert(0, "<datasheets-skill-path>")
from datasheet_types import lookup, has_data, best, trusted
# Returns Optional[DatasheetFacts]. None on cache miss or unreadable cache; quality is reported on the object, not gated.
facts = lookup("TPS61023DRLR", cache_dir=pathlib.Path("datasheets/extracted"))
if facts is None:
return # heuristic-only path; no datasheet evidence available
# Field-level trust gating — every SpecValue list runs through has_data() / best() / trusted().
vin = facts.base.recommended_operating.get("VIN") # Optional[list[SpecValue]]; recommended_operating is dict[str, list[SpecValue]]
if has_data(vin):
# Most-trusted single value (first SpecValue meeting threshold, preserves extractor order).
rec = best(vin, min_confidence="medium") # Optional[SpecValue]
if rec is not None and rec.min is not None:
... # use rec.min, rec.max, rec.typ, rec.unit, rec.evidence.{page,section,confidence}
# All SpecValues at threshold (for multi-value fields like absolute_max).
hi_conf = trusted(facts.base.absolute_max.get("VDD", []), min_confidence="high")
Defensive patterns (mirrors kicad/SKILL.md § "Probing Analyzer JSON"):
lookup()returnsNoneon a cache miss or an unreadable cache (malformed, non-UTF-8, symlinked, not a regular file, oversized, not an object); a stale PDF or a low quality score is described on the facts (facts.stale,facts.quality), never aNone. Always guard withif facts is None: return.- Category extensions are optional on
DatasheetFacts.facts.regulatorisNonewhen the part isn't in theregulatorcategory — check before dereferencing. - SpecValue lists can be
None(field not extracted),[](extracted but empty), orlist[SpecValue].has_data()collapses the first two toFalse; pair withbest()/trusted()for confidence gating. SpecValue.min/.max/.typare eachOptional[float]. A SpecValue carrying onlytyp(no range) makes>/<comparisons against.min/.maxraiseTypeError— guard with explicitis not Nonechains on every numeric access.confidenceis one of"low"/"medium"/"high". Callingbest()/trusted()with any other string raisesValueError.
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. 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→mixedorhigh. - When a user asks for pin verification ("verify U1 pin names match datasheet") — this skill's cached extraction is the authoritative source.
04 同仓库更多 Skills
worktable-review-with-annotations
Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.
worktable-find-and-synthesize-context
Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.
worktable-create-or-update-docs
Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.
worktable-create-or-manage-records
Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.
worktable-create-or-manage-interactive-html
Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.
worktable-collaborate-threads
Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.