원클릭으로
opencode-analyzer
Analyze OpenCode token usage and estimate costs on OpenRouter
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Analyze OpenCode token usage and estimate costs on OpenRouter
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
MCP server providing browser automation tools that bypass Cloudflare, LinkedIn, Indeed, and other WAF-protected sites using agent-browser with anti-detection stealth.
Delegate coding/tasks to pi CLI over RPC with persistent, resumable sessions.
Browser automation via agent-browser CLI (Vercel Labs). Headless Chrome navigation, snapshots, clicks, fills, screenshots, eval, and batch flows for web research, UI testing, and QA.
Manifest V3 Chrome extension that patches browser fingerprint vectors at document_start for WAF bypass
Hermes-native tool plugin for controlling pi --mode rpc sessions with full lifecycle management
Build three essential docs for AI agent context: personal constitution, goals, and business strategy. Based on Allie Miller's framework.
| name | opencode-analyzer |
| description | Analyze OpenCode token usage and estimate costs on OpenRouter |
| version | 1.0.0 |
| author | Dustin Chadwick (@ShaggyD) |
| tags | ["opencode","costs","analysis","productivity"] |
OpenCode cost analyzer with detailed daily, weekly, and monthly breakdowns. Shows what you actually spent vs what it would cost on OpenRouter, plus same-token model comparisons.
OpenCode costs add up fast and the CLI doesn't tell you what you're actually spending. Free models hide real costs behind a "free" label, and without tracking you won't notice budget drift until the bill comes.
A cost analysis tool that queries your local OpenCode SQLite database and breaks down usage by day, week, and month. Shows top models by spending, projects cost comparisons against OpenRouter equivalents, and provides same-token repricing across comparable model tiers.
You see budget drift before it becomes a surprise bill. Daily and weekly summaries catch unusual spending patterns early, and the OpenRouter comparison helps you decide whether switching providers would save money.
SCOPE: This skill covers OpenCode cost analysis only. OpenCode and OpenAI Codex CLI are separate tools with separate cost databases. Do NOT use this to analyze Codex CLI costs — see references/codex-cli-monitoring.md.
Queries your local OpenCode SQLite database to show:
# Copy to your skills directory
cp -r skills/opencode-analyzer ~/.config/opencode/skills/
# Or create symlink to command
ln -s ~/.config/opencode/skills/opencode-analyzer/opencode-cost ~/.local/bin/opencode-cost
Optional plugin sources are stored in plugins/.
When enabled in a compatible OpenCode runtime, the plugin layer is intended to:
If your runtime does not expose plugin sidebar UI, use the command path (opencode-cost and /cost-report), which is the primary supported workflow for this skill.
# Show complete cost breakdown
opencode-cost
💰 OPENCODE COST BREAKDOWN
📅 SPENDING BY PERIOD
────────────────────────────────────────────────────────────
Today: $3.80
Yesterday: $2.19
Last 7 Days: $16.68
Last 30 Days: $16.89
All Time: $81.83
📊 AVERAGES
────────────────────────────────────────────────────────────
Daily Average (30d): $0.60
Weekly Average (30d): $4.20
Monthly Average (30d): $18.17
Daily Avg (active): $3.07
🔮 PROJECTION
────────────────────────────────────────────────────────────
Projected (7d run-rate): $107.70
📈 ACTIVITY
────────────────────────────────────────────────────────────
Active Days (Week): 5
Active Days (Month): 6
Total Active Days: 27
Calendar Span Days: 104
🔥 TOP MODELS (Last 30 Days)
────────────────────────────────────────────────────────────
MODEL COST % OF TOTAL
kimi-k2.5-free $7.26 40.0%
gpt-5.3-codex $5.14 30.0%
moonshotai/kimi-k2.5 $1.58 9.0%
ZDR column (whether model has at least one OpenRouter ZDR endpoint)MM column (whether the model supports non-text inputs)Paid models: Uses actual cost from OpenCode
Free models: Uses OpenRouter pricing:
| Model | Input | Output |
|---|---|---|
| GLM 4.6 | $0.30/M | $2.55/M |
| Kimi K2.5 | $0.50/M | $2.40/M |
| Gemini 2.5 Flash | $0.30/M | $2.50/M |
| GPT-5.3 Codex | $1.25/M | $10.00/M |
| MiniMax M2.5 | $0.15/M | $0.60/M |
| Claude Opus | $5.00/M | $25.00/M |
| Qwen | $0.40/M | $2.40/M |
Comparison table dynamically selects current OpenRouter trending models in value, balanced, and premium classes. If live fetch fails, it falls back to a stable default set.
Auto-detects from:
~/.local/share/opencode/opencode.db (default)~/Library/Application Support/opencode/opencode.db (macOS)# Default breakdown
opencode-cost
# Use specific database
opencode-cost --db /path/to/opencode.db
# Find your database
find ~ -name "opencode.db" 2>/dev/null
# Specify path
opencode-cost --db /path/to/opencode.db
chmod 644 ~/.local/share/opencode/opencode.db
# macOS
brew install sqlite
# Ubuntu/Debian
sudo apt-get install sqlite3
references/codex-cli-monitoring.md — Cost monitoring for OpenAI Codex CLI (separate tool from OpenCode)~/.codex/sessions/) and model pricing. Do NOT use opencode-cost to check Codex usage — use the codex-usage-monitor.py script instead (see references/codex-cli-monitoring.md).opencode-cost can't find the database, run find ~ -name "opencode.db" 2>/dev/null and pass with --db.