cost-optimize
하는 일
이 스킬은 최근 에이전트와 모델별 AI 사용 기록을 검토해 돈이 새는 곳을 짚어 냅니다. 대략적인 절감 추정치와 함께 실용적인 비용 절감 방법을 찾고 싶은 사람을 위한 스킬입니다.
사용하는 경우
- ✓AI 비용이 예상보다 많이 나왔을 때.
- ✓단순한 작업이 비싼 모델로 실행되고 있는지 알고 싶을 때.
- ✓예상 절감액 순으로 비용 절감 항목 목록을 받고 싶을 때.
스킬 링크
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-optimize/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이번 주 AI 비용이 갑자기 늘었어요. 어디서 돈을 아낄 수 있을까요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 지난 일주일의 사용 기록을 불러와 각 에이전트가 작업에 맞는 모델을 쓰는지 확인합니다. 캐시 재사용과 중복 작업도 살펴보고, 각 제안의 절감액을 추정합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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
Load usage data -- call
mcp__plugin_ruflo-core_ruflo__memory_searchon thecost-trackingnamespace (last 7 days). Thememory_*tools route by namespace; use them — notagentdb_hierarchical-*(which routes by tier).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
Check cache rates -- compute cache hit rate per agent; if below 60%, recommend enabling or improving prompt caching (90% cost reduction on cache reads)
Detect redundancy -- look for multiple agents performing overlapping tasks, or agents being spawned for work that could be batched
Estimate savings -- for each recommendation, calculate: current cost, projected cost after optimization, dollar savings, percentage reduction
Search prior optimization patterns -- call
mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search(ReasoningBank-routed; don't pass anamespaceargument — pattern-* tools ignore it).Store the optimization pattern -- two paths:
- Pattern store (typed, recommended):
mcp__plugin_ruflo-core_ruflo__agentdb_pattern-storewithtype: 'cost-optimization'. Don't pass anamespacearg — ReasoningBank routes it; on bridge unavailability the fallback writes to the reservedpatternnamespace withcontroller: 'memory-store-fallback'(see ruflo-agentdb ADR-0001). - Plain store (namespace-routable):
mcp__plugin_ruflo-core_ruflo__memory_store --namespace cost-patterns— this DOES respect thecost-patternsnamespace becausememory_*is namespace-routed.
- Pattern store (typed, recommended):
Close the routing feedback loop — auto-emit
hooks_model-outcome-- for each downgrade recommendation, format the outcome-emit command as part of the recommendation table so it can be run directly:# success path (downgrade worked) node plugins/ruflo-cost-tracker/scripts/outcome.mjs "<task-description>" <model> success # escalated path (had to upgrade after downgrade attempt) node plugins/ruflo-cost-tracker/scripts/outcome.mjs "<task-description>" <model> escalatedThe script wraps
npx @claude-flow/cli hooks model-outcome -t ... -m ... -o ...with explicit-argvspawnSyncso quoting is safe. Without this signal the router does not learn from cost-tracker's recommendations and the booster bypass rate (seecost-booster-routeskill) does not improve over time. This is the typed equivalent of the legacyrouting-outcomesnamespace (see ruflo-intelligence ADR-0001 §"Neutral").Report -- display: ranked recommendations with savings estimate, total potential savings, implementation priority (quick wins first), and any model-outcome events emitted in step 8
CLI alternative
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-patterns
자주 묻는 질문
모델을 자동으로 바꾸나요?
아닙니다. 예상 절감액과 함께 권장 사항을 제시하며, 무엇을 바꿀지는 사용자가 정합니다.
캐시 적중률이란 무엇인가요?
AI가 캐시에서 재사용할 수 있었던 반복 콘텐츠의 비율입니다. 이 값이 높으면 비용이 줄어듭니다.
과거 변경 사항에서 배울 수 있나요?
네. 이전 최적화에서 저장된 메모를 검색해 전에 효과가 있었던 방법을 다시 활용합니다.
상세 정보
작성자의 원본 설명
Analyze token usage patterns and recommend cost optimizations with estimated savings
repo: ruvnet/ruflo
인기도
- GitHub 스타
- 81k
- 순위
- #1606
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
agent-adaptive-coordinator
81k작업량이 바뀔 때 에이전트 무리를 나누고 재배치해, 작업에 맞는 배치를 고르도록 에이전트를 돕습니다.
agent-agent
81k큰 목표를 순서가 있는 행동 계획으로 나누고, 조건이 바뀌면 다시 계획하도록 에이전트를 가르칩니다.
agent-agentic-payments
81kAI 쇼핑을 위한 지출 위임장을 관리합니다. 지출 상한, 시간 창, 판매자 규칙, 서명된 승인을 포함합니다.
agent-analyze-code-quality
81k에이전트가 파일을 바꾸지 않고, 코드 품질 문제와 코드 냄새, 기술 부채, 리팩터링 아이디어를 찾아 검토하도록 돕습니다.