token-watchdog

Monitors OpenClaw agent token spend per session and alerts via Telegram when cost exceeds estimated budget (2x threshold). Prevents runaway debugging loops from burning $3,000+ unnoticed.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "token-watchdog" with this command: npx skills add ddaekeu3-cyber/token-watchdog

Token Watchdog

Stop debugging loops before they bankrupt you.

AI agents in runaway debug loops can burn $3,000+ before anyone notices. Token Watchdog monitors your actual session spend in real-time and pings you on Telegram the moment costs go off the rails.

How it works

  • Reads your live session .jsonl file directly (no API call needed)
  • Estimates expected cost based on task complexity keywords
  • Polls every 30 seconds
  • Sends Telegram alert when actual spend hits 2x the estimate
  • At 3x: sends final warning and exits

⚠️ Cost figures are OpenClaw's internal estimates (~90% accurate vs Anthropic billing).
This tool is a danger signal detector, not a precise billing tracker.

Install

Option A — via SynapseAI (recommended)

curl -sL https://ddaekeu3-cyber.github.io/synapse-ai/tools/token-watchdog/token-watchdog.mjs \
  -o ~/.openclaw/workspace/token-watchdog.mjs

Option B — via ClawHub

clawhub install token-watchdog

Usage

# Auto-estimate based on task description
node ~/.openclaw/workspace/token-watchdog.mjs --task "Fix auth timeout bug"

# Manual cost estimate (dollars)
node ~/.openclaw/workspace/token-watchdog.mjs --estimate 1.50 --task "DB migration"

# Background mode
nohup node ~/.openclaw/workspace/token-watchdog.mjs --task "Complex refactor" &

Complexity estimates (auto)

Task typeKeywordsEstimated cost
Highdebug, refactor, migration, 디버깅$1.50
Mediumimplement, create, build, 구현$0.50
Lowread, check, list, 확인$0.10
Default(anything else)$0.30

Telegram alert format

🚨 Token budget exceeded!

Estimated: $0.50
Current:   $1.12 (224%)

Agent paused. Continue? Reply "계속" or "중지"

Requirements

  • OpenClaw with Telegram channel configured
  • Node.js v18+
  • Session files at ~/.openclaw/agents/main/sessions/

Also available on SynapseAI

SynapseAI is a shared solution DB for OpenClaw agents.
If you find new patterns or improvements for this tool, contribute them at:
👉 https://ddaekeu3-cyber.github.io/synapse-ai/

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Chrome Use

Use chrome-use when standard web access (fetch/web search) fails due to Cloudflare challenges, CAPTCHAs, JavaScript-rendered content, or bot detection — or w...

Registry SourceRecently Updated
Automation

Agentchat Skill Publish

The messaging platform for AI agents. Send DMs, join groups, manage contacts, and check presence.

Registry SourceRecently Updated
Automation

Draft0

Official skill for interacting with Draft0, the Medium for Agents.

Registry SourceRecently Updated
Automation

ifly-pdf-image-ocr

ifly-pdf&image-ocr skill supporting both image OCR (AI-powered LLM OCR) and PDF document recognition. Use when user asks to OCR images, extract text from ima...

Registry SourceRecently Updated