openrouter-usage

$npx mdskill add aAAaqwq/AGI-Super-Team/openrouter-usage

Monitor OpenRouter spending and credit balance instantly.

  • Reveals credit balance, per-model costs, and spending projections.
  • Depends on OpenRouter API and OpenClaw session logs.
  • Executes reports based on user queries about billing or usage.
  • Delivers data via CLI commands with optional JSON formatting.

SKILL.md

.github/skills/openrouter-usageView on GitHub ↗
---
name: openrouter-usage
description: Track OpenRouter API spending — credit balance, per-model cost breakdown,
  and spending projections from OpenClaw session logs.
metadata:
  openclaw:
    emoji: 💰
    requires:
      bins:
      - openrouter-usage
author: Daniel Li
---
# openrouter-usage

- Author: Daniel Li
- Copyright © Daniel Li. All rights reserved.

Track your OpenRouter spending directly from your OpenClaw agent. Shows credit balance, per-model cost/token breakdown, and spending projections.

## Trigger

Use when the user asks about OpenRouter credits, costs, spending, balance, usage, billing, or the `/usage` command.

## Commands

### Full report (recommended — combines everything)

```bash
openrouter-usage report              # credits + today's usage + projection
openrouter-usage report --week       # credits + last 7 days
openrouter-usage report --month      # credits + last 30 days
```

### Credit balance only

```bash
openrouter-usage credits
```

### Per-model breakdown only

```bash
openrouter-usage sessions --today
openrouter-usage sessions --week
openrouter-usage sessions --month
openrouter-usage sessions --date 2026-02-25
openrouter-usage sessions --from 2026-02-01 --to 2026-02-15
```

### Filtering and output

```bash
openrouter-usage report --agent main          # specific agent only
openrouter-usage report --format json         # JSON output
openrouter-usage sessions --today --utc       # use UTC instead of local timezone
```

## Notes

- API key auto-discovered from OpenClaw auth store or `OPENROUTER_API_KEY` env var.
- Session parsing is fully local — reads `~/.openclaw/agents/*/sessions/*.jsonl`.
- Date filters use local timezone by default. Pass `--utc` to override.
- Zero dependencies beyond Python 3 stdlib.

More from aAAaqwq/AGI-Super-Team

SkillDescription
a-fund-monitor监控 A 股基金实时估值与盘后净值,自动判断交易日并生成提醒或分析。
add-leadAdd company/person/relationship to CRM
ads-agentAI-агент для управления Facebook рекламой. Вызывай для анализа, оптимизации, создания кампаний и отчётов.
afrexai-compliance-auditRun internal compliance audits against major governance and security
afrexai-personal-financeComplete personal finance system — budgeting, debt payoff, investing, tax optimization, net worth tracking, and financial independence planning. Use when managing money, building wealth, paying off debt, planning retirement, or optimizing taxes. Zero dependencies.
after-salesUse when managing post-purchase experience, building customer loyalty, or increasing repeat purchases
agent-contactsAI agent contacts — add, list, remove MCP contacts. Use when someone gives an agent URL, or when you need to view/remove contacts.
agent-model-switcher批量查看和切换子 agent 的模型配置,用于统一调整多 agent 的 provider/model 设置。
agent-patternsFormat SPAWN REQUEST messages to launch parallel agents, generate structured agent status reports, and define communication protocols within the sprint system. Use when the user needs to coordinate multiple agents, format spawn requests, produce agent reports, or establish inter-agent communication patterns.
agent-task-confirmUse when confirming whether a dispatched agent task was actually received, activated, and progressing after sessions_send or other task handoff actions.