cost-federation
यह क्या करती है
यह स्किल हर जुड़े पीयर का खर्च एक घंटे, एक दिन और एक हफ़्ते के हिसाब से देखती है। जो लोग कई जुड़े सिस्टमों के साथ AI काम साझा करते हैं, उनके लिए यह है।
कब इस्तेमाल करें
- ✓जब आप AI काम किसी नए जुड़े पीयर के लिए खोलें और पहले आधार रेखा चाहिए।
- ✓जब आप दोहराई जाने वाली जाँच में हर पीयर का खर्च देखना चाहें।
- ✓जब आप जाँचना चाहें कि खर्च सीमा ज़्यादा खर्च करने वाले पीयर को पकड़ लेगी या नहीं।
Skill का लिंक
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-federation/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“पिछले एक दिन में, हर जुड़े पीयर ने मेरे कामों पर कितना खर्च किया है?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल एक साझा स्टोर से खर्च की घटनाएँ पढ़ती है और तीनों समय सीमाओं में हर पीयर का कुल जोड़ती है। फिर हर पीयर की तुलना डॉलर की सीमा से करती है और जो सीमा से ऊपर हैं उनकी रिपोर्ट देती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Cost Federation
ADR-097 Phase 3 specifies a federation_spend event bus that publishes one event per federation_send completion: {peerId, taskId, tokensUsed, usdSpent, ts}. Cost-tracker is the declared consumer — it aggregates per-peer rolling windows (1h / 24h / 7d) and the federation breaker queries that aggregate to suspend peers exceeding the configured threshold.
Phase 3 isn't landed upstream yet. This skill is the consumer-side wiring; it activates the moment upstream publishes events to the federation-spend namespace. Until then it reports cleanly with a "no events found" notice.
When to use
- Before opening federation traffic to a new peer — establish baseline.
- Periodically (e.g.
/loop 5m) to monitor per-peer spend across windows. - After ADR-097 Phase 2/3 lands — to verify breaker suspension reasoning.
Steps
Run the script:
node plugins/ruflo-cost-tracker/scripts/federation.mjsOptional env:
FED_FORMAT=json— JSON instead of markdownFED_NAMESPACE=federation-spend— override target namespaceFED_SUSPEND_THRESHOLD_USD=5.0— breaker threshold (ADR-097 default)
Inspect — per-peer 1h/24h/7d windows of count + USD spent, plus a "Suspension threshold check" block flagging peers over the breaker line.
Storage contract (consumer side)
When Phase 3 lands, events should be persisted to namespace federation-spend with key prefix fed-spend- and JSON value matching:
{
"peerId": "<peer-uuid>",
"taskId": "<task-uuid>",
"tokensUsed": 12345,
"usdSpent": 0.0287,
"ts": "2026-05-05T..."
}
The script reads any record matching that prefix, regardless of how upstream produces them. Multiple events per peer accumulate cleanly into the rolling-window sums.
Cross-references
- ADR-097: Federation budget circuit breaker — the complete spec
cost-report— same data, different lens (cost-report focuses on local agent spend; this skill on per-peer federated spend)ruflo-federationplugin — the producer side (when Phase 3 lands)
अक्सर पूछे जाने वाले सवाल
क्या यह अभी काम करती है?
सिर्फ़ तब, जब ऊपर का सिस्टम घटनाएँ प्रकाशित करना शुरू करे। तब तक यह रिपोर्ट करती है कि कोई घटना नहीं मिली।
डिफ़ॉल्ट सीमा क्या है?
स्रोत के अनुसार डिफ़ॉल्ट सीमा पाँच डॉलर है, और आप एक सेटिंग से इसे बदल सकते हैं।
जब कोई पीयर सीमा से ऊपर जाए तो क्या होता है?
उस पीयर को रिपोर्ट में चिह्नित किया जाता है। उसे रोकने का काम एक अलग ब्रेकर करता है जो यह डेटा पढ़ता है, यह स्किल नहीं।
जानकारी
लेखक का मूल विवरण
Consumer-side wiring for ADR-097 Phase 3 federation_spend events — per-peer rolling windows + suspension-threshold check
repo: ruvnet/ruflo
लोकप्रियता
- GitHub स्टार
- 81k
- रैंकिंग में स्थान
- #1601
- लाइसेंस
- 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 की जांच और नियंत्रण करने में मदद करती है, जिसमें तापमान, अलार्म और नींद की समय-सारणी शामिल हैं।