Monitors session context usage and saves checkpoints when approaching limits to prevent data loss before compaction or long tasks.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install session-watchdog或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install session-watchdog⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/session-watchdog/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: session-watchdog description: Monitor session context levels and proactively save checkpoints before compaction. Use when: (1) session context exceeds 80% capacity, (2) user asks about session status or memory, (3) at the start of each new session to check context, or (4) before long tasks that might push context over threshold. ---
Monitors context levels, warns before compaction, and saves checkpoints to preserve important information.
| Level | Tokens | Action | |-------|--------|--------| | Safe | 0-140k | Normal operation | | Warning | 140k-160k | Warn user, save checkpoint | | Critical | 160k-197k | Warn + stop unless urgent | | Full | 197k+ | Compaction imminent |
Before each session and periodically during long conversations:
session_status
Check the contextTokens field from the response.
When approaching 80% (160k tokens):
- Read current memory/YYYY-MM-DD.md - Add key context: decisions, pending tasks, important details - Write back to memory file
Say: "⚠️ Approaching context limit (~160k tokens). Saving checkpoint to memory before continuing."
- Continue and accept compaction? - Summarize and restart fresh? - Pause until ready?
Essential information that must survive compaction:
# YYYY-MM-DD
## Session Checkpoint (at X% context)
### Decisions
- Decision 1
- Decision 2
### Pending
- [ ] Task 1
- [ ] Task 2
### Important Context
- Project state: ...
- Last file modified: ...
### Unresolved
- Issue needing follow-up安装 Session Watchdog 后,可以对 AI 说这些话来触发它
Help me get started with Session Watchdog
Explains what Session Watchdog does, walks through the setup, and runs a quick demo based on your current project
Use Session Watchdog to monitors session context usage and saves checkpoints when approachi...
Invokes Session Watchdog with the right parameters and returns the result directly in the conversation
What can I do with Session Watchdog in my finance & investment workflow?
Lists the top use cases for Session Watchdog, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/session-watchdog/ 目录(个人级,所有项目可用),或 .claude/skills/session-watchdog/(项目级)。重启 AI 客户端后,用 /session-watchdog 主动调用,或让 AI 根据上下文自动发现并使用。
Session Watchdog 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Session Watchdog 可免费安装使用。请查阅仓库了解许可证信息。
Monitors session context usage and saves checkpoints when approaching limits to prevent data loss before compaction or long tasks.
Session Watchdog 属于「Finance & Investment」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my finance & investment tasks using Session Watchdog
Identifies repetitive steps in your workflow and sets up Session Watchdog to handle them automatically