DeepSeek Harness 插件 dsh-skill-importer:在 Web UI 中导入、整理和调用 Agent Skills

前言

在 DeepSeek Harness(DSH)里,Agent Skill 通常以 SKILL.md 和相关资源文件的形式存放在项目级或全局级目录中。如果 skill 来源分散在本地文件、URL,或来自 Claude Code、Codex 等 AI coding agent,手工复制容易出现重名、漏文件和发现不及时的问题。下面介绍一个 DSH Web UI 插件:dsh-skill-importer。它由 saitamahang 维护,采用 MIT 许可证,用于在 Web UI 中导入、验证、去重和迁移 skills,并让 harness 自动发现这些 skill。

这是什么

dsh-skill-importer 是一个 DSH Web 插件。它的核心定位是:把 skills 管理带入 DeepSeek Harness Web UI,允许从本地 Markdown 文件或 URL 导入到 harness 自动发现的 skill roots。

它需要:

  • DeepSeek Harness >= 0.1.0-rc.6
  • DSH Web profile
  • MIT 许可证

核心功能

dsh-skill-importer 提供以下已核实能力:

  • 导入、验证、去重、迁移 Agent Skills,覆盖 DeepSeek Harness、Claude Code、Codex 和其他 AI coding agents。
  • 上传 SKILL.md、粘贴 URL,或从 Claude Code、Codex 等类似 agent 迁移完整的 skills 目录。
  • 浏览按 project 和 global roots 分组的 skills,并可单独移除任意副本。
  • 通过 composer picker、/skills 命令,或直接输入 /skill-name 调用 skill。
  • 批量迁移包含 preflight scan、逐条验证每个 SKILL.md、保留 scriptsreferencesassets 和其他资源,并报告 invalid entries。
  • 目标重名默认跳过;可按 skill 选择 replace;替换会保留 temporary backup,swap 失败时 roll back。
  • 运行不需要 agent 或 session,不进入 model tokens 流程;通过 harness watcher 即时发现;支持 workspace-aware targeting;提供 bilingual UI。

安装与启用

首次安装

先执行安装命令:

npx @deepseek-ai/dsh plugin --profile web add dsh-skill-importer@latest

安装后重启 DSH Web:

npx @deepseek-ai/dsh web

更新与查询

已有插件用户可以使用同一条命令更新:

npx @deepseek-ai/dsh plugin --profile web add dsh-skill-importer@latest

检查最新已发布版本:

npm view dsh-skill-importer version

列出 Web profile 中已安装的插件:

npx @deepseek-ai/dsh plugin --profile web list

新版本等待期

DSH profiles use pnpm minimumReleaseAge。新发布版本可能会延迟生效;在等待窗口内,@latest 可能仍解析到上一个成熟版本。

Pre-1.0 semver ranges stop at the next minor。经过等待期后,如果需要跨 minor 指定版本,使用精确版本号:

npx @deepseek-ai/dsh plugin --profile web add dsh-skill-importer@X.Y.Z

如果已经验证发布版本并且必须立即安装,可以在 $DSH_HOME/profiles/web/pnpm-workspace.yaml 中为这个精确版本添加临时例外:

minimumReleaseAgeExclude:
  - dsh-skill-importer@X.Y.Z

两处 X.Y.Z 都替换为同一个目标版本。这个配置只让该版本跳过 supply-chain waiting period。不要永久豁免包名;发布版本成熟后移除这个精确版本例外。

重复插件条目

如果启动失败并报:

duplicate loader entry id: skill-importer

说明 profile 中仍保留旧的 manual configuration。移除 $DSH_HOME/profiles/web/cordis.patch.yml 中手工添加的 skill-importer entry,然后重启 DSH Web:

npx @deepseek-ai/dsh web

典型用法

经过上面的安装步骤后,在 DSH Web 中打开:

Settings → Skills

然后可以做以下操作:

  1. 导入一个 Markdown 文件或 URL。
  2. 选择 Batch import,迁移另一个 agent 的完整 skills 目录。
  3. 选择目标;imported skills 会在 filesystem watcher 发现后出现。

调用 skill 有三种方式:

  1. 使用 composer picker。
  2. 使用 /skills 命令。
  3. 直接输入 /skill-name

写入范围与安全边界

POST routes verify the Origin header and only accept loopback sources:

127.0.0.1
localhost

Writes are restricted to four default writable DSH roots:

.dsh/skills
.agents/skills
~/.dsh/skills
~/.agents/skills

DSH-configured customSkillDirs sit in discovery order,但它们不是 import targets。Bundled skills ship with DSH,并且 cannot be overwritten by the plugin。

Safe-by-design constraints include:

  • fixed skill roots
  • a 256 KB limit
  • same-origin POST checks

适用场景与注意

这个插件适合以下情况:

  • 需要把 skill 管理放进 DSH Web UI。
  • 需要从 Claude Code、Codex 等 agent 迁移完整 skills 目录。
  • 希望导入、验证、去重、迁移和调用 skill 都在 Web UI 中完成。
  • 需要避免手工复制时遗漏 scriptsreferencesassets 等资源。

使用前注意:

  • 需要 DeepSeek Harness >= 0.1.0-rc.6
  • 插件以当前 dsh 进程权限运行。安装前应检查源码和 MIT 许可证。
  • DSH 生态理念是「一切皆插件」;社区目录是独立站点,与 DeepSeek / 幻方无官方从属关系,不应理解为官方应用商店。

结尾

dsh-skill-importer 把 skill 导入、整理和调用收敛到 DSH Web UI 中,适合需要从本地文件、URL 或其他 agent 迁移 skills 的开发者。

GitHub 地址:

https://github.com/saitamahang/dsh-skill-importer
羽毛球分组比赛记分
小程序二维码

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

小夜