Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

migrate-to-dsh

Migrate your project from Claude Code or Codex to DeepSeek Harness (DSH) — an interactive AI skill that detects existing configs, maps them to DSH's plugin composition model, and generates a complete cordis.yml.

What it does

  1. Detects .claude/settings.json, .claude/hooks.json, .codex/hooks.json in your project
  2. Extracts MCP server definitions, hook configurations, and permission preferences
  3. Generates a complete cordis.yml with properly mapped plugin entries
  4. Handles secrets safely — never inlines tokens, always uses !!js process.env.VAR_NAME

Supported migrations

Source MCP Servers Hooks Permissions Instruction Files
Claude Code ✅ ✅ (7/30 events) ✅ ✅ (auto-compatible)
Codex — ✅ (5/10 events) ✅ ✅ (auto-compatible)

Installation

Option 1: User-global (recommended)

git clone https://github.com/jingyan/migrate-to-dsh.git ~/tools/migrate-to-dsh
cp -r ~/tools/migrate-to-dsh/skill/ ~/.dsh/skills/dsh-migrate-from/

The skill is auto-discovered at ~/.dsh/skills/ (rank 400) and available in all projects.

Option 2: Project-local

git clone https://github.com/jingyan/migrate-to-dsh.git /tmp/migrate-to-dsh
cp -r /tmp/migrate-to-dsh/skill/ .dsh/skills/dsh-migrate-from/

Or with .agents/ convention:

cp -r /tmp/migrate-to-dsh/skill/ .agents/skills/dsh-migrate-from/

Option 3: Symlink

git clone https://github.com/jingyan/migrate-to-dsh.git ~/tools/migrate-to-dsh
ln -s ~/tools/migrate-to-dsh/skill ~/.dsh/skills/dsh-migrate-from

Verify installation

The skill appears in DSH's skill catalog once installed. Invoke with:

/dsh-migrate-from

Or the AI selects it automatically when you ask about migrating from Claude Code or Codex.

Directory structure

migrate-to-dsh/
├── README.md                           # This file
├── LICENSE                             # MIT
└── skill/                              # The DSH skill (install this directory)
    ├── SKILL.md                        # Main skill instructions
    ├── agents/
    │   └── openai.yaml                 # OpenAI/Codex agent interface
    └── references/
        ├── claude-code-format.md       # CC config format reference
        ├── codex-format.md             # Codex config format reference
        └── cordis-output-template.md   # Generated cordis.yml examples

Install note: DSH discovers skills by finding SKILL.md at the root of a skill directory. The skill/ subdirectory in this repo IS the skill — copy or symlink it as ~/.dsh/skills/dsh-migrate-from/ (so DSH finds ~/.dsh/skills/dsh-migrate-from/SKILL.md).

Usage example

You: /dsh-migrate-from

AI: I'll scan your project for Claude Code or Codex configurations...

    Found:
    - .claude/settings.json (2 MCP servers: github, tavily)
    - .claude/hooks.json (3 events: PreToolUse, PostToolUse, Stop)

    MCP Servers:
    | Name    | Transport | Command                                    |
    |---------|-----------|-------------------------------------------|
    | github  | stdio     | npx -y @modelcontextprotocol/server-github |
    | tavily  | stdio     | npx -y @tavily/mcp-server                  |

    Hooks: 3 events configured (all bridgeable)
    Sandbox: workspace-write + ask (default)

    ⚠️  Secrets detected — will be replaced with process.env references.

    Ready to generate cordis.yml?

You: yes

AI: [generates complete cordis.yml]

What gets migrated

Config item How it maps in DSH
mcpServers entries One dsh-mcp-client plugin per server
hooks.json (CC) dsh-hooks-claude-code bridge pointing to original file
hooks.json (Codex) dsh-hooks-codex bridge pointing to original file
Permission mode dsh-sandbox-policy + dsh-user-approval config
CLAUDE.md / AGENTS.md Auto-loaded by DSH — no conversion needed

Limitations

  • Only command-type hooks are supported (not http/mcp_tool/prompt/agent)
  • Claude Code: 7 of 30 hook events are bridged
  • Codex: 5 of 10 hook events are bridged
  • allowedTools/blockedTools have no direct DSH file-level equivalent
  • Claude Code's layered config (user/project/system/policy) collapses to one file

License

MIT

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors