前言¶
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 查找。