Langsung ke konten
Skillpedia
Lain-lain81k Β· #1606

cost-optimize

Fungsinya

Skill ini meninjau pemakaian AI Anda baru-baru ini per agent dan per model, lalu menunjukkan bagian mana yang bisa dihemat. Skill ini untuk orang yang ingin pemangkasan biaya praktis dengan perkiraan penghematan kasar.

Kapan dipakai

  • βœ“Saat biaya AI Anda lebih tinggi dari yang Anda perkirakan.
  • βœ“Saat Anda ingin tahu apakah tugas sederhana berjalan di model yang mahal.
  • βœ“Saat Anda ingin daftar pemangkasan biaya yang diurutkan menurut perkiraan penghematan.

Link skill

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-optimize/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-optimize/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBiaya AI saya naik minggu ini. Di mana saya bisa berhemat?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill memuat catatan pemakaian seminggu terakhir dan memeriksa apakah setiap agent memakai model yang sesuai dengan tugasnya. Skill juga melihat penggunaan ulang cache dan pekerjaan yang tumpang tindih, lalu memperkirakan penghematan untuk setiap saran.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum

Apakah skill akan mengubah model saya secara otomatis?

Tidak. Skill memberi rekomendasi dengan perkiraan penghematan, dan Anda yang memutuskan apa yang diubah.

Apa itu tingkat cache hit?

Itu adalah porsi konten berulang yang bisa digunakan ulang AI dari cache-nya. Angka tinggi berarti biaya lebih rendah.

Bisakah skill belajar dari perubahan sebelumnya?

Bisa. Skill mencari catatan optimasi sebelumnya untuk memakai ulang yang sudah terbukti berhasil.

Detail

Deskripsi asli dari pembuat

Analyze token usage patterns and recommend cost optimizations with estimated savings

repo: ruvnet/ruflo

Popularitas

Bintang GitHub
81k
Peringkat
#1606
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa