Deepseek As Subagent
Run DeepSeek as a real sub-agent inside Claude Code / Codex CLI, with its own 7-tool agent loop, workspace-scoped file access, and bounded Bash.
Install: git clone https://github.com/PsChina/deepseek-as-subagent
Works with Claude Code, Codex · 43 GitHub stars
Install
git clone https://github.com/PsChina/deepseek-as-subagentInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →deepseek-as-subagent
English · 简体中文
Run DeepSeek — or your own OpenAI-compatible local model — as a real sub-agent inside Claude Code / Codex CLI. The host agent keeps the main conversation, planning, judgment, and verification. The selected model gets its own agent loop for execution-heavy work. Coding APIs use workspace-scoped writes and bounded trusted-host Bash; separate read-only APIs provide pure file analysis without command execution.
Full coding delegation
Claude / Codex (main agent)
├─ ordinary coding → delegate_to_deepseek
└─ coding task whose direction may change
→ start_deepseek → job_id
├─ send_deepseek_message(job_id, ...)
├─ get_deepseek_status(job_id)
├─ cancel_deepseek(job_id)
└─ get_deepseek_result(job_id)
▼
Configured-model coding sub-agent
│ Read / Write / Edit / Bash / Glob / Grep / NotebookEdit
│ autonomously reads, modifies, runs, and tests in the workspace
▼
Result returns to the host
Host verifies representative changes / tests
Coding Bash runs on the trusted host with cwd=workspace; it is bounded and
credential-isolated, but it is not an OS sandbox.
Read-only analysis delegation
Claude / Codex (main agent)
├─ ordinary read-only analysis → delegate_to_deepseek_readonly
└─ read-only analysis whose direction may change
→ start_deepseek_readonly → job_id
├─ send_deepseek_message(job_id, ...)
├─ get_deepseek_status(job_id)
├─ cancel_deepseek(job_id)
└─ get_deepseek_result(job_id)
▼
Configured-model read-only sub-agent
│ Read / Glob / Grep
│ autonomously reads, searches, reviews, and performs static analysis
▼
Analysis returns to the host
Host verifies the conclusion
Quick start
git clone https://github.com/PsChina/deepseek-as-subagent.git
cd deepseek-as-subagent
# Inspect install.sh and requirements.lock, then:
./install.sh
Python 3.10–3.12 must already be installed. The installer never pipes a remote
bootstrap script into a shell. It installs the exact, hash-verified dependency
set in requirements.lock, registers the MCP server with Claude Code, deploys
protected generation copies of the skill + /ds slash command. It does not
modify shell startup files. Helper deployment is best-effort after the core MCP
registration commits; a foreign destination is preserved and reported.
For DeepSeek's hosted API, configure a key in ~/.deepseek-mcp/config.json on
POSIX or set DEEPSEEK_API_KEY on Windows (get one at
platform.deepseek.com). A local loopback
OpenAI-compatible server does not need a DeepSeek key. Then run claude and
try /ds inspect this workspace and summarize its structure.
Similar plugs
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
Bash is all you need - A nano claude code, like 「agent harness」, built from 0 to 1
Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro…
A light-weight and powerful meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.