Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Cost Optimizer

skill · mergisi/awesome-openclaw-agentsMIT licenceAudited 11 Oct 2026 · source 3dd7696fb032

★ 4,002pushed 15 days ago
✓SAFEGrade B · 89/100 · 11 Oct 2026 · 3dd7696
4,002repo stars · whole mergisi/awesome-openclaw-agents

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 3dd7696fb032 and found no filesystem, network or shell access and no hard-coded secrets. What it does: Trigger when the user asks to audit Claude Code costs, reduce token spend, says "my Claude bill is too high", "optimize my CLAUDE.md", "why is this project burning tokens", or "/cost-optimizer". Scans a project for the…

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Cost Optimizer (mergisi/awesome-openclaw-agents)”. Retrieved 11 Oct 2026. https://modelsatlas.com/skills/mergisi/cost-optimizer

Trust audit

Audit 0.4.1 · source read 11 Oct 2026

Trust score89/100✓SAFE B
0 critical0 high0 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeNA0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (0)

No findings at any severity. We re-audit when the source changes.

Audit 0.4.1 · source sha 3dd7696fb032 · 11 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

  • Publishermergisi GitHub userOwner of the repository this skill is read from
  • Source foldermergisi/awesome-openclaw-agents/skills/claude/cost-optimizerThe exact folder we audited
  • LicenceMITAs the repository states it
  • Commit pinned for this verdict3dd7696fb032A new audit runs when the source changes
  • Repository statusNot archivedLast push 15 days ago
  • Sandboxed runNot runSkills are read, not executed; layer L4 is skipped

What it tells the agent

Full source on GitHub ↗

Its description: Trigger when the user asks to audit Claude Code costs, reduce token spend, says "my Claude bill is too high", "optimize my CLAUDE.md", "why is this project burning tokens", or "/cost-optimizer". Scans a project for the…

---
name: cost-optimizer
description: Trigger when the user asks to audit Claude Code costs, reduce token spend, says "my Claude bill is too high", "optimize my CLAUDE.md", "why is this project burning tokens", or "/cost-optimizer". Scans a project for the common Claude Code cost leaks and returns a prioritized fix list.
---

# Cost Optimizer

Audit a project's Claude Code setup for the handful of well-known cost leaks and output a prioritized remediation list. This is a static inspection — no pricing API calls, no guesswork about past spend.

## When to use

- "My Claude Code bill doubled this month — what's going on?"
- "Audit this project for token waste"
- "Why is my session context always huge?"
- Post-mortem after a runaway agent run

## What to check

Run each check and record `PASS` / `WARN` / `FAIL` with a short note.

### 1. CLAUDE.md size

```bash
wc -l CLAUDE.md .claude/CLAUDE.md 2>/dev/null
```

- **PASS:** under 100 lines
- **WARN:** 100-300 lines
- **FAIL:** >300 lines — this is prepended to every message, so every line costs tokens forever.

Fix: move reference material (API keys, runbooks, verbose examples) into skill files or `docs/`, and leave CLAUDE.md as a thin pointer.

### 2. Memory file bloat

```bash
find ~/.claude/projects -name 'MEMORY.md' -exec wc -l {} \;
find .claude/memory -type f -exec wc -l {} \; 2>/dev/null
```

- **WARN** if any memory file is >500 lines.
- **FAIL** if >1500 lines — memory should be a curated index with links to detail files, not a dump.

Fix: extract old sections into `memory/<topic>.md` detail files and link from the index.

### 3. Unused or shadowed skills

```bash
ls ~/.claude/skills/ .claude/skills/ 2>/dev/null
```

- Cross-reference with the skill invocations in the last 30 days of shell history or session logs if available.
- Skills that have never been invoked but have huge `SKILL.md` bodies (>300 lines) are loaded into the skill index every turn — prune them.

### 4. Subagent fan-out patterns

Grep the project for Task/agent launch patterns:

```bash
grep -rn 'TaskCreate\|subagent\|parallel.*agent' --include='*.md' --include='*.js' --include='*.ts' .
```

- **WARN** if the repo spawns >5 parallel subagents per run without aggregation — each spins up its own context window.
- **FAIL** if subagents re-read the whole repo instead of receiving a scoped prompt.

Fix: pass a short brief + a handful of file paths to each subagent, not the entire CLAUDE.md context.

### 5. Prompt cache hygiene

Look for `.claude/settings.json` and check if the project sets an unusually short cache TTL, or if hooks invalidate the cache every message (e.g. a hook that echoes a timestamp into the system prompt).

- **FAIL** any hook that injects `date` / `uuidgen` / random content into every turn — it kills the cache, 10x cost.

### 6. Model selection

Grep for explicit model pins:

```bash
grep -rn 'opus\|sonnet\|haiku\|claude-3\|claude-4' .claude/ CLAUDE.md 2>/dev/null
```

- **WARN** if Opus is pinned for routine tasks that Sonnet could handle. Recommend the `/model-cost-compare` skill for a per-task estimate.

### 7. Session file size

```bash
du -sh ~/.claude/projects/*/sessions 2>/dev/null | sort -h | tail -5
```

Huge session dirs suggest you never `/compact` long-running threads. Suggest periodic compaction.

## Output format

Print a ranked list. Top of the list = biggest win per effort.

```
Cost Optimizer — <project>

Priority 1 (FAIL)
  [CLAUDE.md]      412 lines — prepended every turn. Extract sections into skills/.
  [cache hygiene]  .claude/settings.json hook injects `date +%s` on SessionStart. Remove it.

Priority 2 (WARN)
  [memory]         MEMORY.md is 820 lines. Index top, details linked.
  [model pinning]  Opus 4.6 pinned in 4 skill files — 2 could drop to Sonnet 4.6.

Priority 3 (nice-to-have)
  [skills]         3 skills (haiku-card, foo, bar) never invoked in last 30 days.

Estimated impact: roughly halving per-turn overhead — validate with a before/after /cost check.
```

Do not invent dollar savings. You can estimate relative impact ("~30% smaller context") but not absolute currency unless the user provides their current bill.

## Example invocations

- `/cost-optimizer`
- "Audit this project for Claude Code cost waste"
- "My CLAUDE.md feels too big — what should I cut?"
- "Why is my prompt cache missing every turn?"

Excerpt, first 4,353 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 3dd7696

Download folder ↗
git clone https://github.com/mergisi/awesome-openclaw-agents
git -C awesome-openclaw-agents checkout 3dd7696fb032

The author documents no install command, so this uses the repository directly. Our verdict covers commit 3dd7696fb032 only.

Works in which agents?

What its own text says, not a test

AgentStatusMore
Claude CodeMentioned in its text, not testedSkills for Claude Code · About Claude Code
“Mentioned” means the skill’s text names the agent. We have not run it there.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source 3dd7696fb032

README badge

For maintainers · shows the latest audit

ModelsAtlas: SAFE BMODELSATLASSAFE · B
[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/mergisi/cost-optimizer/badge.svg)](https://modelsatlas.com/skills/mergisi/cost-optimizer/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

Add this badge to your README

[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/mergisi/cost-optimizer/badge.svg)](https://modelsatlas.com/skills/mergisi/cost-optimizer/)

Questions about Cost Optimizer

What does the Cost Optimizer skill do?
162 production-ready AI agent templates for OpenClaw. SOUL.md configs across 19 categories. Submit yours!
Is Cost Optimizer safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Cost Optimizer access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does Cost Optimizer work with?
Its documentation mentions claude-code. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (3dd7696fb032), read on 2026-10-11. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.