前言¶
DSH 的理念是「一切皆插件」。如果你已經在 Claude Code 中維護 instructions、skills、commands、agents、hooks、permission rules 和 MCP servers,切換到 DeepSeek Harness(DSH)時,不一定想逐項重建。dsh-movein 面向這個場景:它先把可遷移內容列出來,再在明確執行 apply 時寫入 DSH。
社區目錄是獨立站點,與 DeepSeek / 幻方沒有官方從屬關係;本文只介紹 dsh-movein 插件本身,不把它寫成官方應用商店。
這是什麼¶
dsh-movein 是一個 DSH 插件,npm 包名也是 dsh-movein。它由 sjh9714 維護,採用 MIT 許可證,目標是在不手工重建的情況下,把已有 agent 配置遷入 DSH。
它主要處理這些對象:
- Claude Code 是主要遷移對象;
- Codex 和 OpenCode 支持作爲來源;
- instructions、skills、commands、agents、hooks、permission rules 和 MCP servers;
movein_from_claude_code與movein_from_opencode,用於模型驅動調用。
核心功能¶
- 默認 dry run:沒有
--apply時,CLI 不執行寫入。 - 現有目標位置保持不動:已有 destinations 會被 skipped。
- Apply 前展示 conflicts 和 unsupported entries。
- 支持
--copy:如果你希望 skills 是 copied skills,而不是 symlinks。 - 每次寫入前備份
cordis.patch.yml;npx dsh-movein restore可恢復最近的 patch backup。 ~/.dsh/movein-manifest.json記錄 moved sources 和 destinations。- Environment placeholders 保持 runtime references;secret-looking plaintext values 會在 apply 前被報告。
- Sessions 不在遷移範圍內。
- 在 Windows 上,permission-denied symlink 會回退爲 copy,並在 report 中命名。
npx dsh-movein doctor檢查 recorded destinations、skill frontmatter、required packages 和 hook bridge rows;它不會執行 user hook。- Hook enforcement 不等於 migration parity:當前 DSH hook bridges 存在 upstream enforcement gaps,不應僅憑遷移結果把它們當作唯一 policy boundary。
安裝與啓用¶
在 DSH 內添加插件:
dsh plugin --profile web add dsh-movein
這一步把 dsh-movein 安裝到 web profile。安裝完成後重啓 dsh web,打開 Settings,然後選擇 Move in。
CLI 也可以直接調用:
npx dsh-movein
這個命令默認是 dry run。
兼容範圍:
- DSH:
>=0.1.0-rc.8 <0.2.0 - DSH releases:
0.1.0-rc.8、0.1.1-rc.1、0.1.1-rc.2 - profile:
web - Node:
>=18 - OS:
darwin、linux、win32
典型用法¶
Claude Code¶
npx dsh-movein
npx dsh-movein --apply
第一條命令預覽將要遷移的內容;第二條命令執行寫入。若需要 copied skills 而不是 symlinks,可在對應命令中使用 --copy。
Codex¶
npx dsh-movein --from codex
npx dsh-movein --from codex --apply
OpenCode¶
npx dsh-movein --from opencode
npx dsh-movein --from opencode --apply
遷移後檢查¶
npx dsh-movein doctor
npx dsh-movein doctor --live
doctor 用於檢查遷移後的記錄、skills frontmatter、required packages 和 hook bridge rows。doctor --live 需要已安裝 @deepseek-ai/dsh 0.1.1-rc.2 或更新版本,並需要 Node 22.19+ 或 24+ 運行時;Node 23 會被拒絕。
恢復¶
npx dsh-movein restore
它恢復最近的 patch backup。
查看 DSH profile¶
dsh --profile web --dump-config | grep -E "mcp-|cc-hooks"
遷移 skills 後,建議開啓新的 DSH 會話,因爲 skill catalog 是按會話捕獲的。
Star 確認¶
CLI 成功 apply 後,如果處於 human TTY,會詢問 Star dsh-movein?。如果是 non-TTY 或 agent 輸出,則需要用戶確認,然後再運行:
npx dsh-movein --confirm-star yes
或:
npx dsh-movein --confirm-star no
適用場景與注意¶
dsh-movein 適合已經在 Claude Code、Codex 或 OpenCode 中有配置,並希望把 skills、commands、agents、hooks、permission rules 和 MCP 配置帶入 DSH 的開發者。
使用前注意:
- 插件以當前 DSH 進程權限運行,會讀取來源配置並寫入 DSH 目標位置;安裝啓用前應檢查源碼、依賴和 MIT 許可證。
- 所有 CLI 命令默認 dry run,只有帶
--apply纔會寫入。 - Existing destinations 會被 skipped;不要假設它覆蓋已有配置。
- Conflicts 和 unsupported entries 會在 apply 前出現;需要人工判斷後再決定是否繼續。
- Secret-looking plaintext values 會被報告;environment placeholders 保持 runtime references。
- Hook enforcement 不等於 migration parity;當前 DSH hook bridges 存在 upstream enforcement gaps。
doctor只檢查,不執行 user hook。
結尾¶
dsh-movein 的價值在於把已有 agent 配置以“先預覽、後 apply、可恢復”的方式遷入 DSH,減少手工搬運和誤寫風險。
GitHub:https://github.com/sjh9714/dsh-movein
社區目錄可按插件名 dsh-movein 查找。