5.3 KiB
name, description
| name | description |
|---|---|
| dsh-migrate | Migrate a user's setup from another coding agent (opencode, pi, Claude Code, Codex) to DSH — porting instruction files, custom commands and skills, hooks, MCP servers, and API/env configuration into their DSH equivalents. Use when the user asks to migrate, switch, or move from another coding agent to DSH. |
DSH Migrate
Move a user's existing coding-agent setup onto DSH: instruction files, custom commands, skills, hooks, MCP servers, and API/environment configuration. Port only what has a real DSH equivalent; tell the user plainly when something has none.
First: identify the source
Ask which agent the user is migrating from if they have not said: opencode, pi, Claude Code, or Codex. The mapping differs per source. Then locate that agent's config (ask the user, or inspect the obvious locations: ~/.claude/ and .claude/ for Claude Code, ~/.codex/ and .codex/ for Codex, the opencode/pi config dir the user names). Read what exists before proposing changes; never invent files the user does not have.
DSH targets
Every migration lands in one of these DSH surfaces. Verify the exact path against the running install rather than assuming.
- Workspace instructions: DSH reads
AGENTS.mdandCLAUDE.md(andAGENTS.local.md/CLAUDE.local.md) from the project, walking up to the project root, plus a user-global~/.dsh/AGENTS.md.CLAUDE.mdis read as-is, so a Claude Code project needs no rename. - Personal overlay (user-global, applies to every DSH session): the Harness home
~/.dsh/holdsconfig.yaml(a top-level YAML array of Loader patch entries that patch the booted plugin tree),.env(fills environment gaps only — ambient env and the invoking directory's.envwin),AGENTS.md, andskills/. - Skills: directory-bundle or flat-Markdown skills load from
.dsh/skills/and.agents/skills/in the project, and~/.dsh/skills/and~/.agents/skills/for the user. Personal skills go in~/.dsh/skills/<name>/SKILL.md. Use theskill-creatorskill to author them. - Hooks: DSH runs a mapped subset of an existing Claude Code or Codex hook config through compatibility bridges — no rewrite needed for the supported subset. See the per-source sections.
- MCP servers: DSH has no native MCP client. Reach MCP servers through the
mcporterskill / CLI, which can call servers already configured for other tools. - API / model config: DSH uses
DEEPSEEK_API_KEY(and optionalDEEPSEEK_BASE_URL) from.env(root, invoking directory, or~/.dsh/.env). Model and provider are chosen in the bootedcordis.yml/ personal overlay, not per-provider config files.
Per-source mapping
Claude Code
CLAUDE.md→ read as-is by DSH workspace instructions; keep it, or consolidate intoAGENTS.md. User-global rules →~/.dsh/AGENTS.md..claude/hooks.json(or a settings file'shookskey) → the@deepseek-ai/dsh-hooks-claudebridge runs the mapped command-hook subset on DSH's interception seams, with${CLAUDE_PLUGIN_ROOT}/${CLAUDE_PROJECT_DIR}substitution. Add it to the bootedcordis.yml(or personal overlay) pointingconfigPathat the existing file. Anything outside the mapped subset should become a native DSH plugin, not a shimmed hook.- Slash commands → DSH commands are plugin-provided; there is no drop-in import. Reimplement genuinely needed ones as skills (
~/.dsh/skills/) or plugins. - MCP servers in Claude config → use
mcporterto reach them; DSH has no native MCP. ANTHROPIC_API_KEYetc. do not transfer; DSH is DeepSeek-backed viaDEEPSEEK_API_KEY.
Codex
- Codex
AGENTS.md→ DSH already readsAGENTS.md; keep it. User-global →~/.dsh/AGENTS.md. - Codex hook config → the
@deepseek-ai/dsh-hooks-codexbridge runs a deliberate subset (PreToolUse,PostToolUse,SessionStart,UserPromptSubmit,Stop; regex-only matchers; no plugin env injection; no pre-tool approval/rewrite). Add the bridge to the booted config withconfigPathat the existing Codex hooks file. State the unsupported points to the user rather than implying full parity. - MCP servers →
mcporter. - API/env →
DEEPSEEK_API_KEYin.env.
opencode / pi
- These have no compatibility bridge. Port by concept, not by file:
- Agent/system instructions →
AGENTS.md(project) and~/.dsh/AGENTS.md(user-global). - Provider/model and any plugin-style tuning → the booted
cordis.ymlor~/.dsh/config.yamloverlay patches; API keys →.env. - Reusable prompts/commands → skills under
~/.dsh/skills/. - MCP servers →
mcporter.
- Agent/system instructions →
- pi has no native MCP by design; the
mcporterroute is the same as for DSH.
Do the migration
- Confirm the source agent and read its actual config.
- For each capability (instructions, hooks, commands/skills, MCP, API/env), map it to the DSH target above, or tell the user it has no equivalent.
- Write the ported files (
AGENTS.md,~/.dsh/AGENTS.md,~/.dsh/config.yaml,~/.dsh/.env, skills). For hook bridges, add the plugin entry to the booted config. - Verify: hooks need the bridge plugin present in the running tree; MCP needs
mcporterreachable; API needsDEEPSEEK_API_KEYset. Test in a real DSH session, not just on paper. - Summarize what was ported, what was reimplemented, and what has no DSH equivalent.