dsh-context-doctor
DSH 上下文注入审计插件:统计 AGENTS.md 指令链 / 技能目录 / 工具 schema / MCP 工具的 token 成本,检测重复与冲突;原生 Context Doctor 面板 + context_audit 工具。
What it is
DSH 上下文注入审计插件:统计 AGENTS.md 指令链 / 技能目录 / 工具 schema / MCP 工具的 token 成本,检测重复与冲突;原生 Context Doctor 面板 + context_audit 工具。
How to install
Run this in the DSH web profile, then refresh the page.
$ dsh plugin --profile web add 'git+https://github.com/Zhenyu98/dsh-context-doctor.git#41d5c2e4bbe0611b7928c4007bb28545f7ace38f'
DSH versions accepted
^0.1.2-rc.1
Author and traction
Zhenyu98 · ★ 68 · Updated 2026-09-06
About this plugin
Context Doctor
DSH 上下文注入审计插件:看清模型每个请求到底背着多少上下文,找出重复、冲突与浪费 token 的注入物。
全程只读 · token 成本逐项量化 · 可执行裁剪建议
为什么 · 快速安装 · Agent 安装 · 功能 · 使用 · FAQ · License
面板文案跟随 DSH 的语言设置(简体中文 / English),并沿用宿主的浅色 / 深色 / 跟随系统主题。 截图待更新至 v0.7 版式。 Why
DSH 会话里,模型每个请求都自动携带一批注入物:层层叠加的 AGENTS.md 指令链、一百多个技能的目录摘要、几十个工具 schema、MCP 工具面。它们悄悄消耗输入 token,且经常出现跨文件重复段落、同名技能互相遮蔽、工具面膨胀——但平时没人量化,问题到上下文告警时才暴露。 Quick Start 宿主版本要求:DSH >= 0.1.2-rc.1(已对 0.1.2-rc.1 验证)。0.1.2 重排了客户端模块表(dsh-client-runtime 换成 dsh-client-store),旧版宿主请固定 v0.6.1 —— 版本错配会让整个 web shell 起不来,不只是本插件(见 #9)。@deepseek-ai/cordis 与 @deepseek-ai/dsh-tools 是 peer 依赖,由宿主 profile 提供;插件不自带这两份运行时(自带会铸造第二个工具调度器,见 #2)。
预期成功信号:
重启后,在已有会话的发送按钮左侧出现 Context Doctor 控件,或模型调用 context_audit 返回分节报告,即安装成功。面板文案跟随 DSH 的语言设置,并沿用其浅色 / 深色 / 跟随系统主题;新会话尚未分配 sessionId 时不会显示会话级控件。 Agent Setup
把下面这段发给 Codex、Claude Code、Cursor 或 DSH 里的任意 agent:
完整安装、验证与排障见 agent-setup.md。 它能做什么 两种形态
Similar plugins
EverOS
One portable memory layer for every AI agent: local-first, Markdown-native, user-owned, and self-evolving across apps, t…
billion-context
A context-compression plugin — small context windows (a 100K context is enough), 5x fewer tokens, month-long single sess…
dsh-context
A DeepSeek Harness plugin for context insight and management, with context dashboard and context command, for understand…