model-usage-linux

Track OpenClaw AI token usage and cost per model on Linux by parsing session JSONL files. Use when asked about: token usage, API cost, how much has been spent, which model was used most, usage summary, billing, cost breakdown. Linux replacement for the macOS-only model-usage/CodexBar skill.

33 stars

Best use case

model-usage-linux is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Track OpenClaw AI token usage and cost per model on Linux by parsing session JSONL files. Use when asked about: token usage, API cost, how much has been spent, which model was used most, usage summary, billing, cost breakdown. Linux replacement for the macOS-only model-usage/CodexBar skill.

Teams using model-usage-linux should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/model-usage-linux/SKILL.md --create-dirs "https://raw.githubusercontent.com/aAAaqwq/AGI-Super-Team/main/skills/model-usage-linux/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/model-usage-linux/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How model-usage-linux Compares

Feature / Agentmodel-usage-linuxStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Track OpenClaw AI token usage and cost per model on Linux by parsing session JSONL files. Use when asked about: token usage, API cost, how much has been spent, which model was used most, usage summary, billing, cost breakdown. Linux replacement for the macOS-only model-usage/CodexBar skill.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Model Usage (Linux)

Parse OpenClaw session files to summarize token usage and cost per model.

## Quick start

```bash
python3 {baseDir}/scripts/usage.py
```

## Options

```bash
# JSON output
python3 {baseDir}/scripts/usage.py --format json

# Custom sessions dir
python3 {baseDir}/scripts/usage.py --sessions-dir ~/.openclaw/agents/main/sessions
```

## Output

Shows per-model breakdown:
- Turns (assistant replies)
- Input / output tokens
- Cache read / write tokens
- Cost in USD

Sessions live at: `~/.openclaw/agents/main/sessions/*.jsonl`

Related Skills

startup-financial-modeling

33
from aAAaqwq/AGI-Super-Team

Use when the user asks to create financial projections, build a financial model, forecast revenue, calculate burn rate, estimate runway, model cash flow, or do 3-5 year startup financial planning.

openrouter-usage

33
from aAAaqwq/AGI-Super-Team

Track OpenRouter API spending — credit balance, per-model cost breakdown, and spending projections from OpenClaw session logs.

model-usage

33
from aAAaqwq/AGI-Super-Team

Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.

model-provider-manager

33
from aAAaqwq/AGI-Super-Team

Unified LLM provider and model configuration, health monitoring, and key management

model-hierarchy-skill

33
from aAAaqwq/AGI-Super-Team

> 模型层级调度——根据任务复杂度自动选择合适的 LLM 模型

model-health-check

33
from aAAaqwq/AGI-Super-Team

检查已配置模型供应商的连通性、延迟和可用性,用于快速诊断模型侧故障。

model-fallback

33
from aAAaqwq/AGI-Super-Team

模型自动降级与故障切换。当主模型请求失败、超时、达到速率限制或配额耗尽时,自动切换到备用模型,确保服务连续性。支持多供应商、多优先级的智能模型选择,提供健康监控、自动重试和错误恢复机制。

linux-troubleshooting

33
from aAAaqwq/AGI-Super-Team

Linux system troubleshooting workflow for diagnosing and resolving system issues, performance problems, and service failures.

linux-service-triage

33
from aAAaqwq/AGI-Super-Team

Diagnoses common Linux service issues using logs, systemd/PM2, file permissions, Nginx reverse proxy checks, and DNS sanity checks. Use when a server app is failing, unreachable, or misconfigured.

cron-model-migration

33
from aAAaqwq/AGI-Super-Team

Safely change models for OpenClaw cron jobs without leaving behind session/model mismatch errors. Use when creating or editing cron jobs with `payload.model`, when moving a job between models/providers, when diagnosing `LiveSessionModelSwitchError`, or when deciding whether a cron should run in `sessionTarget: "isolated"`, `"current"`, `"main"`, or a custom persistent session.

agent-model-switcher

33
from aAAaqwq/AGI-Super-Team

批量查看和切换子 agent 的模型配置,用于统一调整多 agent 的 provider/model 设置。

wemp-operator

33
from aAAaqwq/AGI-Super-Team

> 微信公众号全功能运营——草稿/发布/评论/用户/素材/群发/统计/菜单/二维码 API 封装

Content & Documentation