cost-health
यह क्या करती है
यह स्किल एक साथ चार AI खर्च जाँच चलाती है और एक संयुक्त पास या फ़ेल नतीजा देती है। जो टीमें स्वचालित पाइपलाइन में एक ही खर्च गेट चाहती हैं, उनके लिए यह है।
कब इस्तेमाल करें
- ✓जब आप चाहते हों कि एक खर्च जाँच CI के चरण में चले।
- ✓जब आपको बजट, रफ़्तार, असामान्य सत्र और अनुमान को कवर करने वाला एक स्वास्थ्य नतीजा चाहिए।
- ✓जब AI खर्च असामान्य लगे तो आप चाहें कि बिल्ड विफल हो जाए।
Skill का लिंक
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-health/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे AI खर्च की एक समग्र स्वास्थ्य जाँच करके दीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल बजट, रफ़्तार, असामान्य सत्र और अनुमान की जाँचें एक साथ शुरू करती है। उनमें से सबसे ऊँचा एरर कोड लौटाती है और हर एक का छोटा सारांश दिखाती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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.
अक्सर पूछे जाने वाले सवाल
अनुमान वाली जाँच किस बात की जाँच करती है?
यह देखती है कि बजट 14 दिनों से कम में पूरा खर्च हो जाएगा या नहीं, जो डिफ़ॉल्ट है।
यह कौन सी जाँचें चलाती है?
बजट, खर्च की रफ़्तार, असामान्य सत्र और अनुमान, हर एक की अपनी डिफ़ॉल्ट सीमा के साथ।
क्या मैं सीमाएँ बदल सकता हूँ?
हाँ। विकल्पों से रफ़्तार की सीमा, असामान्य सत्रों की संख्या और बजट खत्म होने तक के दिनों की चेतावनी सेट की जा सकती है।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 81k
- रैंकिंग में स्थान
- #1602
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
agent-adaptive-coordinator
81kआपके एजेंट को काम बदलने पर AI एजेंटों के समूह को बाँटने और फिर से संतुलित करने में मदद करती है, और काम के हिसाब से लेआउट चुनती है।
agent-agent
81kआपके एजेंट को बड़े लक्ष्य को क्रमबद्ध कार्यों की योजना में बदलना सिखाती है, और स्थिति बदलने पर योजना फिर से बनाना भी।
agent-agentic-payments
81kAI खरीदारी के लिए खर्च के आदेश मैनेज करने में मदद करती है, जिसमें खर्च की सीमा, समय अवधि, व्यापारी नियम और signed मंज़ूरियाँ शामिल हैं।
agent-analyze-code-quality
81kआपके एजेंट को कोड की गुणवत्ता जाँचने में मदद करती है, बिना फ़ाइलें बदले code smells, technical debt और refactoring के सुझाव खोजकर।
मिलती-जुलती skills
blucli
394kयह आपके एजेंट को blu कमांड से Bluesound और NAD स्पीकर खोजने, चलाने, रोकने, समूह बनाने और वॉल्यूम बदलने में मदद करती है।
camsnap
394kयह आपके एजेंट को नेटवर्क कैमरों और लोकल webcam से स्नैपशॉट, छोटी क्लिप या मोशन इवेंट लेने में मदद करती है, जो आपने सेट किए हों।
eightctl
394kयह आपके एजेंट को Eight Sleep pod की जांच और नियंत्रण करने में मदद करती है, जिसमें तापमान, अलार्म और नींद की समय-सारणी शामिल हैं।