Claude Usage Analyzer for Openclaw

A powerful tool to track, analyze, and optimize your Claude Code token consumption and project costs.

singggggyee
v1.0.3
Apr 9, 2026
2
903
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install claude-usage-analyzer

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install claude-usage-analyzer using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Claude Usage Analyzer?

Claude Usage Analyzer is an open-source tool designed to provide transparency into how tokens are consumed during your Claude Code sessions. By parsing local session logs, this utility enables developers to identify which projects are driving costs and where inefficiencies lie. It is a critical addition to your collection of Openclaw Skills if you want to maintain control over your AI spend without compromising productivity. This tool helps you transform raw session data into actionable insights for better budget management.

Claude Usage Analyzer Use Cases

  • Monitoring daily or weekly token consumption across different coding projects.
  • Identifying high-cost sessions to understand which prompts consume the most tokens.
  • Auditing local Claude Code logs offline to ensure privacy and data security.
  • Exporting usage data in JSON format for custom reporting or integration into larger cost-management dashboards.

How Claude Usage Analyzer Works

  1. The tool scans the local file system for Claude Code session logs located in the projects directory.
  2. It parses individual .jsonl files to extract token counts for both input and output, along with session metadata.
  3. Data is aggregated by project name, time period, or specific session IDs based on the user commands issued via Openclaw Skills.
  4. Users receive a detailed breakdown of costs and usage patterns directly in the CLI or as structured JSON for further processing.

Claude Usage Analyzer Setup

To integrate this utility into your Openclaw Skills environment, ensure the CLI tool is installed on your local machine.

# Install the analyzer globally
npm install -g claude-usage-analyzer

# Verify installation by running a report
claude-usage-analyzer report --days 7

Claude Usage Analyzer Data Schema & Taxonomy

Field Description
session_id Unique identifier for a specific Claude Code session
tokens_in Total input tokens used in the session
tokens_out Total output tokens generated
project The directory or project name associated with the usage
cost Estimated cost based on model pricing models

Claude Usage Analyzer Advanced Features

  • Filter reports by custom day ranges for precise monthly or quarterly audits.
  • Deep-dive session analysis with a per-turn breakdown of token usage to spot prompt bloat.
  • Machine-readable JSON output mode for automated cost tracking and internal billing pipelines.
  • Full offline operation ensures that no sensitive session data or code snippets leave your local environment.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*