cost-optimize
Analyze token usage patterns and recommend cost optimizations with estimated savings
npx skills add ruvnet/ruflo --skill cost-optimize --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Cost Optimize Analyze recent token usage across agents and models, identify waste, and recommend specific optimizations with estimated dollar savings. ## When to use When costs are higher than expected or you want to proactively reduce spending. Analyzes model selection efficiency, cache utilization, agent redundancy, and prompt efficiency. ## Steps 1. **Load usage data** -- call `mcp__plugin_ruflo-core_ruflo__memory_search` on the `cost-tracking` namespace (last 7 days). The `memory_*` tools route by namespace; use them — not `agentdb_hierarchical-*` (which routes by tier). 2. **Analyze model fit** -- for each agent, assess whether the model tier matches task complexity: - Agents doing simple tasks (formatting, linting) on Sonnet/Opus → suggest Haiku or Agent Booster - Agents doing complex tasks (architecture, security) on Haiku → flag quality risk 3. **Check cache rates** -- compute cache hit rate per agent; if below 60%, recommend enabling or improving prompt caching (90% cost reduction on cache reads) 4. **Detect redundancy** -- look for multiple agents performing overlapping tasks, or agents being spawned for work that could be batched 5. **Estimate savings** -- for each rec
- When to use
- Steps
- CLI alternative
node plugins/ruflo-cost-tracker/scripts/outcome.mjs "<task-description>" <model> success
node plugins/ruflo-cost-tracker/scripts/outcome.mjs "<task-description>" <model> escalated
npx @claude-flow/cli@latest memory search --query "cost optimization strategies" --namespace cost-patterns
npx @claude-flow/cli@latest memory store --key "opt-2026-05-04" --value '{...}' --namespace cost-patternsWhat does the cost-optimize skill do?
Analyze token usage patterns and recommend cost optimizations with estimated savings
How do I install it?
Run `npx skills add ruvnet/ruflo --skill cost-optimize --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ruvnet/ruflo, a repository with 67,015 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.