model-usage

Track and analyze LLM token consumption and API costs from log files.

198|40|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/xiaomochn/AndroidForClaw --skill model-usage-xiaomochn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-usage
Source: https://github.com/xiaomochn/AndroidForClaw/tree/main/app/src/main/assets/skills/model-usage
Command: npx skills add https://github.com/xiaomochn/AndroidForClaw --skill model-usage-xiaomochn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires javascript_exec, read_file, list_dir, write_file, and includes scripts (resource) components.

What problem does it solve?

This Skill helps users track and analyze their Large Language Model (LLM) token consumption and associated costs, enabling better budget management and optimization of AI spending.

Core Features & Use Cases

  • Token Tracking: Monitors input, output, and total tokens used per session and model.
  • Cost Analysis: Calculates and reports on API costs based on token usage and model pricing.
  • Usage Reporting: Generates daily, monthly, and model-specific usage reports.
  • Optimization Tips: Provides actionable advice on reducing costs, such as choosing the right model and managing context size.
  • Use Case: A user wants to understand their monthly AI expenses and identify which models or tasks are the most costly. This skill can provide a detailed breakdown and suggest ways to cut down on spending.

Quick Start

Read the current month's usage log file.

Frequently Asked Questions about model-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I track LLM token usage and calculate API costs from log files?

You can track LLM token usage and calculate API costs by reading your log files and executing JavaScript to parse interactions and compute expenses based on model pricing and token consumption. This generates detailed usage breakdowns for budget management.

Can I generate usage reports to identify which high-usage models are costing the most?

Yes, you can generate daily, monthly, and model-specific usage reports to identify high-usage models. It calculates costs by analyzing input, output, and total tokens used per session, helping you pinpoint the most expensive API interactions.

What's the best way to monitor API expenses and optimize LLM spending?

The best way to monitor API expenses is by analyzing token consumption logs to track spending patterns. This approach provides optimization tips such as selecting cheaper models and managing context size to reduce overall AI costs.

Do I need JavaScript execution to analyze token consumption logs?

Yes, JavaScript execution is required to parse and calculate token consumption data from log files. The skill relies on executing JavaScript to read interactions, compute costs, and generate accurate API usage reports.

Does this tool work with existing LLM API interaction logs for budget management?

It works with existing LLM API interaction logs by reading the files directly to extract session data. It then analyzes token consumption and calculates costs to provide actionable budget management insights.

What are the limitations of using log files for LLM cost analysis?

A limitation of using log files for LLM cost analysis is that the accuracy depends entirely on the log data available. It requires existing files containing token counts and model information to correctly calculate expenses and generate usage reports.