token-optimizer

Reduce OpenClaw token usage through lazy context loading and cost-aware model routing.

5|1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/netanel-abergel/pa-skills --skill token-optimizer-netanel-abergel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: token-optimizer
Source: https://github.com/netanel-abergel/pa-skills/tree/main/skills/openclaw-token-optimizer
Command: npx skills add https://github.com/netanel-abergel/pa-skills --skill token-optimizer-netanel-abergel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

OpenClaw workflows often burn tokens and money by loading entire contexts, routing to expensive models, and refreshing caches too frequently. This skill provides strategies to reduce those costs through lazy context loading, smarter model routing, and optimized heartbeats.

Core Features & Use Cases

  • Lazy context loading and selective file access to trim prompt size and speed up responses.
  • Cost-aware model routing that selects the cheapest model tier based on task complexity.
  • Heartbeat optimization and token budgeting to minimize API calls and overspend.
  • Multi-provider guidance and native patches to tailor OpenClaw deployments at scale.

Quick Start

Run the token-optimizer to generate an optimized AGENTS.md and preview recommended context loading for a sample prompt.

Frequently Asked Questions about token-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce OpenClaw token usage and API costs?

Reduce OpenClaw token usage by optimizing context loading, applying cost-aware model routing, and adjusting heartbeat strategies to minimize unnecessary API calls and overspend.

What is lazy context loading and how does it speed up responses?

Lazy context loading selectively accesses files to trim prompt size, which reduces token consumption and speeds up model responses by loading only necessary context.

How do I route OpenClaw tasks to the cheapest model tier?

Route OpenClaw tasks to cheaper models by evaluating task complexity and applying cost-aware model routing strategies to select the most economical tier for the workload.

Can I track token budgets and optimize heartbeats in OpenClaw at scale?

Yes, you can track token budgets and optimize heartbeats at scale using native patches and multi-provider guidance tailored for large OpenClaw deployments.

What is the best way to generate an optimized AGENTS.md for OpenClaw?

The best way to generate an optimized AGENTS.md is to run the token-optimizer workflow, which previews recommended context loading for sample prompts to enable cost-aware decisions.

Does token-optimizer work with multi-provider OpenClaw deployments?

Yes, token-optimizer provides multi-provider guidance and native patches to tailor OpenClaw deployments, enabling cost-aware decisions across different infrastructure providers.