datasheets
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDatasheets Skill
Datasheets 技能
Related Skills
相关技能
| Skill | Relationship |
|---|---|
| Producers — download the PDFs under |
| 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 |
| Consumer — switching-frequency, package-Rθ_JA, and operating-voltage data sharpen EMC heuristics |
| Consumer — SPICE model presence + IBIS data feed simulation-readiness checks |
| Consumer — package Rθ_JA + junction temperature limits drive Tj estimates (TS-001..TJ-001) |
| Indirect — coverage of structured extractions affects BOM verification confidence |
Handoff guidance: This skill is consumer infrastructure. The typical flow is . Use this skill directly when (a) the user asks to extract or verify a specific MPN, (b) an analyzer reports 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.
distributor skill downloads PDF → datasheets skill extracts → analyzer skill queriestrust_level: low| 技能 | 关联关系 |
|---|---|
| 数据提供者 — 下载PDF文件至 |
| 核心消费者 — VM-001/PU-001/FS-001/PP-001/LR-001/XT-001 以及Phase 4b查找检测器(AM-001/OV-001/TJ-001/FT-001/EX-001)通过 |
| 消费者 — 开关频率、封装热阻Rθ_JA和工作电压数据用于优化EMC启发式算法 |
| 消费者 — SPICE模型存在性及IBIS数据用于馈入仿真就绪性检查 |
| 消费者 — 封装热阻Rθ_JA和结温限值用于驱动结温估算(TS-001..TJ-001) |
| 间接关联 — 结构化提取结果的覆盖范围会影响BOM验证的置信度 |
交接指引: 本技能属于消费基础设施。典型流程为。在以下场景直接使用本技能:(a) 用户要求提取或验证特定MPN的信息;(b) 分析器报告,且问题根源在于MPN提取质量不足;(c) BOM中新增了MPN,下游检测器需获取其已验证的规格信息。若用户仅需要设计评审,请勿单独运行本技能,应在KiCad工作流的“同步数据手册”步骤中调用它。
分销商技能下载PDF → 数据手册技能提取数据 → 分析器技能查询数据trust_level: lowPurpose
目标
Extract structured, machine-readable specifications from component datasheet PDFs and make them available to analyzer skills. Works on whatever PDFs are downloaded under (downloads are owned by distributor skills like , , , ).
<project>/datasheets/digikeymouserlcscelement14从元件数据手册PDF中提取结构化、机器可读的规格信息,并提供给分析器技能使用。处理所有下载至路径下的PDF文件(PDF下载由、、、等分销商技能负责)。
<project>/datasheets/digikeymouserlcscelement14Scope
职责范围
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) plus 5 v1.4 category extensions (diode, transistor, opamp, mcu, crystal). v1.3 cache format (manifestinEXTRACTION_VERSION) is still read for compat.scripts/datasheet_extract_cache.py - Typed access layer (v1.4) — package exposes
datasheet_types/,DatasheetFacts,SpecValue,Pin,Pinout,lookup(),best(),trusted(). Recommended for all new consumers.has_data() - 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 — for v1.4 typed access;
scripts/datasheet_lookup.pyfor the v1.3 dict-shaped helpers (scripts/datasheet_features.py,get_regulator_features,get_mcu_features) — 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.get_pin_function - Verification — (v1.3, schema-vs-usage cross-check) plus
datasheet_verify.py(v1.4, power_domain references resolve, recommended ≤ absolute, regulator pin references exist).datasheet_verify_v14_extraction
本技能负责:
- 提取Schema — 针对每个MPN规格的标准JSON结构。v1.4版本在目录下提供6个JSON Schema Draft 2020-12 Schema(
schemas/、base、pinout、spec_value、regulator、extraction),以及5个v1.4分类扩展(二极管、晶体管、运算放大器、微控制器、晶体)。为兼容旧版本,仍支持读取v1.3缓存格式(manifest中的scripts/datasheet_extract_cache.py)。EXTRACTION_VERSION - 类型化访问层(v1.4) — 包提供
datasheet_types/、DatasheetFacts、SpecValue、Pin、Pinout、lookup()、best()、trusted()接口。推荐所有新消费者使用。has_data() - PDF页面选择 — 通过启发式算法选择最可能包含引脚定义、电气特性、应用电路、SPICE模型的页面。
- 质量评分 — v1.4版本采用三维评分标准(引脚定义完整性、基础信息完整性、分类扩展完整性,0–100分制)。v1.3版本的五维加权评分标准仍适用于旧缓存。
- 消费者API — 用于v1.4类型化访问;
scripts/datasheet_lookup.py提供v1.3字典格式辅助函数(scripts/datasheet_features.py、get_regulator_features、get_mcu_features)——这些v1.3辅助函数可读取v1.4缓存并转换为v1.3字典格式,供旧版检测器代码使用。计划在v1.6版本淘汰该接口。get_pin_function - 验证 — (v1.3版本,Schema与使用情况交叉检查)以及
datasheet_verify.py(v1.4版本,电源域引用解析、推荐值≤绝对值、调节器引脚引用存在性验证)。datasheet_verify_v14_extraction
Non-goals
非目标
- No PDF downloading. That is owned by distributor skills (,
digikey,mouser,lcsc).element14 - No global library. Each project's extractions live in . There is no shared cross-project cache.
<project>/datasheets/extracted/
- 不负责PDF下载。该功能由分销商技能(、
digikey、mouser、lcsc)负责。element14 - 不提供全局库。每个项目的提取结果存储在路径下,不提供跨项目共享缓存。
<project>/datasheets/extracted/
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)<project>/
design.kicad_sch
datasheets/
TPS61023DRLR.pdf # 由分销商技能下载
extracted/
manifest.json # 提取清单(旧版名称:index.json)
TPS61023DRLR.json # 结构化提取结果(本技能的输出)Reference guides
参考指南
- — canonical schema, every field defined
references/extraction-schema.md - — how to find each field in datasheets from common vendors (TI, ST, NXP, Espressif, Microchip)
references/field-extraction-guide.md - — rubric details, score thresholds
references/quality-scoring.md - — how kicad/emc/spice/thermal consume extractions
references/consumer-api.md - — v1.4 cache directory convention (per-MPN files,
references/cache-layout.mdreservation, staleness rules)_families/
- — 标准Schema文档,定义所有字段
references/extraction-schema.md - — 如何在常见厂商(TI、ST、NXP、Espressif、Microchip)的数据手册中找到各个字段
references/field-extraction-guide.md - — 评分标准细节及分数阈值
references/quality-scoring.md - — kicad/emc/spice/thermal如何使用提取结果
references/consumer-api.md - — v1.4缓存目录规范(按MPN存储文件、
references/cache-layout.md预留目录、过期规则)_families/
Entry-point scripts
入口脚本
- — v1.3 cache manager, resolver, indexer
scripts/datasheet_extract_cache.py - — page selection heuristics (used by both v1.3 and v1.4 pipelines)
scripts/datasheet_page_selector.py - — v1.3 extraction quality scoring
scripts/datasheet_score.py - — cross-check extraction vs schematic usage (v1.3 + v1.4
scripts/datasheet_verify.pymode)verify_v14_extraction - — v1.4 typed
scripts/datasheet_lookup.pyfacade with staleness detectionlookup(mpn) → DatasheetFacts - — v1.3 consumer helper API (dual-reads v1.4 caches via
scripts/datasheet_features.pytranslators)_derive_*_v14 - — v1.4 orchestration plan generator (Phase 3 extraction pipeline)
scripts/plan_extraction.py - — v1.4 per-task result validator + merger
scripts/merge_results.py - — v1.4 typed access layer package (
datasheet_types/,DatasheetFacts,SpecValue,Pin,Pinout,lookup,best,trusted)has_data
- — v1.3缓存管理器、解析器、索引器
scripts/datasheet_extract_cache.py - — 页面选择启发式算法(同时用于v1.3和v1.4流水线)
scripts/datasheet_page_selector.py - — v1.3提取质量评分工具
scripts/datasheet_score.py - — 提取结果与原理图使用情况交叉检查(支持v1.3 + v1.4
scripts/datasheet_verify.py模式)verify_v14_extraction - — v1.4 类型化
scripts/datasheet_lookup.pyfacade,带过期检测lookup(mpn) → DatasheetFacts - — v1.3消费者辅助API(通过
scripts/datasheet_features.py转换器兼容读取v1.4缓存)_derive_*_v14 - — v1.4 编排计划生成器(Phase 3提取流水线)
scripts/plan_extraction.py - — v1.4 任务结果验证与合并工具
scripts/merge_results.py - — v1.4 类型化访问层包(
datasheet_types/、DatasheetFacts、SpecValue、Pin、Pinout、lookup、best、trusted)has_data
Extraction workflow
提取工作流
Run to generate an orchestration plan, then to validate and merge per-task outputs. Full scout→plan→dispatch→merge procedure: .
python3 skills/datasheets/scripts/plan_extraction.py <project>merge_results.pyreferences/extraction-pipeline.md运行生成编排计划,然后运行验证并合并各任务输出。完整的侦察→计划→调度→合并流程详见:。
python3 skills/datasheets/scripts/plan_extraction.py <project>merge_results.pyreferences/extraction-pipeline.mdConsuming extractions (v1.4 typed API)
使用提取结果(v1.4类型化API)
The recommended consumer surface is the typed facade plus the trust-gating helpers from . Import like:
lookup(mpn, cache_dir=...)datasheet_typespython
import sys, pathlib
sys.path.insert(0, str(pathlib.Path(__file__).parent.parent / "datasheets"))
from datasheet_types import lookup, has_data, best, trusted推荐使用类型化的 facade以及中的信任控制辅助函数。导入方式如下:
lookup(mpn, cache_dir=...)datasheet_typespython
import sys, pathlib
sys.path.insert(0, str(pathlib.Path(__file__).parent.parent / "datasheets"))
from datasheet_types import lookup, has_data, best, trustedReturns Optional[DatasheetFacts]. None on cache miss / stale PDF / low quality.
返回Optional[DatasheetFacts]。缓存未命中/PDF过期/质量分数过低时返回None。
facts = lookup("TPS61023DRLR", cache_dir=pathlib.Path("datasheets/extracted"))
if facts is None:
return # heuristic-only path; no datasheet evidence available
facts = lookup("TPS61023DRLR", cache_dir=pathlib.Path("datasheets/extracted"))
if facts is None:
return # 仅使用启发式算法路径;无数据手册证据可用
Field-level trust gating — every SpecValue list runs through has_data() / best() / trusted().
字段级信任控制 — 所有SpecValue列表需经过has_data() / best() / trusted()处理。
pu_range = facts.base.recommended_pullup_range # Optional[list[SpecValue]]
if has_data(pu_range):
# Most-trusted single value (first SpecValue meeting threshold, preserves extractor order).
rec = best(pu_range, 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}
pu_range = facts.base.recommended_pullup_range # Optional[list[SpecValue]]
if has_data(pu_range):
# 可信度最高的单个值(第一个满足阈值的SpecValue,保留提取器顺序)。
rec = best(pu_range, min_confidence="medium") # Optional[SpecValue]
if rec is not None and rec.min is not None:
... # 使用rec.min、rec.max、rec.typ、rec.unit、rec.evidence.{page,section,confidence}
All SpecValues at threshold (for multi-value fields like absolute_max).
所有满足阈值的SpecValue(适用于absolute_max等多值字段)。
hi_conf = trusted(facts.base.absolute_max.get("VDD", []), min_confidence="high")
**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`.hi_conf = trusted(facts.base.absolute_max.get("VDD", []), min_confidence="high")
**防御性编程模式**(参考`kicad/SKILL.md` § "Probing Analyzer JSON"):
- `lookup()`在缓存未命中、PDF过期(PDF比提取结果新)或质量分数低于配置阈值时返回`None`。务必用`if facts is None: return`进行判断。
- `DatasheetFacts`中的分类扩展是可选的。若零件不属于`regulator`分类,`facts.regulator`会返回`None`——在访问前需先检查。
- SpecValue列表可能为`None`(字段未提取)、`[]`(已提取但为空)或`list[SpecValue]`。`has_data()`会将前两种情况判定为`False`;需配合`best()` / `trusted()`进行可信度控制。
- `SpecValue.min` / `.max` / `.typ`均为`Optional[float]`。若SpecValue仅包含`typ`(无范围),则对`.min` / `.max`进行`>` / `<`比较会引发`TypeError`——访问每个数值前需显式检查`is not None`。
- `confidence`的取值为`"low"` / `"medium"` / `"high"`。调用`best()` / `trusted()`时传入其他字符串会引发`ValueError`。v1.3 compat shim
v1.3兼容层
Legacy detectors still call / / from . These dual-read v1.4 caches and translate to the v1.3 dict shape. Sunset planned for v1.6 — new code should use directly.
get_regulator_features(mpn)get_mcu_features(mpn)get_pin_function(mpn, pin)scripts/datasheet_features.pylookup()旧版检测器仍会调用中的 / / 函数。这些函数可读取v1.4缓存并转换为v1.3字典格式。计划在v1.6版本淘汰该兼容层——新代码应直接使用。
scripts/datasheet_features.pyget_regulator_features(mpn)get_mcu_features(mpn)get_pin_function(mpn, pin)lookup()When to trigger this skill
触发时机
- Immediately after downloading datasheets via ,
sync_datasheets_digikey.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.sync_datasheets_lcsc.py - Before running analyzers on a new project where datasheets are present but is empty — the analyzers won't produce the extractions themselves.
datasheets/extracted/ - 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: lowormixed.high - When a user asks for pin verification ("verify U1 pin names match datasheet") — this skill's cached extraction is the authoritative source.
- 下载数据手册后立即触发:通过、
sync_datasheets_digikey.py或类似工具下载数据手册后,立即运行本技能。若未提取数据,IC相关检查(VM-001电源轨电压、PS-001电源正常信号、PR-004 USB、DP-002 USB速度分类)会对未知IC采用启发式算法 fallback。sync_datasheets_lcsc.py - 新项目运行分析器前触发:若项目已存在数据手册但目录为空,需先运行本技能——分析器不会自行生成提取结果。
datasheets/extracted/ - 评审标记信任度低时触发:当评审因缺少厂商证据标记时,提取电源调节器、微控制器和高速外设所引用IC的数据,通常可将
trust_level: low提升至trust_level: low或mixed。high - 用户请求引脚验证时触发:(如“验证U1引脚名称是否与数据手册匹配”)——本技能的缓存提取结果为权威来源。