name: token-usage-monitor description: Monitor and display token usage metrics for AI models. Use when you need to track token consumption rates, view historical usage data, or get alerts about high token usage. Ideal for optimizing prompt costs and controlling AI service expenses.
This skill provides comprehensive token usage monitoring and reporting capabilities for AI models. It helps you track token consumption in real-time, analyze historical usage patterns, and receive alerts when usage exceeds predefined thresholds. Ideal for optimizing prompt costs, controlling AI service expenses, and ensuring efficient use of model resources.
本技能來自小蔥技能站7w4.net。
# Check current session token usage
python scripts/token_usage_tracker.py --session
# Generate report for today's usage
python scripts/token_usage_tracker.py --report --period day
# Set threshold of 100,000 tokens per day for GPT-4
python scripts/token_usage_tracker.py --set-threshold --model gpt-4 --limit 100000 --period day
Create only the resource directories this skill actually needs. Delete this section if no resources are required.
token_usage_tracker.py: Main script for tracking and reporting token usageKey features: - Tracks token usage per session, model, and time period - Generates daily usage reports with cost estimates - Supports custom usage thresholds and alerts - Provides real-time and historical usage analytics
Usage examples: ```bash # Track a single usage event python scripts/token_usage_tracker.py --track --model doubao-seed --prompt-tokens 100 --completion-tokens 200
# View current session usage python scripts/token_usage_tracker.py --session
# Generate daily usage report python scripts/token_usage_tracker.py --report --period day
# Set usage threshold (100,000 tokens/day for Doubao) python scripts/token_usage_tracker.py --set-threshold --model doubao-seed --limit 100000
# View overall usage summary python scripts/token_usage_tracker.py --summary ```
Note: The script automatically creates and manages a data file at ~/.openclaw/token_usage.json to store usage data.
Documentation and reference material intended to be loaded into context to inform Codex's process and thinking.
Examples from other skills:
- Product management: communication.md, context_building.md - detailed workflow guides
- BigQuery: API reference documentation and query examples
- Finance: Schema documentation, company policies
Appropriate for: In-depth documentation, API references, database schemas, comprehensive guides, or any detailed information that Codex should reference while working.
Files not intended to be loaded into context, but rather used within the output Codex produces.
Examples from other skills: - Brand styling: PowerPoint template files (.pptx), logo files - Frontend builder: HTML/React boilerplate project directories - Typography: Font files (.ttf, .woff2)
Appropriate for: Templates, boilerplate code, document templates, images, icons, fonts, or any files meant to be copied or used in the final output.
Not every skill requires all three types of resources.
這是一個功能實用的 token 用量監控工具,能幫助追蹤 AI 模型使用量、生成報告和設定費用提醒。文件寫得比較清晰,有中英文說明。但存在一些文件問題:說明檔案裡有不少重複內容和示例殘留,可能會讓初次使用的使用者感到困惑。整體質量中等偏上,核心功能紮實,但文件需要進一步打磨完善。