본문으로 건너뛰기
Skillpedia
기타81k · #1606

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-optimize/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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

  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 recommendation, calculate: current cost, projected cost after optimization, dollar savings, percentage reduction

  6. Search prior optimization patterns -- call mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search (ReasoningBank-routed; don't pass a namespace argument — pattern-* tools ignore it).

  7. Store the optimization pattern -- two paths:

    • Pattern store (typed, recommended): mcp__plugin_ruflo-core_ruflo__agentdb_pattern-store with type: 'cost-optimization'. Don't pass a namespace arg — ReasoningBank routes it; on bridge unavailability the fallback writes to the reserved pattern namespace with controller: '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 the cost-patterns namespace because memory_* is namespace-routed.
  8. 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> escalated
    

    The script wraps npx @claude-flow/cli hooks model-outcome -t ... -m ... -o ... with explicit-argv spawnSync so quoting is safe. Without this signal the router does not learn from cost-tracker's recommendations and the booster bypass rate (see cost-booster-route skill) does not improve over time. This is the typed equivalent of the legacy routing-outcomes namespace (see ruflo-intelligence ADR-0001 §"Neutral").

  9. 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬