搜索

PythonReactSEOPDF
OpenClaw

telegram-usage

Display session usage statistics (quota, session time, tokens, context)

c-drew0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install c-drew/telegram-usage

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Telegram 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

来源信息

Source
github
Repository
openclaw/skills
Path
skills/c-drew/telegram-usage
Version
—
Commit
3f6741539430e707f168b93013a6279308cfe3ef
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

Telegram Usage Command Skill

A custom Telegram command that displays comprehensive session usage statistics in a clean, formatted message.

Features

✅ Quota Remaining - Shows percentage of API quota left (provider-specific)
✅ Session Time - Displays time remaining before session resets
✅ Token Usage - Shows input and output tokens used in session
✅ Context Window - Displays current context window usage
✅ Visual Indicators - Color-coded emoji for quick status check
✅ Single Message - All info in one clean Telegram message

Installation

Option 1: Automatic (via ClawdHub)
clawdhub install telegram-usage
Option 2: Manual (Already in workspace)

The skill is located at /skills/telegram-usage in your Clawdbot workspace.

Setup

1. Enable the Skill

Ensure the skill is enabled in ~/.clawdbot/clawdbot.json:

{
  "skills": {
    "entries": {
      "telegram-usage": {
        "enabled": true
      }
    }
  }
}
2. Add Custom Command to Telegram (Optional)

Register the command in Telegram's bot menu via config:

{
  "channels": {
    "telegram": {
      "customCommands": [
        {
          "command": "usage",
          "description": "Show session usage stats"
        }
      ]
    }
  }
}
3. Restart Gateway
clawdbot gateway restart

Or if running manually:

clawdbot gateway

Usage

In Telegram

Send any of these:

/telegram_usage
/usage          (if custom command registered)
/skill telegram-usage
Output Example
📊 Session Usage Report

🔋 Quota Remaining
🟢 82% of API quota available
Provider: anthropic

⏱️ Session Time
3 hours 40 minutes remaining
(resets daily at 4:00 AM)

🎯 Tokens Used
4,370 total tokens
├─ Input: 2,847
└─ Output: 1,523

📦 Context Window
🟢 45% used
1,856 / 4,096 tokens

Model: Claude 3.5 Haiku

Configuration

No additional configuration required. The skill reads from Clawdbo...

来源内容

SKILL.md
# Telegram 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:

```bash
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
README
# Telegram Usage Command Skill

A custom Telegram command that displays comprehensive session usage statistics in a clean, formatted message.

## Features

✅ **Quota Remaining** - Shows percentage of API quota left (provider-specific)  
✅ **Session Time** - Displays time remaining before session resets  
✅ **Token Usage** - Shows input and output tokens used in session  
✅ **Context Window** - Displays current context window usage  
✅ **Visual Indicators** - Color-coded emoji for quick status check  
✅ **Single Message** - All info in one clean Telegram message  

## Installation

### Option 1: Automatic (via ClawdHub)

```bash
clawdhub install telegram-usage
```

### Option 2: Manual (Already in workspace)

The skill is located at `/skills/telegram-usage` in your Clawdbot workspace.

## Setup

### 1. Enable the Skill

Ensure the skill is enabled in `~/.clawdbot/clawdbot.json`:

```json
{
  "skills": {
    "entries": {
      "telegram-usage": {
        "enabled": true
      }
    }
  }
}
```

### 2. Add Custom Command to Telegram (Optional)

Register the command in Telegram's bot menu via config:

```json
{
  "channels": {
    "telegram": {
      "customCommands": [
        {
          "command": "usage",
          "description": "Show session usage stats"
        }
      ]
    }
  }
}
```

### 3. Restart Gateway

```bash
clawdbot gateway restart
```

Or if running manually:

```bash
clawdbot gateway
```

## Usage

### In Telegram

Send any of these:

```
/telegram_usage
/usage          (if custom command registered)
/skill telegram-usage
```

### Output Example

```
📊 Session Usage Report

🔋 Quota Remaining
🟢 82% of API quota available
Provider: anthropic

⏱️ Session Time
3 hours 40 minutes remaining
(resets daily at 4:00 AM)

🎯 Tokens Used
4,370 total tokens
├─ Input: 2,847
└─ Output: 1,523

📦 Context Window
🟢 45% used
1,856 / 4,096 tokens

Model: Claude 3.5 Haiku
```

## Configuration

No additional configuration required. The skill reads from Clawdbo...

相关技能

OpenClaw

laborany

laborany

基于 Claude Code 的桌面 AI 工作力平台 — 支持飞书/QQ 远程调度、技能创建、定时任务。OpenClaw 的桌面实现,零代码养好你的 AI 🦞 Desktop AI workforce platform built on Claude Code. Feishu/QQ bot integration, skill c...

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...