Skill Cost for Openclaw

A specialized analysis tool for auditing token consumption and financial costs associated with individual agent skills.

dzwalker
v0.1.0
Mar 8, 2026
1
983
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install skill-cost

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 skill-cost 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 Skill Cost?

Skill Cost is a powerful utility designed for developers who need to monitor the financial impact of their AI agents. By analyzing local session logs, it provides a granular view of how different Openclaw Skills contribute to total token usage and costs. This local-first approach ensures privacy and speed, requiring no external API keys to function.

The skill is particularly effective for teams using multiple Openclaw Skills who want to identify bottlenecks or high-cost operations within their autonomous workflows. It transforms raw log data into actionable insights, helping users make informed decisions about model selection and skill implementation.

Skill Cost Use Cases

  • Auditing specific Openclaw Skills to see which ones are the most expensive.
  • Generating cost reports for the last 7 days or since a specific date for budgeting.
  • Identifying token-heavy skills to optimize prompt engineering or tool selection.
  • Programmatic expense tracking using the JSON output mode for custom dashboards.

How Skill Cost Works

  1. Accesses the local file system to scan OpenClaw session JSONL files within the agent directories.
  2. Parses assistant messages to identify tool calls and their associated token counts.
  3. Correlates usage to specific Openclaw Skills based on shell command paths and internal tool metadata.
  4. Aggregates data by skill name, model type, and date to calculate total USD spending based on current pricing.

Skill Cost Setup

Install the package via your agent's skill management interface. Because this is a bash-driven tool, ensure your agent has permission to execute shell commands. You can initiate a report using the following syntax:

bash ~/.openclaw/workspace/skills/skill-cost/skill-cost.sh report

To view top-ranked skills by spend:

bash ~/.openclaw/workspace/skills/skill-cost/skill-cost.sh ranking

Skill Cost Data Schema & Taxonomy

The tool processes logs from ~/.openclaw/agents/*/sessions/. Data is presented in the following structure:

Attribute Description
Skill Name The unique identifier for the Openclaw Skills being tracked.
Token Count The total number of input and output tokens consumed.
Cost (USD) The calculated expense based on model-specific token rates.
Model Breakdown A sub-report showing costs per specific LLM model used.

JSON output provides a machine-readable array of these metrics for integration into other Openclaw Skills.

Skill Cost Advanced Features

  • Proportional token splitting for messages that involve multiple Openclaw Skills.
  • Historical comparison mode to track spend evolution between two different skills.
  • Deep-dive detail mode to inspect the exact session triggers for a specific skill's usage.
  • Automatic classification of non-skill costs into (built-in) or (conversation) categories for full transparency.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*