cost-health
Fungsinya
Skill ini menjalankan empat pemeriksaan biaya AI bersamaan dan memberi satu hasil lulus atau gagal gabungan. Skill ini untuk tim yang ingin satu gerbang biaya dalam alur otomatis.
Kapan dipakai
- βSaat Anda ingin satu pemeriksaan biaya berjalan dalam langkah integrasi berkelanjutan.
- βSaat Anda ingin satu hasil kesehatan yang mencakup anggaran, tren, pencilan, dan proyeksi.
- βSaat Anda ingin build gagal jika biaya AI terlihat tidak sehat.
Link skill
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-health/SKILL.mdSalin 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
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBerikan saya satu pemeriksaan kesehatan biaya keseluruhan untuk pengeluaran AI saya.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill memulai pemeriksaan anggaran, laju pengeluaran (burn), pencilan, dan proyeksi secara bersamaan. Skill mengembalikan kode error tertinggi di antara mereka dan mencetak ringkasan singkat untuk masing-masing.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
The four CI-gate skills (budget / burn / anomaly / projection) each answer
a different question. This skill composes them β runs all four IN PARALLEL,
returns max(exit_codes), prints a one-line summary per check.
| Subcheck | Question | Default threshold |
|---|---|---|
budget |
"Have we crossed the configured budget?" | HARD_STOP at 100% |
burn |
"Is daily burn accelerating?" | +100% vs prior-week mean |
anomaly |
"Is any specific session a >3.5Ο outlier?" | β₯1 outlier |
projection |
"When will we hit 100% of budget?" | <14 days |
Algorithm
Implementation: scripts/health.mjs.
- Spawn all four subcheck scripts in parallel (
Promise.alloverchild_process.spawn). - Each subcheck emits
--format json; parse and capture exit code. - Projection has no built-in exit code β synthesize one from
daysUntilReached[100%] < --alert-days-to-exhaust. - Final exit code =
max(subcheck exits). Any single failure fails the gate. - Print one-line summary per check + overall HEALTHY/UNHEALTHY badge.
CI integration
- name: Cost health gate
run: cost health --alert-acceleration 100 --alert-outliers 1
A single step covers four alert ladders. Before this skill you'd wire four separate gates that each duplicated the npx + memory-list overhead; now it's one shell-out (and the four subcheck npx calls run in parallel internally).
Customizing thresholds
# Quarterly review β stricter thresholds
cost health --alert-acceleration 50 --alert-outliers 1 --alert-days-to-exhaust 30
# Production drift gate β only fire on egregious changes
cost health --alert-acceleration 200 --alert-outliers 3 --alert-days-to-exhaust 7
# Skip the slow burn check during a smoke run
cost health --skip burn
Smoke transcript (5 healthy sessions, then add 1 outlier)
# Healthy
Overall: β HEALTHY (max exit code 0)
| Check | Status | Detail |
| budget | β | unknown β no budget configured |
| burn | β | delta within Β±100% |
| anomaly | β | 0 outliers β under threshold β₯1 |
| projection | β | no budget configured β skipping |
# After adding $5 outlier (vs $0.10 baseline)
Overall: β UNHEALTHY (max exit code 1)
| burn | β | ALERT 5163.2% acceleration: latest bucket $5.00 is 5163.2% above prior mean $0.095 |
| anomaly | β | ALERT 1 outlier (|z|>3.5) |
Skipping subchecks
cost health --skip burn,projection # only budget + anomaly
Useful when:
- A subcheck doesn't apply (no budget set β skip projection)
- A subcheck is too slow for fast-feedback contexts (smoke runs)
- A subcheck is being independently CI-gated already
Exit code semantics
| Exit | Meaning |
|---|---|
| 0 | All subchecks OK |
| 1 | At least one subcheck fired an alert (budget HARD_STOP, burn drift, anomaly outlier, projection imminent-exhaust) |
| 2 | A subcheck had a config/usage error (e.g. invalid CLI args propagated to a subscript) |
| 127 | A subcheck failed to launch (script missing, etc.) |
max() means the worst signal wins β exit 2 (config error) always dominates
exit 1 (alert), so you spot misconfigured pipelines before they masquerade
as healthy.
Pertanyaan umum
Apa yang diperiksa oleh pemeriksaan proyeksi?
Pemeriksaan ini mengecek apakah anggaran akan habis dalam kurang dari 14 hari, yang merupakan nilai default.
Pemeriksaan apa saja yang dijalankan?
Anggaran, laju pengeluaran, sesi pencilan, dan proyeksi, masing-masing dengan ambang default sendiri.
Bisakah saya mengubah ambangnya?
Bisa. Opsi tersedia untuk mengatur batas percepatan, jumlah pencilan, dan peringatan hari sampai habis.
Detail
Deskripsi asli dari pembuat
Composite CI gate β runs cost-budget-check + cost-burn + cost-anomaly + cost-projection in parallel and surfaces a single combined health status with max exit code. The operationally-useful entry point β one shell-out covers all four alert ladders.
repo: ruvnet/ruflo
Popularitas
- Bintang GitHub
- 81k
- Peringkat
- #1602
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
agent-adaptive-coordinator
81kMembantu agent Anda membagi dan menyeimbangkan kembali sekelompok agent AI saat beban kerja berubah, dengan memilih tata letak yang sesuai tugas.
agent-agent
81kMengajari agent Anda mengubah tujuan besar menjadi rencana tindakan yang berurutan, dan menyusun ulang rencana saat kondisi berubah.
agent-agentic-payments
81kMembantu agent Anda mengelola mandat belanja untuk belanja AI, dengan batas pengeluaran, jendela waktu, aturan merchant, dan persetujuan yang ditandatangani.
agent-analyze-code-quality
81kMembantu agent Anda meninjau kualitas kode, menemukan bau kode, utang teknis, dan ide refaktor tanpa mengubah berkas.
Skill serupa
blucli
394kMembantu agent Anda menemukan, memutar, menjeda, mengelompokkan, dan mengatur volume speaker Bluesound dan NAD lewat perintah blu.
camsnap
394kMembantu agent Anda mengambil foto, klip pendek, atau peristiwa gerakan dari kamera jaringan dan webcam lokal yang sudah Anda atur.
eightctl
394kMembantu agent Anda memeriksa dan mengendalikan perangkat Eight Sleep, termasuk suhu, alarm, dan jadwal tidurnya.