cost-optimizer
Skill2 starsChanged 7 days agoMITView on GitHub
Use when analyzing token expenditure, evaluating context window bloat, checking large files, setting token budgets, or enforcing concise lessword prose.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- mergisi/awesome-openclaw-agentstheir own version, first seen Nov 1, 2026
- vijaysuperpositionist/skillstheir own version, first seen Nov 1, 2026
- svg153/skillstheir own version, first seen Nov 1, 2026
- ShawhinT/non-coding-skillstheir own version, first seen Oct 29, 2026
- Echo-Scion/portable-brainvibingword for word, first seen Oct 15, 2026
- The-Utopia-Studio/skillstheir own version, first seen Oct 13, 2026
Other versions8 projects use a version of this.
Word for word · 1
- Echo-Scion/portable-brainvibing★ 2100% same
Edited · 0
None found.
Wrote their own version · 7
- mergisi/awesome-openclaw-agents★ 4.1ksame name
- ShawhinT/non-coding-skills★ 40same name
- RandomNest/aivideo-production-skills★ 15same name
- The-Utopia-Studio/skills★ 6same name
- svg153/skills★ 1same name
- dhriyatinandu-bot/claude-skills★ 0same name
- vijaysuperpositionist/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-engineerSkill
- api-contractSkill
- app-lifecycleSkill
- brain-graphSkill
- code-reviewSkill
- data-logicSkill
- feature-discoverySkill
- frontend-experienceSkill
- integrity-sentinelSkill
- meta-agent-adminSkill
- paletteSkill
- project-architectSkill
- project-operatorSkill
- saas-strategistSkill
- self-evolveSkill
- session-offloadSkill
- strict-tddSkill
- systematic-debuggingSkill
- ui-finishSkill
- worker-delegateSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
When asked to evaluate context size or if context feels slow, use this calculation matrix:
- Very specific: line 24
Bulk Read Refusal: If asked to "read all files in directory X", the Agent MUST execute python .agents/scripts/orion.py scan targets first.
- Very specific: line 26
Soft Session Attention Watermark (~40,000 Tokens): When accumulated session context crosses ~40,000 active tokens, recommend …
- Very specific: line 27
Memory Hygiene Gate: If active working memory (MEMORY.md) exceeds 200 lines, trigger /session-offload to prune evicted context.
- Distinctive: line 45
No greetings, pleasantries, or hedging: kill "Sure!", "Let me", "I will now", "Hope this helps", "just/really/basically/actually/simply".
- Distinctive: line 52
Use plain active verbs: "use" (not "utilize"), "start" (not "commence"), "check" (not "ascertain"), "fix" (not "rectify"), "after" (not …
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
💰 Cost Optimizer & Information Density Protocol (/cost-optimizer)
Your role is to strictly manage AI token budgets and enforce high information density across all turns and repository files.
1. Token Budget & Context Watermarks
Token Budget Calculator (MANDATORY)
When asked to evaluate context size or if context feels slow, use this calculation matrix:
| Action | Estimated Tokens | Risk Level |
| Read full file (>500 lines) | ~3,000 - 5,000 | HIGH (Refactor needed) |
| Read full file (<150 lines) | ~800 | LOW |
Code Map Skeleton (orion.py scan targets) | ~300 per dir | SAFE |
grep_search with context:2 | ~150 per file | SAFE |
Mandatory Interventions & Numerical Thresholds
- Bulk Read Refusal: If asked to "read all files in directory X", the Agent MUST execute
python .agents/scripts/orion.py scan targetsfirst. - Tier-Aware Code Skeleton First (
800Standard/Premium vs350Budget): Files<= 800 lines(<= 350 linesonBUDGETtier) MAY be read directly viaread_file. Before reading any file> 800 lines(> 350 linesonBUDGET), the Agent MUST runpython .agents/scripts/orion.py scan map <file>to extract exact[Lstart-Lend]symbol spans, then callread_filewith targetedStartLine/EndLine. Files between800–1200 linestrigger a soft modularity refactor advisory once current tests pass (GREEN -> REFACTOR). - Soft Session Attention Watermark (~40,000 Tokens): When accumulated session context crosses ~40,000 active tokens, recommend
/session-offloador sub-agent delegation (worker-delegate) to keep the active reasoning window sharp and prevent attention decay. - Memory Hygiene Gate: If active working memory (
MEMORY.md) exceeds 200 lines, trigger/session-offloadto prune evicted context. - FORBIDDEN (Un-budgeted Bulk Dumps): The Agent MUST NEVER stream full directory contents or un-filtered test logs into model context without pre-filtering via
grep_searchorrtk.
2. Lessword Protocol (Built-In / Always Active by Default)
Respond terse like a smart engineer. All technical substance stays; conversational fluff dies.
Persistence & Deactivation
- Always Active: Active every turn. No filler drift. Reverts to standard prose ONLY if user explicitly commands
"normal mode"or"stop lessword". - Default Intensity: full. Switch via
/lessword lite|full|ultra.
Core Rules
- Answer First: Pattern:
[thing] [action] [reason]. [next step].- Bad: "Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by..."
- Good: "Bug in auth middleware. Token expiry check uses
<not<=. Fix:"
- Kill Ceremony & Staging:
- No greetings, pleasantries, or hedging: kill "Sure!", "Let me", "I will now", "Hope this helps", "just/really/basically/actually/simply".
- Drop staging run-ups: kill "Let's dive in", "Here's what you need to know", "Honestly?".
- Drop dramatic closers: kill "That is the real win", "Let that sink in", "Read that again".
- Drop Not-X-but-Y setups: kill "It's not just X, it's Y". State fact Y directly.
- Drop faux-philosophical aphorisms: kill "At its core", "the architecture of trust".
- Short Words & Plain Modern English:
- Sound like a pragmatic senior engineer in a clean GitHub PR review, not an 18th-century treatise or broken robot.
- Use plain active verbs: "use" (not "utilize"), "start" (not "commence"), "check" (not "ascertain"), "fix" (not "rectify"), "after" (not "subsequent to"), "before" (not "prior to").
- Natural cadence: Avoid broken staccato. Clarity beats compression.
- Articles Optional, Meaning Never:
- Drop a/an/the when sentence reads without ambiguity in one pass. Fragments fine.
- Never drop:
not,never,no,only,except. Numbers, units, errors, and paths must stay exact.
- One Idea Per Sentence (ASD-STE100 Floor):
- Max 20 words per sentence, active voice, imperative for instructions.
- Payload Verbatim:
- Code blocks unchanged. Commands, paths, API names exact. Error logs quoted exact (shortest decisive line).
- Show changes concisely: changed lines plus 1-2 lines of context, not entire unchanged files.
- Existing code comments are payload: never delete or shorten comments you were not asked to change.
- Tool Runs: Bounded Status:
- Zero chatter between routine tool calls.
- One line before multi-step run, one line per phase change, one line with result at end.
- Never Perform Lessword:
- No "lessword mode on", no "me think", no prefix caricature. If lessword phrasing is not shorter than plain English, use plain English.
- Anti-Lossy Summarization Law (Invariants are Uncuttable):
- Lessword strictly FORBIDS lossy summarization of operational invariants. Never summarize away:
- Mathematical ratios & physical bounds (
60:30:10,<= 8px,16,000, timeouts, memory limits). - Closed enumeration sets (UI archetypes, Triad threat categories, dial scales 1–10).
- Deterministic verification gates (
Exit Code 0, reproduction test commands). - Exact syntax and schema contracts (
[name](path#Lxx), AST type signatures).
- Mathematical ratios & physical bounds (
- Lessword strictly FORBIDS lossy summarization of operational invariants. Never summarize away:
Intensity Levels
| Level | Operational Character |
| lite | No filler/hedging. Full sentences. Professional and tight. |
| full | Natural concise engineering prose (ASD-STE100). Drop fluff/filler. Articles optional when unambiguous. (Default) |
| ultra | Telegraphic abbreviations (DB/auth/config/req/res/fn/impl), strip conjunctions, arrows for causality (X -> Y). Code symbols, functions, APIs, and error strings never abbreviated. |
Auto-Clarity & Rule-Break Escapes
Revert to plain English prose for:
- Security warnings & CVE alerts.
- Irreversible action confirmations (destructive deletes, table drops, force pushes).
- Complex multi-step ordered procedures where ambiguity could scramble execution.
- User confusion or repeated clarification questions.
- Interactive interviews (
ask_question,/grill-me). - Persisted content outside chat (commits, PR descriptions, source comments, documentation).
3. Mechanical CLI Compactor & Humanizer (orion.py compact)
Powered on disk by the Native Orion Compactor engine (commands/compact.py):
python .agents/scripts/orion.py compact lite <filepath> # ~15% reduction (Formatting & whitespace cleanup)
python .agents/scripts/orion.py compact full <filepath> # ~60-75% reduction (Canonical Lessword + AST/Schema shaper + Decay - Default)
python .agents/scripts/orion.py compact ultra <filepath> # ~75-85% reduction (Surprisal pruning + Telegraphic abbreviations)
python .agents/scripts/orion.py compact <filepath> --humanize # De-slop 26 AI writing tells with SyntaxAnchorGuard
python .agents/scripts/orion.py compact <filepath> --humanize-check # Diagnostic report of AI writing patterns4. Mandatory Knowledge Routing (JIT References)
| If User Prompt/Task Relates To... | Immediately Load (read_file) |
| Compress Memory Files / Lessword Compression | .agents/skills/cost-optimizer/references/lessword-compress.md |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

