← 返回 Skills 市场
162
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install context-monitor-helper
功能描述
实时监控会话上下文Token使用率,回复底部显示百分比和进度条,超过阈值时提醒清理或开启新会话。
使用说明 (SKILL.md)
context-monitor - 上下文使用率监控
实时监控会话上下文使用率,在每次回复底部显示占用百分比,超过阈值时主动提醒用户清理上下文。
🚀 功能特性
- 实时显示:每次回复自动附加上下文使用百分比
- 进度条可视化:直观的进度条展示使用率
- 智能预警:超过 70% 时提醒使用
/new或/compact - 多模型支持:自动识别不同模型的上下文窗口大小
- 零配置:安装即用,无需额外设置
📦 安装
claw skill install context-monitor
💡 使用场景
| 场景 | 说明 |
|---|---|
| 长对话管理 | 避免上下文超限导致遗忘早期内容 |
| 多轮调试 | 监控 Token 消耗,优化对话策略 |
| 成本控制 | 了解每次对话的 Token 使用情况 |
| 主动清理 | 在达到限制前及时使用 /new 或 /compact |
🎯 输出示例
[你的回复内容]
---
📊 上下文使用:45% ▓▓▓▓▓▓▓▓░░░░░░░░░ (4500/10000 tokens)
超过 70% 时:
[你的回复内容]
---
⚠️ 上下文使用:78% ▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░ (7800/10000 tokens)
💡 建议:使用 /new 开启新会话 或 /compact 压缩上下文
⚙️ 配置选项
| 配置项 | 默认值 | 说明 |
|---|---|---|
warningThreshold |
70 | 警告阈值(百分比) |
criticalThreshold |
90 | 严重警告阈值(百分比) |
showProgressBar |
true | 是否显示进度条 |
showTokenCount |
true | 是否显示具体 Token 数 |
🔧 命令
| 命令 | 说明 |
|---|---|
/new |
开启全新会话(清空上下文) |
/compact |
压缩上下文(保留核心信息) |
/context |
手动查看当前上下文状态 |
📝 注意事项
- Token 计算:基于实际消息内容估算,可能存在±5% 误差
- 模型差异:不同模型上下文窗口不同,自动识别
- 性能影响:每次回复增加约 10-20ms 处理时间
- 隐私安全:不存储任何对话内容,仅实时计算
🐛 常见问题
Q: 为什么显示的 Token 数和平台统计不一致? A: 本 Skill 使用估算算法,实际 Token 数以平台为准。误差通常在±5% 内。
Q: 可以关闭上下文显示吗?
A: 可以,使用 /context off 临时关闭,/context on 重新开启。
Q: 支持哪些模型? A: 支持所有 OpenClaw 集成的模型,自动识别上下文窗口大小。
📄 许可证
MIT License
🔗 相关链接
安全使用建议
This skill appears to do what it claims: estimate token usage from the agent-provided session history and append a status/footer. Before installing: 1) Inspect SKILL.md (open in an editor that shows invisible characters or view hex) because the scanner detected unicode control chars; 2) Confirm your platform supplies context.sessionHistory and context.modelName to skills (the code expects those fields); 3) Test the skill on non-sensitive conversations first to verify behavior and estimation accuracy; 4) If you want extra assurance, review the GitHub repo linked in the package or run the included unit tests locally. If you see unexpected hidden characters or any code that makes network calls or writes files, do not install.
能力评估
Purpose & Capability
Name/description (context token monitoring) matches the code and README: functions estimate tokens, map model context limits, build progress bars, and produce appended status messages. No unrelated credentials, binaries, or surprising dependencies are declared.
Instruction Scope
SKILL.md instructions are scoped to showing context usage and related commands (/context, /new, /compact). The runtime code only reads context.sessionHistory and context.modelName (expected inputs from the host agent) and returns a formatted status string. There is no instruction to read arbitrary files, exfiltrate data, or call external endpoints.
Install Mechanism
The skill is instruction-only (no explicit install spec), but the package includes source, dist, and package-lock files. That is not itself dangerous, but because there is no provided install script the platform's normal 'claw skill install' process will determine installation behavior — review the platform install step. No external download URLs or extract operations are present in the bundle.
Credentials
The skill requires no environment variables, credentials, or config paths. It processes session content in memory and the code does not reference secrets or system config. This is proportionate to the stated purpose.
Persistence & Privilege
The skill does not request 'always: true' and contains no code that modifies other skills or writes persistent credentials. The SKILL.md claims 'no storage' and the code does not persist data — it only computes estimates from provided context. Normal autonomous invocation remains allowed (platform default).
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install context-monitor-helper - 安装完成后,直接呼叫该 Skill 的名称或使用
/context-monitor-helper触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Added type definitions and build output files for distribution.
- Updated configuration and metadata files for improved packaging.
- Minor internal adjustments in core logic source file.
v1.0.0
context-monitor-helper 1.0.0 – 上下文使用率智能监控首次发布!
- 实时显示上下文使用百分比,并以进度条可视化
- 超过70%自动提醒用户清理或开启新会话
- 支持多模型,自动识别上下文窗口大小,无需配置即可使用
- 提供手动命令(/new, /compact, /context)辅助管理上下文
- 可自由定制警告阈值和显示选项
元数据
常见问题
Context Monitor Helper 是什么?
实时监控会话上下文Token使用率,回复底部显示百分比和进度条,超过阈值时提醒清理或开启新会话。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 162 次。
如何安装 Context Monitor Helper?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install context-monitor-helper」即可一键安装,无需额外配置。
Context Monitor Helper 是免费的吗?
是的,Context Monitor Helper 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Context Monitor Helper 支持哪些平台?
Context Monitor Helper 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Context Monitor Helper?
由 rfdiosuao(@rfdiosuao)开发并维护,当前版本 v1.0.1。
推荐 Skills