deepseek-migrationlisted
Install: claude install-skill zhangliang0115/ai-plugin
# Migrating an agent setup to DeepSeek
DeepSeek is OpenAI-API-compatible, and Anthropic-compatible endpoints exist
for harnesses like Claude Code — so migration is mostly configuration, not
rewrites. What actually breaks is rarely the endpoint; it's caching behavior,
tool calling, and cost assumptions.
## Step 1 — pick the integration path
| Current setup | Path |
|---|---|
| OpenAI SDK / any OpenAI-compatible tool | Point `base_url` to `https://api.deepseek.com`, swap the key, set model ids |
| Claude Code | Use the documented Anthropic-compatible endpoint (env-var style config) |
| Want a native harness | DeepSeek Harness (`dsh`): `npx @deepseek-ai/dsh web` — reads `DEEPSEEK_API_KEY` |
| Editor plugins (Cline etc.) | Custom provider with DeepSeek base URL |
Official per-tool guides: https://api-docs.deepseek.com/guides/coding_agents
Model ids: **`deepseek-chat`** (fast, cheap, non-thinking) and
**`deepseek-reasoner`** (chain-of-thought, slower, pricier).
## Step 2 — the four things that actually differ
1. **Prefix caching is automatic and prefix-sensitive.** DeepSeek bills
repeated identical prompt prefixes at a steep discount — but the prefix
must be *identical*. Put the stable system prompt and repo map first;
never shuffle timestamps or dynamic content in front of them. A reordering
silently kills your cache-hit rate.
2. **`deepseek-reasoner` thinking tokens bill as output.** A reasoner call
can cost many multiples of a chat call. Route: routine edi