ctx-stats
它能做什么
这个技能报告 context-mode 在当前会话中节省了多少内容。适合希望看到通过 context-mode 处理工作的好处的人。
适用场景
- ✓当有人想知道一次会话中节省了多少上下文的时候。
- ✓当用户想看看哪些工具消耗的令牌最多的时候。
- ✓当团队在判断 context-mode 是否值得使用的时候。
技能链接
https://github.com/mksglu/context-mode/blob/main/skills/ctx-stats/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请显示 context-mode 在这次会话中节省了多少。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能会调用统计工具,把它的完整输出以表格形式展示,然后用一行突出主要的节省数字。它只读取统计,从不重置任何内容。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Context Mode Stats
Show context savings for the current session.
Instructions
- Call the
mcp__context-mode__ctx_statsMCP tool (no parameters needed). - CRITICAL: You MUST copy-paste the ENTIRE tool output as markdown text directly into your response message. Do NOT summarize, do NOT collapse, do NOT paraphrase. The user must see the full tables without pressing ctrl+o. Copy every line exactly as returned by the tool.
- After the full output, add ONE sentence highlighting the key savings metric, e.g.:
- "context-mode saved 12.4x — 92% of data stayed in sandbox."
- If no data yet: "No context-mode calls yet this session."
Purge
ctx_purge(confirm: true)— Permanently deletes all indexed content from the knowledge base. Use/context-mode:ctx-purgefor this.
常见问题
这个技能会重置统计吗?
不会。它是只读的,只显示统计数据。
我如何清除知识库?
请改用清除技能,因为这个技能从不删除任何内容。
如果还没有任何调用怎么办?
技能会报告本次会话中尚未进行任何 context-mode 调用。
详情
作者的原始描述
Show how much context window context-mode saved this session. Displays token consumption, context savings ratio, and per-tool breakdown. Read-only — shows stats only, no reset capability. To wipe the knowledge base entirely, use ctx_purge instead. Trigger: /context-mode:ctx-stats
repo: mksglu/context-mode
热度
- GitHub 星标
- 33k
- 排名
- #8516
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
context-mode
33k教你的智能体使用 context-mode 工具来读取、搜索和运行大量数据的任务,让大型输出不占用主对话空间。
context-mode
33k教你的智能体在沙箱中处理数据密集型的工作,只输出答案,让原始文件和网页不会淹没对话。
context-mode
33k教你的智能体在输出可能很大时(例如日志、JSON 或构建结果),使用 context-mode 工具代替普通的 shell 命令。
ctx-doctor
33k运行 context-mode 诊断,检查运行环境、钩子、搜索存储、插件设置和版本,然后显示清晰的通过或失败报告。