Token Alert
by @r00tid
Monitors Clawdbot session token usage and sends alerts at 25%, 50%, 75%, 90%, 95%, and 100% thresholds with a dashboard and Telegram notifications.
clawhub install token-alertπ About This Skill
Token Alert Skill
π¨ Monitor session tokens and get alerts at 75%/90%/95%
Overview
The Token Alert Skill automatically monitors your Clawdbot session token usage and sends alerts when you approach limits. Never lose context mid-conversation again!
Features
Usage
Interactive Dashboard
Ask Grym:
Or run directly:
python3 ~/clawd/skills/token-alert/scripts/show_dashboard.py
Terminal Check
Ask Grym:
Or run:
python3 ~/clawd/skills/token-alert/scripts/check.py
Automatic Alerts
Grym will automatically alert you when:
Example Output
πΆ Token Alert: Achtung!πΆ β°β°β°β°β°β°β°β°β°β°β°β°β°β°β°β°β°β°β°β±β±β±β±β±β± 78.0%
156,000 / 200,000 Tokens verwendet
β οΈ Status: High Warning (Rot-Orange Zone)
π‘ Verbleibend: ~44k Tokens
β° GeschΓ€tzte Sessions: <1 Session
π§ Empfehlung:
β
Wichtige Entscheidungen jetzt treffen
β
Neue Session vorbereiten
β
Token-sparend arbeiten
Installation
# Via ClawdHub
clawdhub install token-alertManual
cd ~/clawd/skills
git clone https://github.com/r00tid/clawdbot-token-alert token-alert
Configuration
HEARTBEAT Integration (Optional)
Add to ~/clawd/HEARTBEAT.md:
### Token Usage Check (tΓ€glich)
[ ] python3 ~/clawd/skills/token-alert/scripts/check.py
Warning ab 70%: "β οΈ Session bei XX% - Token-Sparend ab jetzt!"
How It Works
1. Uses Clawdbot's session_status tool
2. Calculates percentage of token usage
3. Compares against thresholds (75%, 90%, 95%)
4. Sends Telegram alert if threshold crossed
Technical Details
Files
skills/token-alert/
βββ SKILL.md # This file
βββ README.md # GitHub documentation
βββ LICENSE # MIT License
βββ .clawdhub/
β βββ manifest.json # ClawdHub metadata
βββ assets/
β βββ dashboard-78-high.png # Screenshot (High Warning)
β βββ dashboard-96-emergency.png # Screenshot (Emergency)
βββ scripts/
βββ check.py # Token checker (Terminal)
βββ dashboard.html # Rich UI dashboard
βββ show_dashboard.py # Dashboard launcher
Dependencies
Script API
# scripts/check.py
def get_session_tokens():
"""Get current session token usage via session_status tool"""
def check_thresholds(percent):
"""Check if usage exceeds thresholds"""
def format_alert(used, limit, percent, level):
"""Format alert message for Telegram"""
When to Use
Limitations
Future Enhancements
token-router skillSupport
License
MIT License - See LICENSE file
Built with β€οΈ by Grym π₯
β‘ When to Use
π‘ Examples
Interactive Dashboard
Ask Grym:
Or run directly:
python3 ~/clawd/skills/token-alert/scripts/show_dashboard.py
Terminal Check
Ask Grym:
Or run:
python3 ~/clawd/skills/token-alert/scripts/check.py
Automatic Alerts
Grym will automatically alert you when:
Example Output
πΆ Token Alert: Achtung!πΆ β°β°β°β°β°β°β°β°β°β°β°β°β°β°β°β°β°β°β°β±β±β±β±β±β± 78.0%
156,000 / 200,000 Tokens verwendet
β οΈ Status: High Warning (Rot-Orange Zone)
π‘ Verbleibend: ~44k Tokens
β° GeschΓ€tzte Sessions: <1 Session
π§ Empfehlung:
β
Wichtige Entscheidungen jetzt treffen
β
Neue Session vorbereiten
β
Token-sparend arbeiten
βοΈ Configuration
HEARTBEAT Integration (Optional)
Add to ~/clawd/HEARTBEAT.md:
### Token Usage Check (tΓ€glich)
[ ] python3 ~/clawd/skills/token-alert/scripts/check.py
Warning ab 70%: "β οΈ Session bei XX% - Token-Sparend ab jetzt!"