Cost Federation
Consumer-side wiring that aggregates per-peer federation spend into rolling windows and flags breaker suspensions.
- CCM score
- 65 of 100
- skills.sh installs
- 684
- GitHub stars
- 82.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers per-peer spend count and USD totals across 1h, 24h, and 7d rolling windows, with a suspension-threshold check block
- Runs
node plugins/ruflo-cost-tracker/scripts/federation.mjs, withFED_FORMAT,FED_NAMESPACE, andFED_SUSPEND_THRESHOLD_USDoverrides for output and breaker limit - Reads
federation_spendrecords under thefed-spend-key prefix in thefederation-spendnamespace, which upstream Phase 3 has not yet published - Designed for establishing a peer's baseline before opening federation traffic, or monitoring spend periodically under ADR-097
Install
$ npx -y skills add ruvnet/ruflo --skill cost-federation -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
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)
Details
- Repository
- github.com/ruvnet/ruflo
- Categories
- Finance & Trading, AI Agents & LLM Apps
- First seen
- Jun 3, 2026
Questions
What does the cost-federation skill do?
The cost-federation skill is the consumer-side wiring for ADR-097 Phase 3 federation_spend events. It aggregates per-peer rolling windows of 1h, 24h and 7d, and flags peers over the suspension threshold.
How do I install the cost-federation skill?
Run npx -y skills add ruvnet/ruflo --skill cost-federation -y in your project. Once installed, the agent can run the federation script to report per-peer spend across the rolling windows.
Does cost-federation work before ADR-097 Phase 3 is released?
Phase 3 is not landed upstream yet, so the skill reports a no events found notice until upstream publishes events to the federation-spend namespace. It activates once those events exist.
Where does cost-federation rank in the Finance & Trading category?
It is listed in the Finance & Trading category on Claude Marketplaces, alongside wind-mcp-skill, stripe-best-practices and convex-billing. It differs from cost-report by focusing on per-peer federated spend rather than local agent spend.
More from ruvnet/ruflo
All 236- Cost Summary684
- Intelligence Transfer684
- Vector Setup684
- Cost Trend683
- Cost Conversation682
- Cost Export681
- Cost Benchmark679
- Cost Booster Edit679
- Browser674
- Witness656
- Swarm Orchestration2.1K
- Agent Arch System Design1.4K
- Security Audit1.4K
- Agent Workflow1.4K
- Github Project Management1.4K
- Workflow Automation1.3K
- Github Code Review1.3K
- Agent Swarm1.3K
- Agent Spec Mobile React Native1.3K
- Agent Trading Predictor1.3K
- Github Workflow Automation1.3K
- Agent Analyze Code Quality1.2K
- Agent Ops Cicd Github1.2K
- Agent Workflow Automation1.2K
Similar to Cost Federation
More Finance & Tradingcost-summarySkillruvnet/ruflo684 installsSingle-call JSON or markdown snapshot of total spend, per-tier costs, budget status, and federation totals.
ruflo-cost-trackerPluginruvnet/ruflo82.4K starsToken usage tracking, model cost attribution per agent, budget alerts, and optimization recommendations
Usaspending Mcp ServerMCP servercyanheads5 starsRead-only access to US federal award, recipient, agency, and spending data from USAspending.gov.
caveman-evidence-reviewSkilljuliusbrussee/caveman139.5K installsRead-only review of Caveman Cloud evidence on cost, traces, latency, errors, routing, and savings.
ads-monitorSkillAgriciDaniel/claude-ads842 installsMonitoring workflow for paid-ad accounts that checks pacing, delivery, performance, and data quality without changing the account.