opencode-usage-report

Generate Excel usage reports for opencode token consumption by date and model.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/jiesou/dotfiles --skill opencode-usage-report
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-usage-report
Source: https://github.com/jiesou/dotfiles/tree/main/exact_dot_agents/exact_skills/exact_0workflow/exact_opencode-usage-report
Command: npx skills add https://github.com/jiesou/dotfiles --skill opencode-usage-report

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpx, openpyxl, and includes scripts (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the generation of detailed usage reports for opencode go token consumption, providing insights into token usage patterns and costs.

Core Features & Use Cases

  • Token Usage Analysis: Analyze token usage by date, model, and total cost.
  • Excel Reporting: Generate comprehensive Excel reports with pie and bar charts.
  • Token Estimation: Estimate token consumption based on pricing and cache hit rate.
  • Use Case: Use this Skill to monitor and analyze token usage in your opencode workspace, ensuring efficient and cost-effective use of resources.

Quick Start

Generate a usage report for June 2026 using the opencode-usage-report skill with the following command:

python3 scripts/generate_report.py --cookie-file cookies.json --year 2026 --month 6 --output report.xlsx

Frequently Asked Questions about opencode-usage-report

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

FAQPage Schema
How do I generate an Excel report for opencode token usage?

To generate an opencode token usage report, run the Python script with your cookie file, target year, month, and output path. It analyzes token consumption by date and model, outputting an Excel file with cost charts.

Can I estimate token consumption cost using a cache hit rate?

Yes, you can estimate token consumption by applying pricing and cache hit rate metrics. The skill calculates total costs based on these parameters to project your expected resource expenditure accurately.

Do I need Python libraries to analyze opencode token costs?

Yes, you need Python installed along with the httpx and openpyxl libraries. These dependencies handle the network requests and generate the Excel spreadsheets with pie and bar charts respectively.

What is the best way to visualize token usage by date and model?

The best way to visualize token usage is by generating a comprehensive Excel report. The skill automatically creates pie and bar charts to display consumption patterns and total costs across different models.

Does opencode usage reporting work without providing a cookie file?

No, the reporting script requires a cookie file to authenticate and fetch your opencode token consumption data. Without it, the script cannot retrieve the necessary usage metrics to analyze.