From token-optimizer
Audits token waste in agent systems like Claude Code, OpenClaw, Hermes, OpenCode. Detects idle burns, model misrouting, config bloat, and OpenClaw security issues with monthly dollar savings estimates. Use for multi-agent cost reviews.
npx claudepluginhub alexgreensh/token-optimizer --plugin token-optimizerThis skill uses the workspace's default tool permissions.
Detects installed agent systems, collects token usage data, identifies waste patterns, and recommends fixes with dollar savings estimates. Everyone tracks. Nobody coaches. Until now.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Automates semantic versioning and release workflow for Claude Code plugins: bumps versions in package.json, marketplace.json, plugin.json; verifies builds; creates git tags, GitHub releases, changelogs.
Detects installed agent systems, collects token usage data, identifies waste patterns, and recommends fixes with dollar savings estimates. Everyone tracks. Nobody coaches. Until now.
Use when: Running multiple agent systems, spending $2-5/day on agents, suspecting idle heartbeats are burning tokens, or want a cross-system cost audit.
FLEET_PY=""
for f in "$HOME/.claude/skills/fleet-auditor/scripts/fleet.py" \
"$HOME/.claude/plugins/cache"/*/token-optimizer/*/skills/fleet-auditor/scripts/fleet.py; do
[ -f "$f" ] && FLEET_PY="$f" && break
done
[ -z "$FLEET_PY" ] && { echo "[Error] fleet.py not found. Is Fleet Auditor installed?"; exit 1; }
echo "Using: $FLEET_PY"
Use $FLEET_PY for all subsequent fleet.py calls.
python3 $FLEET_PY detect --json
Parse the JSON output. Report what was found.
If nothing detected, explain: "No agent systems found. Fleet Auditor supports: Claude Code, OpenClaw, NanoClaw, Hermes, OpenCode, IronClaw."
Collect token usage data from detected systems:
python3 $FLEET_PY scan --days 30
Report how many runs were collected per system. If this is the first scan, it may take a moment to parse all session files.
Run waste pattern detection:
python3 $FLEET_PY audit --json
Parse the JSON output. Present findings ordered by severity and monthly savings.
If no waste found: "Your fleet looks clean. No significant waste patterns detected."
OpenClaw Security + Cost Check (March 2026):
openclaw config set security.rateLimit.enabled true[Fleet Auditor Results]
SYSTEMS DETECTED
- Claude Code: X runs ($Y.YY)
- OpenClaw: X runs ($Y.YY)
WASTE PATTERNS FOUND
1. [SEVERITY] Description
Est. savings: $X.XX/month
Fix: recommendation
2. [SEVERITY] Description
...
TOTAL POTENTIAL SAVINGS: $X.XX/month
Ready to act? I can:
1. Show detailed fix snippets for each finding
2. Generate the fleet dashboard for visual analysis
3. Run /token-optimizer for deeper Claude Code optimization
If user wants visual analysis:
python3 $FLEET_PY dashboard
This generates ~/.claude/_backups/token-optimizer/fleet-dashboard.html and opens it in the browser.
For Claude Code specifically, offer /token-optimizer for full audit (CLAUDE.md, skills, MCP, hooks, etc.).
For other systems, show the fix snippets from the audit and guide the user through implementing them.
| Phase | Read |
|---|---|
| Adapter development | references/fleet-systems.md |
| Detector development | references/waste-patterns.md |
--days