A technical cost analysis tool for OpenClaw that optimizes token consumption and LLM spending through detailed usage reports.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install openclaw-cost-analyzer
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install openclaw-cost-analyzer using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
The OpenClaw Cost Optimizer is a specialized utility designed for developers using Openclaw Skills to monitor and reduce API expenditures. It processes session logs to provide a transparent view of input and output tokens across different models like Claude Opus and Sonnet. By identifying inefficient workflows, it helps users maintain sustainable AI operations without sacrificing performance.
This tool is built with a privacy-first approach, operating entirely on local Node.js scripts without external network dependencies. It serves as a financial audit layer for your AI agent workspace, ensuring that every token spent contributes to meaningful progress.
Navigate to your skill directory and run the analyzer script directly with Node.js:
# Run a full analysis for the last 7 days
node scripts/cost_analyzer.js analyze
# Run analysis for a specific timeframe (e.g., 30 days)
node scripts/cost_analyzer.js analyze 30
# Get a quick summary of today's costs
node scripts/cost_analyzer.js quick
The skill organizes analysis data by parsing session JSONL files and generating a report with the following structure:
| Attribute | Description | Data Type |
|---|---|---|
| inputTokens | Total tokens sent in the request | Integer |
| outputTokens | Total tokens received in the response | Integer |
| model | The specific AI model identifier used | String |
| sessionId | Unique ID for the specific agent interaction | String |
| cost | Calculated USD based on provider pricing | Float |
Loading
A dedicated cost analysis and optimization utility for OpenClaw that identifies high token consumption and provides actionable strategies to reduce AI expenses.

A professional-grade financial tracking skill for developers and creators to monitor revenue, expenses, and ROI across diverse platforms.

A specialized CLI tool that automates the discovery of bug bounty and open-source rewards across 50+ platforms.

A lightweight, dependency-free semantic search utility for indexing and querying local Openclaw memory files.

A beautiful terminal-based dashboard for real-time tracking of hardware resources, Openclaw gateways, and AI model quotas.

A powerful utility for automating secret management and secure authentication via the 1Password command-line tool.








































