Context Monitor Helper

v1.0.1

实时监控会话上下文Token使用率,回复底部显示百分比和进度条,超过阈值时提醒清理或开启新会话。

0· 155·0 current·1 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for rfdiosuao/context-monitor-helper.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Context Monitor Helper" (rfdiosuao/context-monitor-helper) from ClawHub.
Skill page: https://clawhub.ai/rfdiosuao/context-monitor-helper
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install context-monitor-helper

ClawHub CLI

Package manager switcher

npx clawhub@latest install context-monitor-helper
Security Scan
VirusTotalVirusTotal
Pending
View report →
OpenClawOpenClaw
Benign
high confidence
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).
Scan Findings in Context
[unicode-control-chars] unexpected: A regex-based pre-scan flagged unicode control characters in SKILL.md. The functionality of the skill does not require hidden control characters; such characters can be used to hide or obfuscate prompt injection text. The visible SKILL.md appears normal, but you should manually inspect the file (or view it in a hex/escaped form) to confirm there are no hidden instructions or invisible characters that could alter how prompts are interpreted.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

latestvk978p6z5esb2a51x3srf9xfqpn84avdr
155downloads
0stars
2versions
Updated 3w ago
v1.0.1
MIT-0

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 压缩上下文

⚙️ 配置选项

配置项默认值说明
warningThreshold70警告阈值(百分比)
criticalThreshold90严重警告阈值(百分比)
showProgressBartrue是否显示进度条
showTokenCounttrue是否显示具体 Token 数

🔧 命令

命令说明
/new开启全新会话(清空上下文)
/compact压缩上下文(保留核心信息)
/context手动查看当前上下文状态

📝 注意事项

  1. Token 计算:基于实际消息内容估算,可能存在±5% 误差
  2. 模型差异:不同模型上下文窗口不同,自动识别
  3. 性能影响:每次回复增加约 10-20ms 处理时间
  4. 隐私安全:不存储任何对话内容,仅实时计算

🐛 常见问题

Q: 为什么显示的 Token 数和平台统计不一致? A: 本 Skill 使用估算算法,实际 Token 数以平台为准。误差通常在±5% 内。

Q: 可以关闭上下文显示吗? A: 可以,使用 /context off 临时关闭,/context on 重新开启。

Q: 支持哪些模型? A: 支持所有 OpenClaw 集成的模型,自动识别上下文窗口大小。

📄 许可证

MIT License

🔗 相关链接

Comments

Loading comments...