leoyeai/openclaw-master-skills/tide-watch
Claude Code and agent skill by leoyeai/openclaw-master-skills
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Proactive session capacity monitoring and management for OpenClaw. Prevents context window lockups by warning at configurable thresholds (75%, 85%, 90%, 95%), automatically backing up sessions before resets, and managing session resumption prompts. Use when working on long-running projects, managing multiple conversation channels (Discord, Telegram, webchat), or preventing lost work from full context windows. Includes CLI tools for capacity checks, cross-session dashboards, archive management, and session resumption. Supports any model or provider.
Install
npx vskill@latest install leoyeai/openclaw-master-skills/tide-watchSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as leoyeai/openclaw-master-skills/tide-watch.
Tide Watch π
Proactive session capacity monitoring for OpenClaw.
β οΈ Security & Architecture Notice
Tide Watch is a HYBRID SKILL with two operational modes:
Mode 1: Directives-Only (Recommended for Most Users)
Description: AGENTS.md and HEARTBEAT.md directives only Code Execution: NONE - Uses OpenClaw's built-in tools only (no CLI installation) File Access: Reads OpenClaw session files via agent's built-in tools Installation: Copy template directives to workspace config files Security: Lowest risk - no code installation or execution required
What it does:
- β
Monitors session capacity via
session_statustool - β Warns at thresholds (75%, 85%, 90%, 95%)
- β Auto-loads resumption prompts on session reset
- β All operations through OpenClaw's native tools
Mode 2: CLI Tools (Optional)
Description: Node.js command-line tools for manual management Code Execution: YES - Executable JavaScript code File Access: Direct read/write to ~/.openclaw/agents/main/sessions/ Installation: git clone + npm link (requires Node.js) Security: Moderate risk - requires code inspection before install
What it does:
- CLI commands:
tide-watch status,tide-watch dashboard, etc. - Manual capacity checks
- Session archive management
- Resumption prompt editing (β οΈ see CVE-2026-001 below)
Mode Comparison
| Feature | Directives-Only | CLI Tools | |
|---|---|---|---|
| Node.js required? | β No | β Yes (14+) | |
| Installation | Copy templates | npm link | |
| Code execution | β None | β JavaScript | |
| File access | Via built-in tools | Direct filesystem | |
| Security risk | Lowest | Moderate | |
| Use case | Passive monitoring | Active management |
Choose Directives-Only if: You only need capacity warnings and resumption prompts. Choose CLI Tools if: You need manual session management, archiving, or dashboard views.
π¨ CRITICAL SECURITY NOTICE: CVE-2026-001
Vulnerability: Shell injection in editResumePrompt function Affected Version: v1.0.0 ONLY Current Version: v1.0.1 (PATCHED) Severity: HIGH (CVSS 7.8) Status: β
FIXED
Summary: v1.0.0 contained a shell injection vulnerability in the CLI's resume-prompt edit command. An attacker who could control the --session parameter could execute arbitrary commands. This has been fixed in v1.0.1 by replacing execSync with spawnSync.
If you installed v1.0.0: Update immediately to v1.0.1.
Full disclosure: See SECURITY-ADVISORY-CVE-2026-001.md
Security Best Practices
For Directives-Only Mode (Safest):
- β Copy AGENTS.md.template and HEARTBEAT.md.template to workspace
- β No code installation required
- β No npm dependencies
- β Lowest security surface
For CLI Tools Mode (If Needed):
- β οΈ Verify version 1.0.1 or later (
tide-watch --version) - β οΈ Inspect code before installing:
- Review
lib/capacity.jsandlib/resumption.js - Check
package.jsonfor install hooks (should have none) - Run
npm testto verify behavior (113 tests)
- β οΈ Only use UUID session IDs with
--sessionflag - β οΈ Avoid untrusted input to CLI commands
- β οΈ Review backups location (
~/.openclaw/agents/main/sessions/archive/)
Operation Types:
Read-Only Operations (β Safe, no modifications):
tide-watch status- Check current session counttide-watch check --session <id>- View specific session capacitytide-watch check --current- Auto-detect and check current session (v1.3.4+)tide-watch dashboard- Visual capacity overviewtide-watch dashboard --watch- Live updating dashboardtide-watch dashboard --raw-size- Show full precision token counts (v1.3.2+)tide-watch report- List sessions above thresholdtide-watch resume-prompt show --session <id>- View resumption prompt
Modifying Operations (β οΈ Moves/creates files):
tide-watch archive --older-than <time>- Moves sessions to archive/ (time-based)tide-watch archive --session <id>- Archive specific session (v1.3.3+)tide-watch archive --session <id1> --session <id2>- Archive multiple sessions (v1.3.3+)tide-watch resume-prompt edit --session <id>- Opens editor (CVE patched in v1.0.1)tide-watch resume-prompt delete --session <id>- Deletes resumption prompt file
New Flags (v1.3.2+):
--raw-size- Show full precision token counts (e.g.,18,713/128,000instead of18.7k/128k)--current- Auto-detect current session viaOPENCLAW_SESSION_IDenvironment variable (v1.3.4+)--session(enhanced) - Supports partial IDs, multiple sessions for archive, labels/channels (v1.3.3+)
File System Access:
- Reads:
~/.openclaw/agents/main/sessions/*.jsonl(session data) - Writes:
~/.openclaw/agents/main/sessions/resume-prompts/*.md(resumption prompts) - Moves:
~/.openclaw/agents/main/sessions/archive/(archived sessions)
Network Activity: NONE - All operations are local filesystem only.
CLI Reference
Complete flag and option documentation:
Display Options:
--raw-size- Show full precision token counts with commas (v1.3.2+)- Default: Human-readable (e.g.,
18.7k/128k,20.6k/1M) - With flag: Full precision (e.g.,
18,713/128,000,20,631/1,000,000) - Use case: When exact token counts needed
- Example:
tide-watch dashboard --raw-size
--json- Output as JSON instead of formatted table- Example:
tide-watch check --session abc123 --json - Useful for scripting and parsing
--pretty- Pretty-print JSON output (requires--json)- Example:
tide-watch report --json --pretty
Session Selection:
--session <key>- Target specific session (enhanced in v1.3.3+)- Full UUID:
--session 17290631-42fe-40c0-bd23-c5da511c6f7b - Partial UUID:
--session 17290631-4(v1.3.3+) - Label:
--session "#navi-code-yatta"(v1.3.3+) - Channel:
--session discord(v1.3.3+) - Channel + label:
--session "discord/#navi-code"(v1.3.3+) - Multiple (archive only):
--session abc123 --session def456(v1.3.3+)
--current- Auto-detect current session (v1.3.4+)- Requires:
OPENCLAW_SESSION_IDenvironment variable - Example:
tide-watch check --current - Use case: Heartbeat monitoring (check THIS session)
- Fallback: Graceful error with helpful message if env var not set
Filtering:
--all- Show all sessions regardless of capacity--threshold <num>- Filter sessions above percentage (default: 75)--active <hours>- Only show sessions active within N hours--agent <id>- Filter to specific agent (multi-agent setups)--exclude-agent <id>- Exclude specific agent (can use multiple times)
Archive Options:
--older-than <time>- Archive sessions older than time- Examples:
4d,2w,1mo,3months - Mutually exclusive with
--session
--dry-run- Preview archive without making changes- Example:
tide-watch archive --older-than 7d --dry-run
--exclude-channel <name>- Exclude channel from archiving- Example:
tide-watch archive --older-than 30d --exclude-channel discord
--min-capacity <num>- Only archive sessions below capacity threshold- Example:
tide-watch archive --older-than 7d --min-capacity 50
Live Monitoring:
--watch- Live updating dashboard (refreshes every 10s)- Example:
tide-watch dashboard --watch - Press Ctrl+C to exit
Multi-Agent:
--all-agents- Multi-agent discovery mode (default, auto-discovers agents)--single-agent-only- Single-agent mode (main agent only)
Configuration Override:
--refresh-interval <seconds>- Dashboard refresh interval (1-300)--gateway-interval <seconds>- Gateway status check interval (5-600)--gateway-timeout <seconds>- Gateway command timeout (1-30)--session-dir <path>- Custom session directory
Usage Examples:
Runtime Requirements
Mode 1 (Directives-Only):
- Node.js: Not required
- npm: Not required
- Dependencies: None
- Binary: None
- Installation: Copy templates to workspace config files
Mode 2 (CLI Tools - Optional):
- Node.js: v14.0.0 or later required
- npm: Any recent version
- Dependencies:
- Development:
jest@^30.2.0(for testing only) - Runtime: None (zero production dependencies)
- Binary:
tide-watch(installed globally via npm link) - Installation:
git clone+npm link
Why zero runtime dependencies?
- Uses only Node.js built-in modules (
fs,path,child_process) - No external API clients
- No network libraries
- Minimal attack surface
Recommendation
Most users should use Directives-Only Mode. This provides automatic capacity monitoring without installing any code. Only install CLI tools if you specifically need manual capacity management features.
What It Does
Monitors your OpenClaw session context windows and warns you before they overflow:
- π‘ 75% β Heads up, consider wrapping up soon
- π 85% β Recommend finishing current task and resetting
- π΄ 90% β Session will lock soon, ready to reset
- π¨ 95% β Critical! Save to memory NOW
Installation
Step 1: Add Monitoring Directive to AGENTS.md
Copy the directive template from AGENTS.md.template and add it to your workspace AGENTS.md file:
Or manually add the monitoring section from the template.
This tells me (your agent) what to look for and when to warn you.
Step 2: Add Heartbeat Task to HEARTBEAT.md
Copy the heartbeat template from HEARTBEAT.md.template and add it to your workspace HEARTBEAT.md file:
Or manually add the Tide Watch heartbeat section from the template.
This tells me to check capacity automatically on a schedule.
Step 3: Configure Settings (Optional)
Default settings work for most users, but you can customize in your AGENTS.md:
Warning thresholds (when to warn):
- Adjust percentages (default: 75/85/90/95)
- Range: 50-99%, ascending order, 2-6 thresholds
Check frequency (how often to monitor):
- Adjust interval (default: Every 1 hour)
- Options: 15min, 30min, 1hr, 2hr, or 'manual'
- Range: 5 minutes to 6 hours
Auto-backup:
- Enable/disable automatic backups (default: enabled)
- Set which thresholds trigger backups (default: [90, 95])
- Configure retention (default: 7 days)
- Enable compression to save disk space (default: off)
Channel-specific overrides (advanced):
- Different settings per channel (Discord vs. webchat vs. DM)
Usage
Once installed, I will:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/tide-watch/SKILL.md
Popularity
- Repository stars
- 2,157
- Repository forks
- 324
- 7-day trend score
- 43
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/leoyeai/openclaw-master-skills/tide-watch)