AmethystLuna/embedded-workbench:嵌入式 C/C++ 固件开发的 DSH 插件

前言

在 DSH 这类以插件扩展会话能力的工具里,开发者常需要把特定领域规则注入模型上下文。嵌入式 C/C++ 固件开发尤其明显:FreeRTOS、中断、NVM 存储、Keil MDK(AC5/AC6)、ARMCLANG、HardFault 分析、状态机、LVGL 等约束,不能只靠通用代码生成。

下面介绍 AmethystLuna/embedded-workbench。这是一个面向嵌入式固件开发的插件仓库,并为 DeepSeek Harness(DSH)提供原生 cordis bundle。

这是什么

AmethystLuna/embedded-workbench 是一个嵌入式 C/C++ 固件开发工具箱。资料中的一句话定位是:覆盖 FreeRTOS、中断、NVM 存储、Keil MDK(AC5/AC6)、ARMCLANG、HardFault 分析、状态机、架构原则、LVGL 陷阱。

仓库维护者为 AmethystLuna,许可证为 MIT。已抓取资料可确认 npm 包名为 dsh-embedded-workbench,版本为 0.8.4;要求 Node 引擎 >=20,DSH 引擎 dsh >=0.1.0-rc.7,兼容 profiles 为 headlesspeerDependencies 中可确认存在 @deepseek-ai/cordis,完整版本约束未在已核实资料中给出。

核心组件

技能

README/package.json 描述中提到“8 个技能”,但已抓取 README 技能表只列出下表 7 个技能;logicprobe 已拆分为独立插件。

技能 资料中的说明
embedded-workbench 引导技能:工作流、策略、子代理映射、主动建议、跨平台工具映射、文档模板
debug-methodology 8 条调试铁律、修复准则、迭代调试案例研究
embedded-firmware-dev FreeRTOS、中断、NVM 存储、异步生命周期、边界分析、架构原则、LVGL 陷阱
keil-mdk-build UV4 CLI、ARM Compiler 5/6、.map 分析、合并打包、构建诊断
c-cpp-dev C/C++ 代码生成、风格、内存布局、重构
state-machine-design 状态模型、重试、超时、转换门控、实现模式
hardfault-triage 处理器异常分类:故障寄存器、栈帧、PC 定位源码、根因分类

代理

资料列出 4 个代理:

代理 说明
architecture-steward 只读规划:设计包、模块边界、切片拆分
design-reviewer 设计文档事实核查:逐条核验声称与代码库事实
execution-worker 计划 → 审批 → 实施循环,含编译验证
quality-coordinator 实现审查:Bug 发现、合规检查、结束完整性

在 DSH 原生 bundle 部分,资料称这 4 个自定义 agent 有意不移植,而 DSH 原生 subagent 工具已覆盖并行多 agent 工作。

DSH 首步门禁

该插件为 DSH 提供原生 cordis bundle,并注册模型可见目录条目 cordis_inspect。bundle 会在每个 agent 会话的第一个模型步骤注入 1% RuleRed FlagsPlan Verification Gate 相关门禁文本。

README 称 Plan Verification Gate 依赖 logicprobelogicprobe 已拆分为独立插件。

安装与启用

DSH

README 故障排查中给出的 DSH 原生 bundle 安装命令是:

dsh plugin add "github:AmethystLuna/embedded-workbench"

如果使用 web profile,注意 npm 包名是无 scope 的 dsh-embedded-workbenchpackage.json 的依赖键与 dsh.profile.bundles 都必须写 dsh-embedded-workbench,否则 DSH 加载器会因找不到 node_modules/dsh-embedded-workbench 而启动失败。

其他平台

资料中还给出以下平台安装方式。

Claude Code

先修改 ~/.claude/settings.json,在 extraKnownMarketplaces 中加入 marketplace:

{
  "extraKnownMarketplaces": {
    "embedded-workbench": {
      "source": {
        "source": "github",
        "repo": "AmethystLuna/embedded-workbench"
      }
    }
  }
}

然后执行 CLI 安装:

claude plugin install embedded-workbench@embedded-workbench

也可以手动克隆到 Claude 插件目录:

git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.claude/plugins/dev/embedded-workbench

再在 ~/.claude/settings.json 中启用:

{
  "enabledPlugins": {
    "embedded-workbench@dev": true
  }
}

Codex CLI

添加 marketplace 后安装:

codex plugin marketplace add AmethystLuna/embedded-workbench
codex plugin install embedded-workbench

也可以手动克隆:

git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.codex/plugins/embedded-workbench

技能可通过 $debug-methodology 等形式调用。

Cursor

克隆到 Cursor 插件目录:

git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.cursor/plugins/embedded-workbench

或通过插件市场 UI 执行:

/add-plugin AmethystLuna/embedded-workbench

Kimi CLI

通过 Kimi 插件管理器安装:

/plugins install https://github.com/AmethystLuna/embedded-workbench.git

或手动克隆:

git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.kimi/plugins/embedded-workbench

技能可通过 /skill:debug-methodology 等形式调用。

OpenCode

opencode.jsonplugin 数组中添加:

{
  "plugin": [
    "embedded-workbench@git+https://github.com/AmethystLuna/embedded-workbench.git"
  ]
}

ZCode

ZCode 没有插件商店,资料中给出手动复制方式:

git clone https://github.com/AmethystLuna/embedded-workbench.git
cp -r embedded-workbench/skills/* .zcode/skills/

技能可通过 $skill-name 调用。

DSH 配置

DSH bundle 支持以下配置项:

类型 默认值 说明
enabled boolean true 设为 false 可关闭首步 Gate 注入
gateContent string 内置 gate 文本 覆盖注入到首轮模型上下文中的文本

在 profile 的 cordis.patch.yml 中可按 id: embedded-workbench 覆盖:

- insert:
    - id: embedded-workbench
      name: 'dsh-embedded-workbench'
      config:
        enabled: true
        gateContent: |
          ...

修改配置后需要重启 DSH。

典型用法

  • 在 DSH 会话中,可以说“用 Multi-Agent Workflow”,或调用 Skill("embedded-workbench") 加载完整工作流系统。
  • 领域技能会在任务匹配其 Use when 描述时自动激活。README 提到 NOT 子句用于防止误触发,例如纯格式化不会加载 c-cpp-dev
  • 在 Codex CLI 中,技能可通过 $debug-methodology 等形式调用。
  • 在 Kimi CLI 中,技能可通过 /skill:debug-methodology 等形式调用。
  • 在 ZCode 中,技能可通过 $skill-name 调用。

适用场景与注意

适合需要在 DSH、Claude Code、Codex CLI、Cursor、Kimi CLI、OpenCode 或 ZCode 中加载嵌入式 C/C++ 领域技能的开发者。尤其适合希望把调试方法、固件约束、Keil 构建、状态机设计、HardFault 分析等规则纳入会话上下文的场景。

插件以当前 DSH 进程权限运行,安装前应检查源码、MIT 许可证与 profile 配置。资料给出的 DSH 权限边界是:

  • 运行时只读取包内 skills/ 目录,用于通过 DSH 标准 filesystem skill provider 注册技能。
  • 会话首轮向模型上下文注入配置好的 gate 文本。
  • 不读取凭据、不发起网络连接、不访问 DSH 会话上下文之外的用户数据。
  • 实际使用技能时,模型会像使用其他编码技能一样,按用户指示读取项目文件。

其他注意:

  • DSH 技能不可见时,确认 DSH 版本支持 ctx.skills / Agent Skills 发现,并在安装后重启 profile。
  • Gate 未注入时,检查 enabled 是否为 false,以及 cordis.patch.yml 中是否存在 id: embedded-workbench 行。
  • 插件管理器拒绝安装时,确认 @deepseek-ai/* 包声明在 peerDependencies 中,而不是 dependencies
  • 手动复制后 DSH 仍看不到技能时,改用原生 bundle 安装命令:
  dsh plugin add "github:AmethystLuna/embedded-workbench"
  • 安全漏洞不要公开创建 issue。资料建议使用 GitHub Security Advisory 或 SECURITY.md 中的联系方式私下报告。
  • logicprobe 已拆分为独立插件;README 称 Plan Verification Gate 依赖 logicprobe

结尾

AmethystLuna/embedded-workbench 的价值,是把嵌入式固件开发中常见的领域规则、调试方法和 DSH 首步门禁打包成可安装的插件。已核实资料未给出目录页链接;GitHub 仓库地址为:

https://github.com/AmethystLuna/embedded-workbench

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜