前言¶
在 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、保留scripts、references、assets和其他資源,並報告 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
然後可以做以下操作:
- 導入一個 Markdown 文件或 URL。
- 選擇
Batch import,遷移另一個 agent 的完整 skills 目錄。 - 選擇目標;imported skills 會在 filesystem watcher 發現後出現。
調用 skill 有三種方式:
- 使用 composer picker。
- 使用
/skills命令。 - 直接輸入
/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 中完成。
- 需要避免手工複製時遺漏
scripts、references、assets等資源。
使用前注意:
- 需要 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