← Back to Skills Marketplace
yangdaowan

Session Monitor

by DaYu · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
579
Downloads
0
Stars
5
Active Installs
1
Versions
Install in OpenClaw
/install session-monitor
Description
自动监控和显示会话状态信息,包括token消耗、模型信息和功能状态。支持开关控制和自定义显示格式。
README (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%]
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install session-monitor
  3. After installation, invoke the skill by name or use /session-monitor
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Auto-display token usage and session status with toggle control
Metadata
Slug session-monitor
Version 1.0.0
License
All-time Installs 6
Active Installs 5
Total Versions 1
Frequently Asked Questions

What is Session Monitor?

自动监控和显示会话状态信息,包括token消耗、模型信息和功能状态。支持开关控制和自定义显示格式。 It is an AI Agent Skill for Claude Code / OpenClaw, with 579 downloads so far.

How do I install Session Monitor?

Run "/install session-monitor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Session Monitor free?

Yes, Session Monitor is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Session Monitor support?

Session Monitor is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Session Monitor?

It is built and maintained by DaYu (@yangdaowan); the current version is v1.0.0.

💬 Comments