Telegram Usage Stats
Scanned@c-drew
npx machina-cli add skill @c-drew/telegram-usage --openclawTelegram Usage Stats
Display comprehensive session usage statistics by running the handler script.
What it does
Shows a quick status message with:
- Quota Remaining: Percentage of API quota left with visual indicator
- Reset Timer: Time remaining until quota resets
How to use this skill
When the user asks for usage statistics, quota info, or session data:
node /home/drew-server/clawd/skills/telegram-usage/handler.js
This will output formatted HTML suitable for Telegram's parseMode.
Output Format
The response is formatted as a clean Telegram message with:
- Section headers (bold)
- Clear percentages and time remaining
- Visual indicators (emoji)
- All in one message for quick reference
Example Output
š API Usage
š Quota: š¢ 47%
ā±ļø Resets in: 53m
Notes
- Pulls real-time data from
clawdbot models status - Updates on each invocation with current API quota values
- Uses plain text formatting for Telegram compatibility
Overview
Telegram Usage Stats provides a quick snapshot of your session quotas, time until reset, and token usage. It runs the handler.js Node script to fetch real-time data from clawdbot models status and formats it for Telegram messages.
How This Skill Works
When invoked, the skill runs the Node.js handler.js script, which pulls real-time data from clawdbot models status. It then builds a Telegram-ready message with bold headers, emoji indicators, and precise quota and reset timing.
When to Use It
- A user asks for current API quota or usage stats
- Monitoring quota and reset timing during high-traffic periods
- Before starting a long session to inform the user of remaining quota
- Diagnosing quota-related issues by displaying tokens and context usage
- Generating a quick admin status update in chat
Quick Start
- Step 1: Ensure Node.js is installed and the handler path is accessible
- Step 2: Run: node /home/drew-server/clawd/skills/telegram-usage/handler.js
- Step 3: Use the output in Telegram with parseMode=HTML to display the formatted status
Best Practices
- Run the handler on-demand when stats are requested
- Ensure Node.js is installed and the path to handler.js is correct
- Format the output for Telegram parseMode HTML and include emoji indicators
- Fetch fresh data on each invocation for accuracy
- Implement graceful error handling with a fallback message
Example Use Cases
- User asks for current quota in a chat
- Admin checks remaining quota before large operation
- Bot posts a session usage summary after a user ends a session
- Support requests the session time remaining for troubleshooting
- Onboarding flow displays initial quota and reset time