Перейти к содержимому
TakoAPI
Назад к навыкам

session-cost

от khaney64

Coding Agents & IDEs
1.7kЧисло загрузок по данным clawskills.sh
1Звёзды
0Просмотры
0 лайковВойдите, чтобы поставить лайк навыку
—Ещё нет оценок
Ваша оценка

Кратко

Analyze OpenClaw session logs to report token usage, costs, and performance metrics grouped by model.

Описание

Что делает этот навык

Reads OpenClaw session .jsonl log files and reports token usage, costs, and performance metrics grouped by agent and model. Supports filtering by agent name, provider, and time range. Output formats include plain text, JSON, compact table, and a Discord-friendly summary.

Aggregates costs and token counts across multiple agents and models in one command without needing to check each provider dashboard separately.

Когда его использовать

  • Checking total API spend across all agents for the past week
  • Comparing token costs between Anthropic and OpenAI providers
  • Generating a daily usage digest formatted for a Discord bot
  • Auditing how much a specific agent consumed during a debugging session
  • Exporting session cost data as JSON for further processing

Пример сценария

ВВОД

User asks: how much did I spend on Anthropic models in the last 24 hours?

АГЕНТ
  1. 1

    Run node scripts/session-cost.js --provider anthropic --offset 24h

  2. 2

    Scan ~/.openclaw/agents/ for all agent directories

  3. 3

    Read .jsonl session files matching the time and provider filters

  4. 4

    Group results by agent and model, compute token and cost totals

ВЫВОД

A breakdown of sessions, token counts, and dollar costs per agent and model for Anthropic usage in the past 24 hours

Установка

clawhub install khaney64/session-cost

Выполните команду CLI или вставьте промпт в Claude Code, Cursor, Codex — любой кодинг-агент, которым пользуетесь.

Ссылки