ClawCache Free for Openclaw

ClawCache Free is a production-ready Python library designed to monitor LLM API expenditures and slash costs through automated SQLite-based caching.

abyousef739
v0.2.0
Feb 15, 2026
0
592
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install clawcache-free

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 clawcache-free 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 ClawCache Free?

ClawCache Free is a specialized utility within the ecosystem of Openclaw Skills designed to provide developers with granular control over their AI infrastructure spending. By acting as a middleware layer, it logs every token consumed across major providers like OpenAI, Anthropic, and Mistral, while simultaneously implementing a high-performance local cache.

The tool is engineered for efficiency, boasting a proven 58.3% cache hit rate in real-world scenarios. It allows developers to eliminate redundant API calls, ensuring that identical prompts result in zero-cost local retrievals. This makes it an essential asset for teams looking to scale their AI applications without linear cost growth.

ClawCache Free Use Cases

  • Reducing operational expenses for repetitive LLM tasks like Code Review and QA Support.
  • Monitoring multi-provider API spending (OpenAI, Anthropic, Mistral, Ollama) from a single CLI interface.
  • Accelerating application response times by retrieving results from a local SQLite cache.
  • Implementing precise token counting and cost logging for internal auditing and financial tracking.

How ClawCache Free Works

  1. The user installs the library and initializes the local SQLite-based caching system.
  2. Developers wrap their LLM interaction functions with the @async_monitor_cost decorator.
  3. When a request is made, the skill generates a composite cache key based on the prompt, model, and parameters (like temperature).
  4. The system checks the local database for an existing match; if found, it returns the cached content immediately.
  5. If the request is new, it executes the API call, logs the token usage and cost, and stores the response in the cache for future use.
  6. Users run the CLI command to generate detailed spending and efficiency reports.

ClawCache Free Setup

To get started with this Openclaw Skills integration, install the package via pip:

pip install clawcache

Configure your environment if you wish to change the default storage directory:

export CLAWCACHE_HOME=/path/to/cache

ClawCache Free Data Schema & Taxonomy

ClawCache organizes data locally using a structured SQLite database and standard file-based logging.

Storage Taxonomy

Component Type Description
Cache Database SQLite Stores composite keys (prompt+model+params) and response content.
Cost Logs Text/Log Records timestamped entries of token usage and dollar amounts.
Report Cache JSON/Internal Temporary storage for aggregating daily CLI statistics.

Cache Key Composition

  • Prompt: The primary input string.
  • Model: The specific LLM version (e.g., GPT-4 Turbo).
  • Params: Configuration settings like temperature or top_p.

ClawCache Free Advanced Features

  • Composite Cache Keys: High-fidelity matching that accounts for temperature and model parameters to prevent stale or incorrect retrievals.
  • Async Compatibility: Full support for asynchronous Python workflows, ensuring zero performance bottlenecks in production.
  • Concurrent-Safe Logging: Utilizes SQLite WAL (Write-Ahead Logging) and cross-platform file locking for data integrity in multi-threaded environments.
  • 2026 Pricing Integration: Pre-configured with the latest market rates for precise, real-time financial reporting.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*