ds

ds is a command for Claude Code from PsChina/deepseek-as-subagent. It costs 26 tokens per session (561 once invoked), scanned A, original, MIT.

A command that explicitly sends a coding task to a DeepSeek sub-agent, an additional AI worker, instead of letting the main agent decide whether to delegate it.

In plain words
What is it for?
Use it for coding, debugging, architecture, or multi-file analysis tasks, then inspect the returned files and check that the results meet the requested format and scope.
Why use it?
It gives you direct control over delegation and defines how to choose between a faster default mode and a more capable mode for difficult reasoning.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions subagents.

Good fit Use it for coding, debugging, architecture, or multi-file analysis tasks, then inspect the returned files and check that the results meet the requested format and scope.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/pschina/deepseek-as-subagent/ds
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/PsChina/deepseek-as-subagent

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ds

README.md
[![agentmods](https://agentmods.dev/badge/commands/pschina/deepseek-as-subagent/ds/github.svg)](https://agentmods.dev/commands/pschina/deepseek-as-subagent/ds)
Your own site
<a href="https://agentmods.dev/commands/pschina/deepseek-as-subagent/ds"><img src="https://agentmods.dev/badge/commands/pschina/deepseek-as-subagent/ds/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ds

Your own site · 80×15
<a href="https://agentmods.dev/commands/pschina/deepseek-as-subagent/ds"><img src="https://agentmods.dev/badge/commands/pschina/deepseek-as-subagent/ds.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 561 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.00561
Opus 5.5 $0.00010 $0.00224
Sonnet 5.5 $0.00005 $0.00112
Haiku 4.5 $0.00003 $0.00056

Measured 2d ago against content hash 4804583d50cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ds scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/ds.md · 41 lines

What it actually says

/ds — Delegate to DeepSeek

把后面跟的任务强制派给 DeepSeek 处理,绕过 Claude 的自动决策("该派 / 不该派")。 /ds 固定调用完整 coding API;明确只做静态文件分析的任务应由主 Agent 选择 delegate_to_deepseek_readonly。

模型选择遵循 delegate-to-deepseek skill:Flash 是强前沿 coding-agent 档,粗略处于高端 Sonnet 到 Opus 竞争区间,默认用于大多数 coding 任务;Pro 目标约为 Opus / Sol 级,用于复杂 debugging、架构推理、困难跨文件任务或 Flash 已失败后的升级。

注意:截至 2026-10-22,DeepSeek 官方说明 deepseek-v4-pro 在 V4.1-Pro 上线前会路由到 V4.1-Flash。如果配置的 Pro 槽位仍使用该别名,就不会产生实际能力升级。具体路由和任务边界见 skill 第 3 节。

你要做的

  1. 按 delegate-to-deepseek skill 的准则准备 task、context 和必要时的 model:

    • 用 Glob / LS 收集涉及的文件路径
    • 摘要项目约定(命名规则、输出 schema、边界)
    • 写明成功标准
    • 普通任务保持默认 Flash;困难任务才显式选择 Pro
  2. 调用 mcp__deepseek__delegate_to_deepseek 工具,把用户的请求当作 task 传入:

用户输入: $ARGUMENTS
  1. 工具返回后必须验证:
    • Read 抽样产物文件
    • 检查数量 / schema sanity
    • 失败按 skill 的 fallback 策略处理

不要做的

  • ❌ 不要在调用前问用户"你确定要派吗" —— 用户敲 /ds 已经是明确指令
  • ❌ 不要因为 Pro 可用就默认选择 Pro
  • ❌ 不要把真实 provider 模型名传给 model 参数
  • ❌ 不要在工具返回 ERROR 时直接放弃 —— 按 skill 的 fallback 策略重试或接管
  • ❌ 不要把 API key / 凭证塞进 task / context
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed 4804583d50cc
  2. 1mo ago First seen · 41 lines · 26 tokens per session scan A 9635bee0de64

Subscribe to this mod's changes

ds is a command published in the GitHub repository PsChina/deepseek-as-subagent (52 stars, last pushed 3d ago), licensed MIT. It adds 26 tokens to every session and 561 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.