Skip to content
Development
Command

/doctor

Diagnose what is busting Claude Code's DeepSeek prefix cache

From plugin
permafrost
234 skills4 commands1 hook
Install
> /plugin marketplace add jianzhichun/permafrost
> /plugin install permafrost@permafrost

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/doctor

Context preview

What this command does when you run it.

Diagnose what is busting Claude Code's DeepSeek prefix cache

Command definition

doctor.md
description: Diagnose what is busting Claude Code's DeepSeek prefix cache
allowed-tools: Bash(curl:*)

Diagnose the DeepSeek prefix cache for this session.

Pull the proxy's alignment report and prefix-change history:

!`curl -fsS "http://127.0.0.1:${PERMAFROST_PORT:-8787}/permafrost/doctor" 2>/dev/null || echo '{"error":"proxy not reachable — start it with: permafrost up"}'`

Also check the two environment knobs that most often break the cache under a custom endpoint:

!`echo "ANTHROPIC_BASE_URL=${ANTHROPIC_BASE_URL:-<unset>} ENABLE_TOOL_SEARCH=${ENABLE_TOOL_SEARCH:-<unset>} PERMAFROST_MODE=${PERMAFROST_MODE:-aggressive}"`

Then explain to the user, in plain language:

  • Whether the cache **anchor (tools + system) is staying frozen** or churning, and the count of resets.
  • Any **volatile content** still detected in the system prefix (dates, git status, UUIDs, hashes) and what it costs.
  • If `ENABLE_TOOL_SEARCH` is not `true` while `ANTHROPIC_BASE_URL` is a custom host, warn that Claude Code is likely re-inlining the full tool set every turn (a major buster) and that it must be set **before** launching `claude`.
  • Concrete next steps (e.g. switch to `PERMAFROST_MODE=aggressive`, set the env var, restart the session).
Ships withpermafrost

Freeze Claude Code's prompt prefix so DeepSeek's automatic cache always hits — alignment proxy + coalescing + keepalive, installable as a CC plugin. Measured 64% cheaper on real Claude Code traffic.

Get the whole plugin
Stats
23
Stars
3
Forks
Maintained
Maintenance
Python
Language
MIT
License
2mo ago
Last commit
3mo ago
Created

Repo: jianzhichun/permafrost

Other commands on permafrost.