← 返回 Skills 市场
yangdaowan

Session Monitor

作者 DaYu · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
579
总下载
0
收藏
5
当前安装
1
版本数
在 OpenClaw 中安装
/install session-monitor
功能描述
自动监控和显示会话状态信息,包括token消耗、模型信息和功能状态。支持开关控制和自定义显示格式。
使用说明 (SKILL.md)

Session Monitor - 会话状态监控

功能概述

自动在每次对话回复中添加简洁的会话状态信息,包括:

  • 当前使用的模型
  • 输入/输出 token 消耗
  • 上下文使用率
  • 功能开关状态(Reasoning/Elevated等)

显示格式

默认格式:[🧠 qwen3-max | 📥123k/📤420 | Context: 47%]

可配置格式选项:

  • compact: 紧凑模式 [qwen3-max|123k/420|47%]
  • detailed: 详细模式(包含功能状态)
  • hidden: 隐藏模式(仅通过命令查看)

控制命令

开关控制

/token on      # 启用状态显示
/token off     # 禁用状态显示  
/token toggle  # 切换显示状态

格式控制

/token format compact    # 设置紧凑格式
/token format detailed   # 设置详细格式  
/token format default    # 恢复默认格式

手动查看

/status        # 查看详细状态信息
/token         # 查看当前token统计

配置

通过环境变量控制默认行为:

  • SESSION_MONITOR_ENABLED=true|false (默认: true)
  • SESSION_MONITOR_FORMAT=default|compact|detailed|hidden (默认: default)

集成

此技能与 OpenClaw 的 hooks 系统集成,在每次响应后自动注入状态信息。 支持与其他监控技能协同工作,如 task-persistence 和 gateway-monitor。

使用示例

启用后,每条消息底部会自动显示:

这是正常的回复内容...

[🧠 qwen3-max | 📥123k/📤420 | Context: 47%]
安全使用建议
This skill appears to implement the advertised session/status display and is low-risk in terms of network access or secret exfiltration, but there are documentation vs. code mismatches you should resolve before installing: 1) SKILL.md mentions /token slash commands and SESSION_MONITOR_* environment variables that the bundled Python does not implement — ask the author which interface the platform should use (CLI flags vs. slash commands vs. hook registration). 2) The code reads/writes a config file under OPENCLAW_WORKSPACE (default /home/admin/.openclaw/workspace) — confirm that path is appropriate for your environment to avoid accidental file writes/overwrites. 3) If you want automatic injection via the platform hooks, verify the integration code or adapter will call inject_status(session_data) — the packaged scripts do not register hooks themselves. If you are uncertain, test the skill in a controlled environment (or inspect/run the scripts manually) before enabling it broadly.
功能分析
Type: OpenClaw Skill Name: session-monitor Version: 1.0.0 The OpenClaw AgentSkills bundle 'session-monitor' is benign. Its code and documentation align with its stated purpose of monitoring and displaying session status information (model, token usage, context). It stores its configuration in `session_monitor_config.json` within the designated OpenClaw workspace, which is standard practice for skill persistence. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts in SKILL.md designed to subvert the agent's behavior beyond controlling the skill itself.
能力评估
Purpose & Capability
The skill's name and description match the bundled Python scripts: the code reads session data and formats/injects status info. Requiring python3 is proportional. However the SKILL.md advertises environment variables (SESSION_MONITOR_ENABLED, SESSION_MONITOR_FORMAT) and hook-based automatic injection; the implementation instead reads/writes a JSON config file in OPENCLAW_WORKSPACE and does not reference those SESSION_MONITOR_* env vars or explicit hook APIs. This mismatch is likely a documentation/API mismatch rather than malicious, but it's unexplained.
Instruction Scope
SKILL.md describes slash commands (/token, /status) and automatic injection via OpenClaw hooks. The provided CLI implements different flags (--toggle, --status, --inject) and the Python code only exposes file-based config and an inject_status(response, session_data) method — it does not itself register hooks or implement slash-command handlers. The instructions therefore overstate automatic integration; they also mention environment variables that the code does not read. That gives the agent or integrator extra work and could cause unexpected behavior if the platform expects direct hook registration.
Install Mechanism
No install spec is included (instruction-only), and the code is pure Python with no external network calls or downloads. Requiring python3 is reasonable. Because there is no external install URL or package fetch, install risk is low.
Credentials
The skill does not request secrets or other environment credentials. The only environment variable actually used in code is OPENCLAW_WORKSPACE (to locate session_monitor_config.json). SKILL.md lists SESSION_MONITOR_* env vars that are not implemented; this mismatch should be clarified. The default workspace path (/home/admin/.openclaw/workspace) may be surprising and will cause the skill to read/write files there.
Persistence & Privilege
always is false and the skill only writes a config file into the declared workspace path. It does not modify other skills' configs or system-wide settings. Autonomous invocation is allowed by platform defaults but is not, by itself, a problem here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install session-monitor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /session-monitor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Auto-display token usage and session status with toggle control
元数据
Slug session-monitor
版本 1.0.0
许可证
累计安装 6
当前安装数 5
历史版本数 1
常见问题

Session Monitor 是什么?

自动监控和显示会话状态信息,包括token消耗、模型信息和功能状态。支持开关控制和自定义显示格式。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 579 次。

如何安装 Session Monitor?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install session-monitor」即可一键安装,无需额外配置。

Session Monitor 是免费的吗?

是的,Session Monitor 完全免费(开源免费),可自由下载、安装和使用。

Session Monitor 支持哪些平台?

Session Monitor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Session Monitor?

由 DaYu(@yangdaowan)开发并维护,当前版本 v1.0.0。

💬 留言讨论