본문으로 건너뛰기
TakoAPI
스킬로 돌아가기

tokenmeter

cheenu1092-oss 제작

Coding Agents & IDEs
1.2kclawskills.sh가 보고한 다운로드 수
0조회수
좋아요 0개로그인하면 이 스킬에 좋아요를 누를 수 있습니다
—아직 평가 없음
내 평가

요약

Track AI token usage and costs across providers.

설명

이 스킬이 하는 일

Tracks LLM token usage and calculates API-equivalent costs, storing all data locally in SQLite at ~/.tokenmeter/usage.db. Session files from OpenClaw and Claude Code are parsed to produce per-model cost breakdowns, including prompt cache read and write tokens. Shows how much a flat-rate subscription like Claude Max saves compared to pay-as-you-go API billing.

It accounts for prompt cache read and write tokens separately, which most cost calculators ignore, giving a more accurate API-equivalent spend figure.

사용 시점

  • Checking how much you spent on Claude this week
  • Comparing Claude Max plan value against API billing costs
  • Finding which models account for the largest share of spending
  • Monitoring daily token usage across multiple agent instances
  • Month-end billing reconciliation before the billing cycle closes

예시 워크플로

입력

User asks: how much did we spend this week?

에이전트
  1. 1

    Checks if tokenmeter is installed at ~/clawd/tokenmeter, clones and sets up the Python venv if missing

  2. 2

    Activates the venv and runs tokenmeter import --auto to pull in latest session files

  3. 3

    Runs tokenmeter costs --period week to get a per-model cost breakdown

  4. 4

    Parses output to extract totals and per-model percentages

  5. 5

    Responds with a plain-English summary including Max plan savings estimate

출력

Weekly API-equivalent cost broken down by model, with savings compared to the flat subscription cost

설치

clawhub install cheenu1092-oss/tokenmeter

CLI 명령을 실행하거나, 프롬프트를 Claude Code, Cursor, Codex 등 사용하는 코딩 에이전트에 붙여넣으세요.

링크