Install
openclaw skills install @voronindenis5/tool-economyMinimize tool call overhead. Every tool call costs tokens and latency. This skill teaches agents to batch independent calls, avoid redundant reads, cache results within a session, prefer single powerful commands over multiple weak ones, and track a 'tool budget'.
openclaw skills install @voronindenis5/tool-economyEvery tool call is an expense. Spend wisely.
Tool Economy is a discipline for AI agents: treat each tool invocation as a
costed operation (tokens + latency) and minimize total overhead while preserving
correctness. The goal is not to avoid tool use — it is to make every call count.
Activate this skill whenever you are:
If two or more tool calls do not depend on each other's output, issue them in the same turn (parallel). Do not serialize calls that could run concurrently.
Bad (3 serial round-trips, 3x latency):
read_file(A) -> wait
read_file(B) -> wait
read_file(C) -> wait
Good (1 round-trip, 1x latency):
[ read_file(A), read_file(B), read_file(C) ] # one turn
See references/batching.md.
If you already read a file this session and it has not changed, do not read it
again. Track what you have seen. Prefer session_search or in-context memory
over a fresh fetch. If a file was modified by your own action, you already know
its new state — patch in place, don't re-read.
Treat the current session as a short-lived cache. The first expensive query (search, web fetch, build) populates it; subsequent identical needs reuse it. This does not mean stale data — invalidate when the underlying source changes (e.g. you edited the file you previously read).
read_file over a chain of cat, head, tailsearch_files (content mode) over manual grep + find + wcpatch over sed + awk + redirectweb_extract with 5 URLs over 5 separate fetchesgh repo clone over manually git init + git remote add + git pullEach "weak" command adds a full round-trip of tokens + latency for a sub-result you could have gotten in one call.
Before a multi-step task, estimate how many calls it should take, and compare
against reality during and after. The companion script
scripts/analyze_session.py computes:
Run it on any session log to see where you leaked budget.
| Situation | Anti-pattern | Economy pattern |
|---|---|---|
| Need N independent reads | N serial calls | 1 batched turn |
| Re-reading a static file | Fresh read_file | Reuse what's in context |
| Searching then counting | grep + find + wc | search_files(output_mode='count') |
| Editing 3 spots in a file | 3 terminal sed calls | 1 patch (or replace_all) |
| Fetching 5 pages | 5 web_extract calls | 1 call, urls=[...] |
| Unsure if data changed | Re-read "just in case" | Check mtime/hash, else reuse cache |
Before issuing a turn's tool calls, ask:
references/batching.md — deep dive on parallelizing tool callsreferences/budgeting.md — how to estimate and track a tool budgetreferences/antipatterns.md — catalog of wasteful patterns and fixesscripts/analyze_session.py — analyze a session log, report efficiency metricsscripts/sample_session.json — example input for the analyzerMIT © Denis Voronin