Audits JLCEDA (EasyEDA) .enet netlists for broken net labels, dangling nets, power-rail orphans, conflicting pin polarity, and full-differential-amplifier feedback wiring.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:lishuo4096/dsh-enet-review
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
把「解析嘉立创 EDA 导出网表(.enet)并校对原理图」这件事,做成 DeepSeek Harness 里
agent 可以直接调用的 9 个只读工具 + 2 个技能。
纯 JS、零运行时依赖。 不需要 Python、不需要 npm install、不需要构建步骤 ——
因为本机 PATH 里没有 node,两个 Python 解释器又各缺一半 PDF 库,
自包含是唯一可靠的做法(原始 Python 版保留在遗留工程里作为 CLI 参照)。
这个插件能发现什么
| 类别 | 例子 | 级别 |
|---|---|---|
| 断链 | OAMP_6.5V 和 OAMP_+6.5V 是两个不相连的网络,中间没有任何元件 |
P0 |
| FDA 反馈接反 | 全差分放大器反馈从同侧取 → 正反馈 → 一上电就饱和 | P0 |
| 电源轨孤儿 | 一条电源轨找不到源,或者只有源没有负载 | P1 |
| 网络接进不贴的器件 | 网络连到了标记为 NC 的器件 | P1 |
| 悬空脚 | EN / RESET / MUTE 挂在只有一个成员的网络里 |
P2 |
| 引脚名与网络冲突 | 负压 LDO 的 VIN 接在正压网上 |
P2 |
| 兄弟封装引脚序混用 | 同封装不同型号,引脚序不同 | P2 |
| 规则自身异常 | 某条规则跑挂了 → 审计不完整,不能当通过 | P3 |
差分对不会误报(关键设计)
丢弃非字母数字后 DAC_OUTL+ 和 DAC_OUTL- 是"同名"的,但正负号是极性语义。
判定用「正号等价键」:
| 网络对 | 键 | 判定 |
|---|---|---|
OAMP_6.5V / OAMP_+6.5V |
同为 oamp65v |
报断链(实测复现旧项目) |
DAC_OUTL+ / DAC_OUTL- |
dacoutl+ / dacoutl- |
不报,正常差分对 |
-5V / 5V |
-5v / 5v |
不报,极性真的相反,交人工判断 |
有跨接元件的相似标签降为 P3(仅命名不一致,不是断链); 无跨接的才是 P0。修这个之前,差分对一次误报 7 对,报告直接失去可信度。
安装
方式 A:一行搞定(已实测)
在 DSH 会话里让 agent 执行:
plugin_manager({ action: "install_bundle", target: "C:\\Users\\lishuo\\Documents\\deepseek-harness\\default-workspace\\dsh-enet-review" })
它会自动把两处都写好,不需要手改 profile:
| 它写什么 | 写到哪 |
|---|---|
"@local/dsh-enet-review": "link:C:/…/dsh-enet-review" |
profile package.json → dependencies |
"@local/dsh-enet-review" |
profile package.json → dsh.profile.bundles(追加到末尾) |
profile 的 cordis.patch.yml 不会被改 —— 插件行由插件自带的 cordis.patch.yml
经 bundle 机制注入。
返回里读 application:applied = 已生效;failed = 有插件行没激活,看 error.diagnostic。
⚠️
install_bundle需要 danger-full-access 权限或当次批准(该 action 不弹交互确认, 策略为never时也能执行)。
如果第一次装的时候源码有毛病(本插件踩过,值得记下来)
实际遇到过的顺序:
第一次
install_bundle→application: "failed",error.diagnostic=dsh: warning: 1 entry did not activate / enet-review (@local/dsh-enet-review): failed to import。修好源码后再跑一次
install_bundle→changed: false+error.code: "ambiguous-install", 它不会重新尝试导入,application仍然是failed。这一步会骗人:看起来像还没修好。真正有效的动作是对那一行做一次 disabled → enabled 的往返(走 profile 配置热重载):
plugin_manager({ action: "set_plugin", target: "include:enet-review", enabled: false }) plugin_manager({ action: "set_plugin", target: "include:enet-review", enabled: true })第二次返回
application: "applied"、warnings: [],不需要重启。
entry id 形如 include:<patchId>;不确定时用
cordis_inspect_query({platform:"host", provider:"Config", method:"listConfigs", input:{name:"@local/dsh-enet-review"}})
拿准确 id。注意该返回里的 status 是 Config schema 状态(absent = 插件活着但没导出
Config),不是激活状态;激活状态要去 plugin_manager list_plugins 看 fiberPhase。
怎么确认真的生效了
# 1) 插件行在不在、激活没有
plugin_manager({ action: "list_plugins" }) # 找 include:enet-review → "fiberPhase":"active"
# 2) 9 个工具 agent 到底看不看得见
cordis_inspect_query({ platform: "host", provider: "Tool", method: "listTools" })
方式 B:手动 link(不推荐,目前唯一能跑通的形态有硬约束)
install_bundle 内部干的就是这件事:dependencies 写
"@local/dsh-enet-review": "link:<绝对路径>",dsh.profile.bundles 末尾追加同名项。
手改 profile 是官方明确不推荐的(改坏了没有回滚),能走方式 A 就走 A。
硬约束:以
link:装载的插件,不能import任何@deepseek-ai/*包。 原因:cordis-plugin-loader对裸说明符走 Node 原生import(),按插件目录的 真实路径向上找node_modules;而宿主包(dsh-tools/dsh-skill/cordis) 在 Desktop 下只存在于app.asar内,磁盘上没有 (profiles\desktop\node_modules\@deepseek-ai\里只有cosmokit和schemastery)。 症状:Cannot find package '@deepseek-ai/dsh-tools' … ERR_MODULE_NOT_FOUND, 整行failed to import。 从 npm / GitHub 装进 profile 的真包没有这个问题 —— 所以同一个 API, 别人能用,本地的 link 插件不能用。本插件的对策:自带
lib/define-tool.js(defineTool的等价零依赖实现), 全包只 importnode:*和相对路径。_selftest.mjs里有一组 「无宿主依赖(可被 link 装载)」断言,递归扫所有.js/.mjs的 import 说明符来守住这条底线。 参照实现:@local/dsh-chat-mode用的是同一招 —— patch 里name: './policy.js', 把逻辑放在包根由 loader 以相对路径加载,policy.js同样不 import 任何@deepseek-ai/*。
自检
$node = 'C:\Users\lishuo\.dsh\dsh-runtimes\dsh-primary-runtime\dependencies\node\bin\node.exe'
cd C:\Users\lishuo\Documents\deepseek-harness\default-workspace\dsh-enet-review
& $node _selftest.mjs
输出 全部通过 即 OK。自检覆盖:纯函数 + 坏输入 + BOOK 手册查找 + 技能发现(mock
SkillProviderControl)+ 工具定义(本地 defineTool 的参数编译与校验) +
无宿主依赖扫描 + 真实网表的 10 项断言(含「差分对不被误报」回归断言)。
9 个工具
所有工具只读:不改 .enet、不改工程、不写文件。
file 参数都可省略 —— 会从当前目录向上自动找 *.enet。
| 工具 | 用途 | 参数 |
|---|---|---|
enet_netlist |
网表概览 / 元件清单 / 网络清单 | file components nets grep limit |
enet_audit |
跑全部规则,按 P0→P3 返回 | file severity detail |
enet_dangling |
单脚网络(有源器件优先) | file all |
enet_net |
单个网络的成员,可顺带列"孪生网" | net file similar |
enet_part |
单位号:每个引脚 → 网络(带推断标签) | des file |
enet_link |
两个网络之间的跨接元件(判定断链用) | net1 net2 file |
enet_fda |
全差分放大器反馈交叉判定 | des file |
enet_datasheet |
三级降级手册查找 | part supplierPart online dir |
enet_pin_infer |
引脚名推断(可结合实连网络给矛盾提示) | pinName des pin file |
典型用法
enet_netlist() # 先看规模
enet_audit() # 全量审计
enet_link({ net1: "OAMP_6.5V", net2: "OAMP_+6.5V" }) # 确认是否真断链
enet_part({ des: "U23" }) # 看某颗芯片每脚连到哪
enet_datasheet({ part: "ES9038Q2M" }) # 查手册(先查本地 BOOK)
2 个技能
| 技能 | 内容 |
|---|---|
enet-review |
完整校对流程(8 步)、分级口径、判定话术、数据手册三级查找硬性规则、7 条陷阱 |
datasheet-lookup |
数据手册查找独立技能:BOOK → 联网 → 按引脚名推断(必须标注"未核对手册") |
数据手册查找优先级(硬性)
C:\Users\lishuo\Documents\BOOK ← 第一级:约 248 个 PDF,归一化模糊匹配
↓ 找不到
联网(立创商城 / 搜索链接,只返回候选不自动下载)
↓ 无网络
按引脚名称推断 —— 必须标注「推断,未核对手册」,置信度上限 medium
禁止把推断写成"手册规定"。禁止把 partial/family 级匹配说成"已找到手册"。
目录结构
dsh-enet-review/
package.json 插件 manifest(dsh.bundle.patch 指向 cordis.patch.yml)
cordis.patch.yml insert: id=enet-review / name=@local/dsh-enet-review
index.js 入口:inject=['tools','skills'],apply() 注册工具 + 技能 provider
lib/
designator.js 位号/引脚号自然排序;三种网络名规范化键
netlist.js parseEnet / readEnet / class Netlist(含 similarLabelPairs)
pininfer.js 22 条引脚名推断规则
rules.js 8 条校对规则 + audit()
datasheet.js BOOK 目录模糊查找(exact / partial / family 三档打分)
datasheet-online.js 联网兜底(立创商城 GET + 搜索链接)
frontmatter.js SKILL.md frontmatter 解析(支持 | 和 > 块标量)
skills.js 技能 provider(递归扫描 skills/**/SKILL.md)
tools.js 9 个工具定义
define-tool.js defineTool 的零依赖等价实现(link 装载不能 import @deepseek-ai/*,见「方式 B」)
skills/
enet-review/SKILL.md 校对主技能
datasheet-lookup/SKILL.md 手册查找技能
references/
enet-format.md .enet 的 JSON 结构与字段语义
audit-playbook.md 完整流程与判定话术对照表
case-notes.md 真实案例(CH32V305 音频板)—— 仅案例,非通用规则
_selftest.mjs 自检(不依赖 DSH 宿主)
tools/dump.mjs 开发诊断脚本
参考实现来源
- 工具注册:
dsh-meme的defineTool用法;lib/define-tool.js按其宿主实现 (dsh-tools/lib/index.js:838-887的defineTool+:792-811的parameterSchemaSpecToJsonSchema/valueSchemaSpecToJsonSchema)等价重写 - 技能 provider:
@dhicoc/dsh-reverse-skill(resolveBundledRoot+collect+createProvider) 与@deepseek-ai/dsh-skill-badge(53 行最小范例) - 遗留 CLI 参照:
C:\Users\lishuo\XiaomiMiMoProjects\原理图校对\scripts\enet.py
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38608
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37289
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
yikart/AiToEarn#dsh-plugin-aitoearn★ 28947
Generate copy, images and short videos, and publish with one click to Douyin, Kuaishou, Xiaohongshu, WeChat Official, Bilibili, Facebook, TikTok and more, covering the full content lifecycle from creation to publishing and monetization.
superdesigndev/treg★ 10049
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6112
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
Hithink-Tech-Org/Financial-API#hithink-finance★ 4761
Query Hithink Finance data in DeepSeek Harness, view charts in chat, and save refreshable dashboards.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.