بنقرة واحدة
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 المهني
Gmail inbox automation with pattern rules, AI triage, and Discord notifications
Inject prompts into existing Discord channels to trigger OpenCode sessions
Control OpenCode agents from Discord via Kimaki CLI
Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs
Schedule recurring tasks on macOS using launchd plists
| name | opencode-analyzer |
| description | Analyze OpenCode token usage and estimate costs on OpenRouter |
| metadata | {"install":[{"kind":"manual","bins":["opencode-cost"]}]} |
OpenCode cost analyzer with detailed daily/weekly/monthly breakdowns. Shows what you actually spent vs what it would cost on OpenRouter, plus same-token model comparisons.
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 skills/opencode-analyzer/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