opencode-analyzer

Analyze SQLite records to calculate AI token usage and financial costs.

2|Updated Apr 30, 2026
One-click install
npx skills add https://github.com/ShaggyD/agent-toolkit --skill opencode-analyzer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-analyzer
Source: https://github.com/ShaggyD/agent-toolkit/tree/main/tools/opencode-analyzer
Command: npx skills add https://github.com/ShaggyD/agent-toolkit --skill opencode-analyzer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sqlite3, bc, and includes references (resource) components.

What problem does it solve?

This skill solves the issue of hidden budget drift in AI coding agents by providing granular visibility into token usage and actual spending patterns.

Core Features & Use Cases

  • Cost Breakdown: Analyzes local SQLite databases to provide daily, weekly, and monthly spending reports.
  • Model Comparison: Reprices your actual token usage against OpenRouter equivalents to identify potential savings.
  • Budget Projections: Uses rolling averages to forecast future spending and catch unusual patterns before they result in surprise bills.

Quick Start

Run the opencode-cost command in your terminal to generate a complete cost breakdown report from your local database.

Frequently Asked Questions about opencode-analyzer

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

FAQPage Schema
How do I track AI agent token usage and calculate costs from a local SQLite database?

You can track AI agent token usage and calculate costs by analyzing local SQLite database records to generate granular financial cost breakdowns. This process evaluates actual spending patterns to provide daily, weekly, and monthly reporting.

How do I compare my LLM token usage costs against OpenRouter model tiers?

You can compare LLM token usage costs against OpenRouter model tiers by repricing your actual token consumption against OpenRouter equivalents. This comparison identifies potential savings across different model pricing structures.

What is the best way to forecast AI coding agent spending and catch budget drift?

The best way to forecast AI coding agent spending and catch budget drift is by using rolling averages to project future costs. This approach catches unusual spending patterns before they result in surprise bills.

Do I need sqlite3 and bc installed to generate token cost reports?

Yes, you need sqlite3 and bc installed to generate token cost reports. Sqlite3 is required for database querying, while bc handles the mathematical cost projections needed for accurate financial calculations.