Files
clawdbot/skills/claude-code-usage/scripts/monitor-and-notify.sh
James 36eb4a7b3b Add skills, learnings & memory updates (2026-01-26)
- New skills: clawddocs, claude-code-usage, summarize, homeassistant, humanizer, self-improving-agent
- Add .learnings/ for self-improvement tracking
- Document proaktive cron config (LRN-20260126-001)
- Update USER.md: Löchgau as former residence
- Update TOOLS.md: Peekaboo workaround
- Memory files for 2026-01-25 and 2026-01-26
2026-01-26 09:26:26 +01:00

18 lines
707 B
Bash
Executable File

#!/bin/bash
# Monitor Claude Code usage and send Telegram notifications on resets
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OUTPUT=$("$SCRIPT_DIR/monitor-usage.sh" 2>&1)
# Check if a reset was detected (output contains "Reset notification sent")
if echo "$OUTPUT" | grep -q "Reset notification sent"; then
# Extract just the notification message (before "✅ Reset notification sent")
MESSAGE=$(echo "$OUTPUT" | sed '/✅ Reset notification sent/q' | sed '$ d')
# Send via Telegram using clawdbot
if command -v clawdbot >/dev/null 2>&1; then
# Use printf to handle newlines properly
printf '%s' "$MESSAGE" | clawdbot message send --telegram --target 5259918241
fi
fi