claude

ruflo-cost-tracker

Token usage tracking, model cost attribution per agent, budget alerts, and optimization recommendations

0 on GitHubby ruvnetv0.26.3MITupdated 3 months ago
/

Plugin ruflo-cost-tracker from marketplace ruflo in Army161/ruflo. Commands read from the repo's manifest — 1 month ago.

This plugin runs code on your machine — its hooks fire automatically on events like tool use. The exact commands are listed below; read them before installing.

What it installs

Skills (20)

  • cost-anomaly

    MAD-based outlier detection on session spend. Robust to the very outliers it hunts (unlike mean+sigma). Surfaces specific anomalous sessions with modified-z scores; optional --alert-on-outliers exit code for CI gates. Distinct from cost-burn (aggregate trend) — this answers "which INDIVIDUAL session

  • cost-benchmark

    Run the corpus benchmark — booster locally, optional Gemini/Sonnet/Opus baselines — and persist a verifiable measured-vs-claimed table

  • cost-booster-edit

    Apply a simple code transform via agent-booster's WASM engine — sub-millisecond, deterministic, $0 (no LLM call). Companion to cost-booster-route.

  • cost-booster-route

    Route tasks through hooks_route, partition by Agent Booster availability, and report Tier 1 bypass utilization with $0 cost

  • cost-budget-check

    Read accumulated cost-tracking spend + budget config, compute utilization, emit 50/75/90/100% alert ladder

  • cost-burn

    Burn-rate trend over time with optional drift-alert exit code. Bins session spend into buckets, surfaces window-over-window delta, and can exit 1 when latest bucket exceeds prior mean by a configurable %. Distinct from `cost-trend` (benchmark drift); this tracks PRODUCTION spend trajectory.

  • cost-compact-context

    Wrap getTokenOptimizer().getCompactContext() to retrieve compacted ReasoningBank context for cost-analysis queries; report bridge-reported tokensSaved

  • cost-conversation

    Per-conversation cost view — list every session in cost-tracking with started-at, message count, top model, and total cost

  • cost-counterfactual

    Multi-baseline counterfactual cost analysis. Compares actual session spend to hypothetical always-haiku / always-sonnet / always-opus routing baselines. Answers "is the routing earning its keep?" Negative savings flag over-escalation; positive savings quantify the router's win.

  • cost-diff

    Snapshot delta between two cost-summary JSON outputs. PR-level cost regression detection — answers "what changed between these two specific snapshots?". Pairs with cost-summary's stable JSON contract.

  • cost-export

    Export cost-tracking telemetry in Prometheus textfile or webhook JSON formats — for external observability (Grafana, Datadog, custom dashboards)

  • cost-federation

    Consumer-side wiring for ADR-097 Phase 3 federation_spend events — per-peer rolling windows + suspension-threshold check

  • cost-health

    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.

  • cost-optimize

    Analyze token usage patterns and recommend cost optimizations with estimated savings

  • cost-projection

    Forward-looking spend extrapolation. Computes a USD-per-day rate from the recent measurement window, projects to 7d/30d/90d/365d horizons, and surfaces "days until budget exhausted" when a budget is configured. Predictive counterpart to `cost-budget-check` (reactive).

  • cost-report

    Generate a cost report showing token usage and USD costs by agent and model

  • cost-session

    Per-message cost breakdown within a single session. The drill-down companion to cost-anomaly — when an outlier session is flagged, this surfaces the specific expensive messages so operators can see whether the cost came from output tokens, cache writes, or model escalations.

  • cost-summary

    Single-shot programmatic dump of all cost data — total spend, per-tier, top session, budget status, federation aggregate. JSON or markdown.

  • cost-track

    Auto-capture per-session token usage from the Claude Code session jsonl and persist to the cost-tracking namespace

  • cost-trend

    Read every docs/benchmarks/runs/*.json and surface drift in win rate, latency, escalation rate, and LLM-baseline cost over time

Slash commands (1)

  • /ruflo-cost-tracker:ruflo-cost

    Cost tracking operations — generate reports, view breakdowns, set budgets, and get optimization recommendations

Subagents (1)

  • cost-analyst

    Tracks token usage per agent and model, computes cost attribution in USD, monitors budgets, and recommends optimizations

Hooks (1)

  • Stop

    node -e "require(require('path').join(process.env.CLAUDE_PLUGIN_ROOT,'scripts','ruflo-hook.cjs'))"

View source on GitHub cognitum.one

More from Army161/ruflo

All 39 plugins →

Visual workflow automation with templates, orchestration, and lifecycle management

5 skills · 8 commands · 3 agents

0

Agent runtimes — local WASM-sandboxed agents (rvagent) + Anthropic Claude Managed Agents (cloud); one interface, local-vs-cloud backends

4 skills · 2 commands · 9 agents

0

MetaHarness integration — surfaces score/genome/mint/mcp-scan/threat-model via skills; pairs with @metaharness/router (ADR-148/149) for cost-optimal model routing; honors ADR-150 optional-augmentation constraint

13 skills · 1 command · 1 agent

0

Neural trading strategies — self-learning LSTM/Transformer/N-BEATS models with Rust/NAPI backtesting

9 skills · 1 command · 4 agents

0

Core Ruflo MCP tools, commands, and Claude Code orchestration patterns

5 skills · 2 commands · 4 agents · 1 MCP server · hooks

0

Agentic browser automation with Playwright for testing, scraping, and UI interaction

10 skills · 1 command · 1 agent

0

Similar plugins

Token usage tracking, model cost attribution per agent, budget alerts, and optimization recommendations

24 skills · 1 command · 1 agent · hooks

ruvnet/ruflo 81,589

Skill: add headroom-ai compress() to a Python or TypeScript app to cut LLM input tokens (tool outputs, logs, JSON, chat history). No API key.

1 skill

headroomlabs-ai/headroom 79,508

mem0

claudecodex

Cross-session memory and token savings for coding agents.

6 skills · 1 agent · 1 MCP server · hooks

mem0ai/mem0 68,893

azure

claude

Transform Claude into an Azure expert. This plugin integrates the Azure MCP server and specialized Azure skills to move beyond generic advice. It enables Claude to perform real-world tasks: listing resources, validating deployments, diagnosing infrastructure issues, and optimizing costs across 50+ Azure services.

44 skills · 1 MCP server

anthropics/claude-plugins-official 47,076

ifixai

claudecodex

Independent auditing for AI agents, open source. Claude discovers your setup, confirms the cost, and audits your agent against the one question other tools skip: is it doing the job it's supposed to do, given your business rules and org structure? Test any model (Anthropic, OpenAI, Gemini, Azure, Bedrock, …) graded by self, one independent judge, or a cross-vendor panel; each provider is billed to its own account via a key in your settings, never the command line. Results render as an interactive artifact (with a static-report fallback).

1 skill · hooks

ifixai-ai/iFixAi 45,158

Cloud architecture design for AWS/Azure/GCP/OCI, Kubernetes cluster configuration, Terraform infrastructure-as-code, hybrid cloud networking, and multi-cloud cost optimization

8 skills · 7 agents

wshobson/agents 42,461

Maintain ruflo-cost-tracker?

This page updates itself from your repo. Add the badge to your README, or get it Featured to pin it above the organic results with a followed link to your site.

claude & codex plugins39 plugins