{
  "schemaVersion": "1.0",
  "item": {
    "slug": "tide-watch",
    "name": "Tide Watch",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/chrisagiddings/tide-watch",
    "canonicalUrl": "https://clawhub.ai/chrisagiddings/tide-watch",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/tide-watch",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=tide-watch",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CHANGELOG.md",
      "CLAWHUB-SCANNER-RESPONSE.md",
      "INSTALLATION.md",
      "PARSING.md",
      "README.md",
      "RESEARCH-ANYBINS-PATTERN.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/tide-watch"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/tide-watch",
    "agentPageUrl": "https://openagent3.xyz/skills/tide-watch/agent",
    "manifestUrl": "https://openagent3.xyz/skills/tide-watch/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/tide-watch/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Tide Watch 🌊",
        "body": "Proactive session capacity monitoring for OpenClaw."
      },
      {
        "title": "⚠️ Security & Architecture Notice",
        "body": "Tide Watch is a HYBRID SKILL with two operational modes:"
      },
      {
        "title": "Mode 1: Directives-Only (Recommended for Most Users)",
        "body": "Description: AGENTS.md and HEARTBEAT.md directives only\nCode Execution: NONE - Uses OpenClaw's built-in tools only (no CLI installation)\nFile Access: Reads OpenClaw session files via agent's built-in tools\nInstallation: Copy template directives to workspace config files\nSecurity: Lowest risk - no code installation or execution required\n\nWhat it does:\n\n✅ Monitors session capacity via session_status tool\n✅ Warns at thresholds (75%, 85%, 90%, 95%)\n✅ Auto-loads resumption prompts on session reset\n✅ All operations through OpenClaw's native tools"
      },
      {
        "title": "Mode 2: CLI Tools (Optional)",
        "body": "Description: Node.js command-line tools for manual management\nCode Execution: YES - Executable JavaScript code\nFile Access: Direct read/write to ~/.openclaw/agents/main/sessions/\nInstallation: git clone + npm link (requires Node.js)\nSecurity: Moderate risk - requires code inspection before install\n\nWhat it does:\n\nCLI commands: tide-watch status, tide-watch dashboard, etc.\nManual capacity checks\nSession archive management\nResumption prompt editing (⚠️ see CVE-2026-001 below)"
      },
      {
        "title": "Mode Comparison",
        "body": "FeatureDirectives-OnlyCLI ToolsNode.js required?❌ No✅ Yes (14+)InstallationCopy templatesnpm linkCode execution❌ None✅ JavaScriptFile accessVia built-in toolsDirect filesystemSecurity riskLowestModerateUse casePassive monitoringActive management\n\nChoose Directives-Only if: You only need capacity warnings and resumption prompts.\nChoose CLI Tools if: You need manual session management, archiving, or dashboard views."
      },
      {
        "title": "🚨 CRITICAL SECURITY NOTICE: CVE-2026-001",
        "body": "Vulnerability: Shell injection in editResumePrompt function\nAffected Version: v1.0.0 ONLY\nCurrent Version: v1.0.1 (PATCHED)\nSeverity: HIGH (CVSS 7.8)\nStatus: ✅ FIXED\n\nSummary: 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.\n\nIf you installed v1.0.0: Update immediately to v1.0.1.\n\nFull disclosure: See SECURITY-ADVISORY-CVE-2026-001.md"
      },
      {
        "title": "Security Best Practices",
        "body": "For Directives-Only Mode (Safest):\n\n✅ Copy AGENTS.md.template and HEARTBEAT.md.template to workspace\n✅ No code installation required\n✅ No npm dependencies\n✅ Lowest security surface\n\nFor CLI Tools Mode (If Needed):\n\n⚠️ Verify version 1.0.1 or later (tide-watch --version)\n⚠️ Inspect code before installing:\n\nReview lib/capacity.js and lib/resumption.js\nCheck package.json for install hooks (should have none)\nRun npm test to verify behavior (113 tests)\n\n\n⚠️ Only use UUID session IDs with --session flag\n⚠️ Avoid untrusted input to CLI commands\n⚠️ Review backups location (~/.openclaw/agents/main/sessions/archive/)\n\nOperation Types:\n\nRead-Only Operations (✅ Safe, no modifications):\n\ntide-watch status - Check current session count\ntide-watch check --session <id> - View specific session capacity\ntide-watch check --current - Auto-detect and check current session (v1.3.4+)\ntide-watch dashboard - Visual capacity overview\ntide-watch dashboard --watch - Live updating dashboard\ntide-watch dashboard --raw-size - Show full precision token counts (v1.3.2+)\ntide-watch report - List sessions above threshold\ntide-watch resume-prompt show --session <id> - View resumption prompt\n\nModifying Operations (⚠️ Moves/creates files):\n\ntide-watch archive --older-than <time> - Moves sessions to archive/ (time-based)\ntide-watch archive --session <id> - Archive specific session (v1.3.3+)\ntide-watch archive --session <id1> --session <id2> - Archive multiple sessions (v1.3.3+)\ntide-watch resume-prompt edit --session <id> - Opens editor (CVE patched in v1.0.1)\ntide-watch resume-prompt delete --session <id> - Deletes resumption prompt file\n\nNew Flags (v1.3.2+):\n\n--raw-size - Show full precision token counts (e.g., 18,713/128,000 instead of 18.7k/128k)\n--current - Auto-detect current session via OPENCLAW_SESSION_ID environment variable (v1.3.4+)\n--session (enhanced) - Supports partial IDs, multiple sessions for archive, labels/channels (v1.3.3+)\n\nFile System Access:\n\nReads: ~/.openclaw/agents/main/sessions/*.jsonl (session data)\nWrites: ~/.openclaw/agents/main/sessions/resume-prompts/*.md (resumption prompts)\nMoves: ~/.openclaw/agents/main/sessions/archive/ (archived sessions)\n\nNetwork Activity: NONE - All operations are local filesystem only."
      },
      {
        "title": "CLI Reference",
        "body": "Complete flag and option documentation:\n\nDisplay Options:\n\n--raw-size - Show full precision token counts with commas (v1.3.2+)\n\nDefault: Human-readable (e.g., 18.7k/128k, 20.6k/1M)\nWith flag: Full precision (e.g., 18,713/128,000, 20,631/1,000,000)\nUse case: When exact token counts needed\nExample: tide-watch dashboard --raw-size\n\n\n\n--json - Output as JSON instead of formatted table\n\nExample: tide-watch check --session abc123 --json\nUseful for scripting and parsing\n\n\n\n--pretty - Pretty-print JSON output (requires --json)\n\nExample: tide-watch report --json --pretty\n\nSession Selection:\n\n--session <key> - Target specific session (enhanced in v1.3.3+)\n\nFull UUID: --session 17290631-42fe-40c0-bd23-c5da511c6f7b\nPartial UUID: --session 17290631-4 (v1.3.3+)\nLabel: --session \"#navi-code-yatta\" (v1.3.3+)\nChannel: --session discord (v1.3.3+)\nChannel + label: --session \"discord/#navi-code\" (v1.3.3+)\nMultiple (archive only): --session abc123 --session def456 (v1.3.3+)\n\n\n\n--current - Auto-detect current session (v1.3.4+)\n\nRequires: OPENCLAW_SESSION_ID environment variable\nExample: tide-watch check --current\nUse case: Heartbeat monitoring (check THIS session)\nFallback: Graceful error with helpful message if env var not set\n\nFiltering:\n\n--all - Show all sessions regardless of capacity\n--threshold <num> - Filter sessions above percentage (default: 75)\n--active <hours> - Only show sessions active within N hours\n--agent <id> - Filter to specific agent (multi-agent setups)\n--exclude-agent <id> - Exclude specific agent (can use multiple times)\n\nArchive Options:\n\n--older-than <time> - Archive sessions older than time\n\nExamples: 4d, 2w, 1mo, 3months\nMutually exclusive with --session\n\n\n\n--dry-run - Preview archive without making changes\n\nExample: tide-watch archive --older-than 7d --dry-run\n\n\n\n--exclude-channel <name> - Exclude channel from archiving\n\nExample: tide-watch archive --older-than 30d --exclude-channel discord\n\n\n\n--min-capacity <num> - Only archive sessions below capacity threshold\n\nExample: tide-watch archive --older-than 7d --min-capacity 50\n\nLive Monitoring:\n\n--watch - Live updating dashboard (refreshes every 10s)\n\nExample: tide-watch dashboard --watch\nPress Ctrl+C to exit\n\nMulti-Agent:\n\n--all-agents - Multi-agent discovery mode (default, auto-discovers agents)\n--single-agent-only - Single-agent mode (main agent only)\n\nConfiguration Override:\n\n--refresh-interval <seconds> - Dashboard refresh interval (1-300)\n--gateway-interval <seconds> - Gateway status check interval (5-600)\n--gateway-timeout <seconds> - Gateway command timeout (1-30)\n--session-dir <path> - Custom session directory\n\nUsage Examples:\n\n# Human-readable vs full precision\ntide-watch dashboard                    # 18.7k/128k (easy to scan)\ntide-watch dashboard --raw-size         # 18,713/128,000 (exact)\n\n# Auto-detect current session (v1.3.4+)\nexport OPENCLAW_SESSION_ID=\"17290631-4\"\ntide-watch check --current              # Check THIS session\ntide-watch check --current --json       # JSON for heartbeat scripts\n\n# Session-specific archiving (v1.3.3+)\ntide-watch archive --session abc123 --dry-run    # Preview\ntide-watch archive --session abc123              # Archive one\ntide-watch archive --session a --session b       # Archive multiple\n\n# Partial ID matching (v1.3.3+)\ntide-watch check --session 17290631-4   # Matches 17290631-42fe-40c0-...\n\n# Multi-agent filtering\ntide-watch dashboard --agent kintaro    # Kintaro sessions only\ntide-watch report --exclude-agent main  # All except main"
      },
      {
        "title": "Runtime Requirements",
        "body": "Mode 1 (Directives-Only):\n\nNode.js: Not required\nnpm: Not required\nDependencies: None\nBinary: None\nInstallation: Copy templates to workspace config files\n\nMode 2 (CLI Tools - Optional):\n\nNode.js: v14.0.0 or later required\nnpm: Any recent version\nDependencies:\n\nDevelopment: jest@^30.2.0 (for testing only)\nRuntime: None (zero production dependencies)\n\n\nBinary: tide-watch (installed globally via npm link)\nInstallation: git clone + npm link\n\nWhy zero runtime dependencies?\n\nUses only Node.js built-in modules (fs, path, child_process)\nNo external API clients\nNo network libraries\nMinimal attack surface"
      },
      {
        "title": "Recommendation",
        "body": "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."
      },
      {
        "title": "What It Does",
        "body": "Monitors your OpenClaw session context windows and warns you before they overflow:\n\n🟡 75% — Heads up, consider wrapping up soon\n🟠 85% — Recommend finishing current task and resetting\n🔴 90% — Session will lock soon, ready to reset\n🚨 95% — Critical! Save to memory NOW"
      },
      {
        "title": "Step 1: Add Monitoring Directive to AGENTS.md",
        "body": "Copy the directive template from AGENTS.md.template and add it to your workspace AGENTS.md file:\n\n# From your workspace root (~/clawd or similar)\ncat skills/tide-watch/AGENTS.md.template >> AGENTS.md\n\nOr manually add the monitoring section from the template.\n\nThis tells me (your agent) what to look for and when to warn you."
      },
      {
        "title": "Step 2: Add Heartbeat Task to HEARTBEAT.md",
        "body": "Copy the heartbeat template from HEARTBEAT.md.template and add it to your workspace HEARTBEAT.md file:\n\n# From your workspace root (~/clawd or similar)\ncat skills/tide-watch/HEARTBEAT.md.template >> HEARTBEAT.md\n\nOr manually add the Tide Watch heartbeat section from the template.\n\nThis tells me to check capacity automatically on a schedule."
      },
      {
        "title": "Step 3: Configure Settings (Optional)",
        "body": "Default settings work for most users, but you can customize in your AGENTS.md:\n\nWarning thresholds (when to warn):\n\nAdjust percentages (default: 75/85/90/95)\nRange: 50-99%, ascending order, 2-6 thresholds\n\nCheck frequency (how often to monitor):\n\nAdjust interval (default: Every 1 hour)\nOptions: 15min, 30min, 1hr, 2hr, or 'manual'\nRange: 5 minutes to 6 hours\n\nAuto-backup:\n\nEnable/disable automatic backups (default: enabled)\nSet which thresholds trigger backups (default: [90, 95])\nConfigure retention (default: 7 days)\nEnable compression to save disk space (default: off)\n\nChannel-specific overrides (advanced):\n\nDifferent settings per channel (Discord vs. webchat vs. DM)"
      },
      {
        "title": "Usage",
        "body": "Once installed, I will:\n\nCheck capacity hourly during active conversations\nWarn at thresholds (75%, 85%, 90%, 95%)\nSuggest actions:\n\nSave important context to memory\nSwitch to lower-usage channels\nProvide session reset commands\nGenerate session resumption prompts"
      },
      {
        "title": "Manual Check",
        "body": "Ask me to check session status anytime:\n\nWhat's my current session capacity?\nCheck context usage\nRun session_status"
      },
      {
        "title": "Reset Session with Context Preservation",
        "body": "When warned about high capacity:\n\nHelp me reset this session and preserve context\n\nI'll:\n\nSave current work to memory\nBackup the session file (if not already backed up)\nProvide a session resumption prompt\nReset the session"
      },
      {
        "title": "Load Session from Backup",
        "body": "If you need to load a previous session state from backup:\n\nShow me available backups for this session\nLoad session from 90% backup\n\nI'll:\n\nList available backups with timestamps and sizes\nLoad the selected backup\nGuide you through reconnecting to load the session\n\nBackup locations:\n\nPath: ~/.openclaw/agents/main/sessions/backups/\nFormat: <session-id>-<threshold>-<timestamp>.jsonl[.gz]\nRetention: Configurable (default: 7 days)"
      },
      {
        "title": "Automatic Monitoring (Heartbeat)",
        "body": "When you add Tide Watch to your HEARTBEAT.md, I automatically:\n\nParse your configuration (from AGENTS.md)\n\nCheck frequency: How often to monitor\nWarning thresholds: When to warn you\nBackup settings: When to backup, retention, compression\nSee PARSING.md for detailed parsing logic\n\n\n\nCheck capacity on schedule (default: every hour)\n\nRun session_status to get token usage\nCalculate percentage: (tokens_used / tokens_max) * 100\n\n\n\nCompare against your thresholds\n\nUse your configured thresholds (not hardcoded defaults)\nDetermine which threshold(s) have been crossed\nAssign severity dynamically based on position (first=🟡, last=🚨)\n\n\n\nWarn you (once per threshold)\n\nIssue warning message for new threshold crossings\nTrack which thresholds already warned this session\nDon't repeat warnings if capacity stays at same level\n\n\n\nAuto-backup (if enabled and triggered)\n\nCheck if capacity crossed any backup trigger thresholds\nCreate backup: ~/.openclaw/agents/main/sessions/backups/<session-id>-<threshold>-<timestamp>.jsonl\nVerify backup integrity\nLog backup completion\nTrack which thresholds backed up (don't duplicate)\n\n\n\nSuggest actions\n\nSave context to memory\nSwitch to lower-usage channel\nProvide session reset commands\nGenerate session resumption prompts\n\n\n\nCleanup old backups\n\nRemove backups older than retention period (default: 7 days)\n\n\n\nReturn to silent mode\n\nIf capacity is below all thresholds, return HEARTBEAT_OK\nNo output, no interruption"
      },
      {
        "title": "Manual Checks",
        "body": "You can also ask me to check anytime:\n\nWhat's my current session capacity?\nCheck context usage\nRun session_status"
      },
      {
        "title": "Key Features",
        "body": "Model-agnostic: Works with any provider (Anthropic, OpenAI, DeepSeek, etc.)\nNon-intrusive: Silent checks, only speaks up at thresholds\nConfigurable: Adjust thresholds, frequency, and actions to your workflow\nStateful: Tracks which thresholds warned, resets tracking when session resets"
      },
      {
        "title": "Why You Need This",
        "body": "Problem: Context windows fill up silently. Once at 100%, sessions lock and stop responding. You lose work mid-task.\n\nSolution: Proactive monitoring catches capacity issues early, giving you time to save work, switch channels, or reset cleanly.\n\nReal incident: Discord #navi-code-yatta hit 97% capacity and locked mid-task (2026-02-23). Had to manually reset, losing conversation context."
      },
      {
        "title": "Conservative (early warnings)",
        "body": "Warning thresholds: 60%, 70%, 80%, 90%\nCheck frequency: Every 30 minutes"
      },
      {
        "title": "Aggressive (maximize usage)",
        "body": "Warning thresholds: 85%, 92%, 96%, 98%\nCheck frequency: Every 2 hours"
      },
      {
        "title": "Channel-specific",
        "body": "Discord channels: 75%, 85%, 90%, 95% (default)\nWebchat: 85%, 95% (lighter warnings)\nDM: 90%, 95% (minimal warnings)"
      },
      {
        "title": "Future Features",
        "body": "CLI tool for capacity reports\n Automatic session backups at thresholds\n Historical capacity tracking\n Cross-session capacity reports\n Integration with heartbeat monitoring\n Email/notification warnings\n Smart session rotation suggestions"
      },
      {
        "title": "Requirements",
        "body": "OpenClaw with session_status tool support\nWorkspace with AGENTS.md file\nActive monitoring directive in agent instructions"
      },
      {
        "title": "Support",
        "body": "Repo: https://github.com/chrisagiddings/openclaw-tide-watch\nIssues: https://github.com/chrisagiddings/openclaw-tide-watch/issues\nClawHub: https://clawhub.ai/chrisagiddings/tide-watch"
      },
      {
        "title": "License",
        "body": "MIT"
      }
    ],
    "body": "Tide Watch 🌊\n\nProactive session capacity monitoring for OpenClaw.\n\n⚠️ Security & Architecture Notice\n\nTide Watch is a HYBRID SKILL with two operational modes:\n\nMode 1: Directives-Only (Recommended for Most Users)\n\nDescription: AGENTS.md and HEARTBEAT.md directives only\nCode Execution: NONE - Uses OpenClaw's built-in tools only (no CLI installation)\nFile Access: Reads OpenClaw session files via agent's built-in tools\nInstallation: Copy template directives to workspace config files\nSecurity: Lowest risk - no code installation or execution required\n\nWhat it does:\n\n✅ Monitors session capacity via session_status tool\n✅ Warns at thresholds (75%, 85%, 90%, 95%)\n✅ Auto-loads resumption prompts on session reset\n✅ All operations through OpenClaw's native tools\nMode 2: CLI Tools (Optional)\n\nDescription: Node.js command-line tools for manual management\nCode Execution: YES - Executable JavaScript code\nFile Access: Direct read/write to ~/.openclaw/agents/main/sessions/\nInstallation: git clone + npm link (requires Node.js)\nSecurity: Moderate risk - requires code inspection before install\n\nWhat it does:\n\nCLI commands: tide-watch status, tide-watch dashboard, etc.\nManual capacity checks\nSession archive management\nResumption prompt editing (⚠️ see CVE-2026-001 below)\nMode Comparison\nFeature\tDirectives-Only\tCLI Tools\nNode.js required?\t❌ No\t✅ Yes (14+)\nInstallation\tCopy templates\tnpm link\nCode execution\t❌ None\t✅ JavaScript\nFile access\tVia built-in tools\tDirect filesystem\nSecurity risk\tLowest\tModerate\nUse case\tPassive monitoring\tActive management\n\nChoose Directives-Only if: You only need capacity warnings and resumption prompts.\nChoose CLI Tools if: You need manual session management, archiving, or dashboard views.\n\n🚨 CRITICAL SECURITY NOTICE: CVE-2026-001\n\nVulnerability: Shell injection in editResumePrompt function\nAffected Version: v1.0.0 ONLY\nCurrent Version: v1.0.1 (PATCHED)\nSeverity: HIGH (CVSS 7.8)\nStatus: ✅ FIXED\n\nSummary: 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.\n\nIf you installed v1.0.0: Update immediately to v1.0.1.\n\nFull disclosure: See SECURITY-ADVISORY-CVE-2026-001.md\n\nSecurity Best Practices\n\nFor Directives-Only Mode (Safest):\n\n✅ Copy AGENTS.md.template and HEARTBEAT.md.template to workspace\n✅ No code installation required\n✅ No npm dependencies\n✅ Lowest security surface\n\nFor CLI Tools Mode (If Needed):\n\n⚠️ Verify version 1.0.1 or later (tide-watch --version)\n⚠️ Inspect code before installing:\nReview lib/capacity.js and lib/resumption.js\nCheck package.json for install hooks (should have none)\nRun npm test to verify behavior (113 tests)\n⚠️ Only use UUID session IDs with --session flag\n⚠️ Avoid untrusted input to CLI commands\n⚠️ Review backups location (~/.openclaw/agents/main/sessions/archive/)\n\nOperation Types:\n\nRead-Only Operations (✅ Safe, no modifications):\n\ntide-watch status - Check current session count\ntide-watch check --session <id> - View specific session capacity\ntide-watch check --current - Auto-detect and check current session (v1.3.4+)\ntide-watch dashboard - Visual capacity overview\ntide-watch dashboard --watch - Live updating dashboard\ntide-watch dashboard --raw-size - Show full precision token counts (v1.3.2+)\ntide-watch report - List sessions above threshold\ntide-watch resume-prompt show --session <id> - View resumption prompt\n\nModifying Operations (⚠️ Moves/creates files):\n\ntide-watch archive --older-than <time> - Moves sessions to archive/ (time-based)\ntide-watch archive --session <id> - Archive specific session (v1.3.3+)\ntide-watch archive --session <id1> --session <id2> - Archive multiple sessions (v1.3.3+)\ntide-watch resume-prompt edit --session <id> - Opens editor (CVE patched in v1.0.1)\ntide-watch resume-prompt delete --session <id> - Deletes resumption prompt file\n\nNew Flags (v1.3.2+):\n\n--raw-size - Show full precision token counts (e.g., 18,713/128,000 instead of 18.7k/128k)\n--current - Auto-detect current session via OPENCLAW_SESSION_ID environment variable (v1.3.4+)\n--session (enhanced) - Supports partial IDs, multiple sessions for archive, labels/channels (v1.3.3+)\n\nFile System Access:\n\nReads: ~/.openclaw/agents/main/sessions/*.jsonl (session data)\nWrites: ~/.openclaw/agents/main/sessions/resume-prompts/*.md (resumption prompts)\nMoves: ~/.openclaw/agents/main/sessions/archive/ (archived sessions)\n\nNetwork Activity: NONE - All operations are local filesystem only.\n\nCLI Reference\n\nComplete flag and option documentation:\n\nDisplay Options:\n\n--raw-size - Show full precision token counts with commas (v1.3.2+)\n\nDefault: Human-readable (e.g., 18.7k/128k, 20.6k/1M)\nWith flag: Full precision (e.g., 18,713/128,000, 20,631/1,000,000)\nUse case: When exact token counts needed\nExample: tide-watch dashboard --raw-size\n\n--json - Output as JSON instead of formatted table\n\nExample: tide-watch check --session abc123 --json\nUseful for scripting and parsing\n\n--pretty - Pretty-print JSON output (requires --json)\n\nExample: tide-watch report --json --pretty\n\nSession Selection:\n\n--session <key> - Target specific session (enhanced in v1.3.3+)\n\nFull UUID: --session 17290631-42fe-40c0-bd23-c5da511c6f7b\nPartial UUID: --session 17290631-4 (v1.3.3+)\nLabel: --session \"#navi-code-yatta\" (v1.3.3+)\nChannel: --session discord (v1.3.3+)\nChannel + label: --session \"discord/#navi-code\" (v1.3.3+)\nMultiple (archive only): --session abc123 --session def456 (v1.3.3+)\n\n--current - Auto-detect current session (v1.3.4+)\n\nRequires: OPENCLAW_SESSION_ID environment variable\nExample: tide-watch check --current\nUse case: Heartbeat monitoring (check THIS session)\nFallback: Graceful error with helpful message if env var not set\n\nFiltering:\n\n--all - Show all sessions regardless of capacity\n--threshold <num> - Filter sessions above percentage (default: 75)\n--active <hours> - Only show sessions active within N hours\n--agent <id> - Filter to specific agent (multi-agent setups)\n--exclude-agent <id> - Exclude specific agent (can use multiple times)\n\nArchive Options:\n\n--older-than <time> - Archive sessions older than time\n\nExamples: 4d, 2w, 1mo, 3months\nMutually exclusive with --session\n\n--dry-run - Preview archive without making changes\n\nExample: tide-watch archive --older-than 7d --dry-run\n\n--exclude-channel <name> - Exclude channel from archiving\n\nExample: tide-watch archive --older-than 30d --exclude-channel discord\n\n--min-capacity <num> - Only archive sessions below capacity threshold\n\nExample: tide-watch archive --older-than 7d --min-capacity 50\n\nLive Monitoring:\n\n--watch - Live updating dashboard (refreshes every 10s)\nExample: tide-watch dashboard --watch\nPress Ctrl+C to exit\n\nMulti-Agent:\n\n--all-agents - Multi-agent discovery mode (default, auto-discovers agents)\n--single-agent-only - Single-agent mode (main agent only)\n\nConfiguration Override:\n\n--refresh-interval <seconds> - Dashboard refresh interval (1-300)\n--gateway-interval <seconds> - Gateway status check interval (5-600)\n--gateway-timeout <seconds> - Gateway command timeout (1-30)\n--session-dir <path> - Custom session directory\n\nUsage Examples:\n\n# Human-readable vs full precision\ntide-watch dashboard                    # 18.7k/128k (easy to scan)\ntide-watch dashboard --raw-size         # 18,713/128,000 (exact)\n\n# Auto-detect current session (v1.3.4+)\nexport OPENCLAW_SESSION_ID=\"17290631-4\"\ntide-watch check --current              # Check THIS session\ntide-watch check --current --json       # JSON for heartbeat scripts\n\n# Session-specific archiving (v1.3.3+)\ntide-watch archive --session abc123 --dry-run    # Preview\ntide-watch archive --session abc123              # Archive one\ntide-watch archive --session a --session b       # Archive multiple\n\n# Partial ID matching (v1.3.3+)\ntide-watch check --session 17290631-4   # Matches 17290631-42fe-40c0-...\n\n# Multi-agent filtering\ntide-watch dashboard --agent kintaro    # Kintaro sessions only\ntide-watch report --exclude-agent main  # All except main\n\nRuntime Requirements\n\nMode 1 (Directives-Only):\n\nNode.js: Not required\nnpm: Not required\nDependencies: None\nBinary: None\nInstallation: Copy templates to workspace config files\n\nMode 2 (CLI Tools - Optional):\n\nNode.js: v14.0.0 or later required\nnpm: Any recent version\nDependencies:\nDevelopment: jest@^30.2.0 (for testing only)\nRuntime: None (zero production dependencies)\nBinary: tide-watch (installed globally via npm link)\nInstallation: git clone + npm link\n\nWhy zero runtime dependencies?\n\nUses only Node.js built-in modules (fs, path, child_process)\nNo external API clients\nNo network libraries\nMinimal attack surface\nRecommendation\n\nMost 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.\n\nWhat It Does\n\nMonitors your OpenClaw session context windows and warns you before they overflow:\n\n🟡 75% — Heads up, consider wrapping up soon\n🟠 85% — Recommend finishing current task and resetting\n🔴 90% — Session will lock soon, ready to reset\n🚨 95% — Critical! Save to memory NOW\nInstallation\nStep 1: Add Monitoring Directive to AGENTS.md\n\nCopy the directive template from AGENTS.md.template and add it to your workspace AGENTS.md file:\n\n# From your workspace root (~/clawd or similar)\ncat skills/tide-watch/AGENTS.md.template >> AGENTS.md\n\n\nOr manually add the monitoring section from the template.\n\nThis tells me (your agent) what to look for and when to warn you.\n\nStep 2: Add Heartbeat Task to HEARTBEAT.md\n\nCopy the heartbeat template from HEARTBEAT.md.template and add it to your workspace HEARTBEAT.md file:\n\n# From your workspace root (~/clawd or similar)\ncat skills/tide-watch/HEARTBEAT.md.template >> HEARTBEAT.md\n\n\nOr manually add the Tide Watch heartbeat section from the template.\n\nThis tells me to check capacity automatically on a schedule.\n\nStep 3: Configure Settings (Optional)\n\nDefault settings work for most users, but you can customize in your AGENTS.md:\n\nWarning thresholds (when to warn):\n\nAdjust percentages (default: 75/85/90/95)\nRange: 50-99%, ascending order, 2-6 thresholds\n\nCheck frequency (how often to monitor):\n\nAdjust interval (default: Every 1 hour)\nOptions: 15min, 30min, 1hr, 2hr, or 'manual'\nRange: 5 minutes to 6 hours\n\nAuto-backup:\n\nEnable/disable automatic backups (default: enabled)\nSet which thresholds trigger backups (default: [90, 95])\nConfigure retention (default: 7 days)\nEnable compression to save disk space (default: off)\n\nChannel-specific overrides (advanced):\n\nDifferent settings per channel (Discord vs. webchat vs. DM)\nUsage\n\nOnce installed, I will:\n\nCheck capacity hourly during active conversations\nWarn at thresholds (75%, 85%, 90%, 95%)\nSuggest actions:\nSave important context to memory\nSwitch to lower-usage channels\nProvide session reset commands\nGenerate session resumption prompts\nManual Check\n\nAsk me to check session status anytime:\n\nWhat's my current session capacity?\nCheck context usage\nRun session_status\n\nReset Session with Context Preservation\n\nWhen warned about high capacity:\n\nHelp me reset this session and preserve context\n\n\nI'll:\n\nSave current work to memory\nBackup the session file (if not already backed up)\nProvide a session resumption prompt\nReset the session\nLoad Session from Backup\n\nIf you need to load a previous session state from backup:\n\nShow me available backups for this session\nLoad session from 90% backup\n\n\nI'll:\n\nList available backups with timestamps and sizes\nLoad the selected backup\nGuide you through reconnecting to load the session\n\nBackup locations:\n\nPath: ~/.openclaw/agents/main/sessions/backups/\nFormat: <session-id>-<threshold>-<timestamp>.jsonl[.gz]\nRetention: Configurable (default: 7 days)\nHow It Works\nAutomatic Monitoring (Heartbeat)\n\nWhen you add Tide Watch to your HEARTBEAT.md, I automatically:\n\nParse your configuration (from AGENTS.md)\n\nCheck frequency: How often to monitor\nWarning thresholds: When to warn you\nBackup settings: When to backup, retention, compression\nSee PARSING.md for detailed parsing logic\n\nCheck capacity on schedule (default: every hour)\n\nRun session_status to get token usage\nCalculate percentage: (tokens_used / tokens_max) * 100\n\nCompare against your thresholds\n\nUse your configured thresholds (not hardcoded defaults)\nDetermine which threshold(s) have been crossed\nAssign severity dynamically based on position (first=🟡, last=🚨)\n\nWarn you (once per threshold)\n\nIssue warning message for new threshold crossings\nTrack which thresholds already warned this session\nDon't repeat warnings if capacity stays at same level\n\nAuto-backup (if enabled and triggered)\n\nCheck if capacity crossed any backup trigger thresholds\nCreate backup: ~/.openclaw/agents/main/sessions/backups/<session-id>-<threshold>-<timestamp>.jsonl\nVerify backup integrity\nLog backup completion\nTrack which thresholds backed up (don't duplicate)\n\nSuggest actions\n\nSave context to memory\nSwitch to lower-usage channel\nProvide session reset commands\nGenerate session resumption prompts\n\nCleanup old backups\n\nRemove backups older than retention period (default: 7 days)\n\nReturn to silent mode\n\nIf capacity is below all thresholds, return HEARTBEAT_OK\nNo output, no interruption\nManual Checks\n\nYou can also ask me to check anytime:\n\nWhat's my current session capacity?\nCheck context usage\nRun session_status\n\nKey Features\nModel-agnostic: Works with any provider (Anthropic, OpenAI, DeepSeek, etc.)\nNon-intrusive: Silent checks, only speaks up at thresholds\nConfigurable: Adjust thresholds, frequency, and actions to your workflow\nStateful: Tracks which thresholds warned, resets tracking when session resets\nWhy You Need This\n\nProblem: Context windows fill up silently. Once at 100%, sessions lock and stop responding. You lose work mid-task.\n\nSolution: Proactive monitoring catches capacity issues early, giving you time to save work, switch channels, or reset cleanly.\n\nReal incident: Discord #navi-code-yatta hit 97% capacity and locked mid-task (2026-02-23). Had to manually reset, losing conversation context.\n\nConfiguration Examples\nConservative (early warnings)\nWarning thresholds: 60%, 70%, 80%, 90%\nCheck frequency: Every 30 minutes\n\nAggressive (maximize usage)\nWarning thresholds: 85%, 92%, 96%, 98%\nCheck frequency: Every 2 hours\n\nChannel-specific\nDiscord channels: 75%, 85%, 90%, 95% (default)\nWebchat: 85%, 95% (lighter warnings)\nDM: 90%, 95% (minimal warnings)\n\nFuture Features\n CLI tool for capacity reports\n Automatic session backups at thresholds\n Historical capacity tracking\n Cross-session capacity reports\n Integration with heartbeat monitoring\n Email/notification warnings\n Smart session rotation suggestions\nRequirements\nOpenClaw with session_status tool support\nWorkspace with AGENTS.md file\nActive monitoring directive in agent instructions\nSupport\nRepo: https://github.com/chrisagiddings/openclaw-tide-watch\nIssues: https://github.com/chrisagiddings/openclaw-tide-watch/issues\nClawHub: https://clawhub.ai/chrisagiddings/tide-watch\nLicense\n\nMIT"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/chrisagiddings/tide-watch",
    "publisherUrl": "https://clawhub.ai/chrisagiddings/tide-watch",
    "owner": "chrisagiddings",
    "version": "1.3.6",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/tide-watch",
    "downloadUrl": "https://openagent3.xyz/downloads/tide-watch",
    "agentUrl": "https://openagent3.xyz/skills/tide-watch/agent",
    "manifestUrl": "https://openagent3.xyz/skills/tide-watch/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/tide-watch/agent.md"
  }
}