本文へスキップ
TakoAPI
スキル一覧に戻る

token-counter

mkhaytman87 作

Coding Agents & IDEs
540ダウンロード数はclawskills.shが公開している値です
2スター
1閲覧数
0件のいいねサインインするとこのスキルにいいねできます
—まだ評価がありません
あなたの評価

概要

Track and analyze OpenClaw token usage across main, cron, and sub-agent sessions with category, client, model.

説明

このスキルでできること

Parses local OpenClaw session transcripts, metadata, and cron definitions to produce token usage reports. Breaks down consumption by category, client, model, and tool across main, cron, and sub-agent sessions. Supports per-session drilldowns, time-range filters, and JSON export.

Reads directly from local transcript files rather than requiring a dashboard or external service, so reports reflect actual recorded usage with no data leaving the machine.

使いどころ

  • Check where tokens went over the past week
  • Get a per-tool breakdown before optimizing a cron job
  • Export a 30-day usage snapshot for cost review
  • Drill into a single session to find a token spike
  • Save daily snapshots to track usage trends over time

ワークフロー例

入力

User asks: show me a breakdown of token usage by tool and category for the last 7 days

エージェント
  1. 1

    Run token-counter with --period 7d and --breakdown tools,category

  2. 2

    Parser reads session transcripts from $OPENCLAW_DATA_DIR/agents/main/sessions/*.jsonl

  3. 3

    Attribution logic splits assistant-message tokens across tool calls in each message

  4. 4

    Aggregates counts by tool name and session category

出力

Console report listing token totals per tool and per category for the 7-day window

インストール

clawhub install mkhaytman87/token-counter

CLIコマンドを実行するか、Claude Code、Cursor、Codexなどお使いのコーディングエージェントにプロンプトを貼り付けてください。

リンク