claude

ruflo-cost-tracker

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

5 on GitHubby ruvnetv0.31.0MITupdated 5 days agoupstream
/

Plugin ruflo-cost-tracker from marketplace moaa in ahmadhammoud56/MOAA. Commands read from the repo's manifest — 5 days 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 (24)

  • cost-advise

    Optimisation findings from your own Claude Code and Codex logs — low cache hit ratio, 1-hour cache writes that did not pay back, sub-agents on a top-tier model, Codex reasoning share, bloated sessions — each with evidence and a what-if saving. Use when asked how to cut spend or why it is high.

  • cost-anomaly

    MAD-based outlier detection on session spend: lists anomalous sessions with modified-z scores, with an optional --alert-on-outliers exit code for CI. Use when asked which individual session is the cost outlier; cost-burn covers the aggregate trend.

  • 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-ledger

    One cost view across Claude Code, Codex and Grok on this machine — spend, tokens, cache hit ratio per provider and model, with unpriced models flagged. Use when asked "what did I spend", "how much did Codex cost", or to compare providers. Local logs only, nothing is sent.

  • cost-local

    Cost per million tokens on hardware you own (Ollama, llama.cpp, vLLM, LM Studio) from watts, electricity price, hardware price and measured tokens/second, and the utilisation at which local beats a hosted model. Use for local-vs-API break-even questions.

  • cost-openrouter

    OpenRouter real spend — key limit and usage today/week/month, one request's billed cost by generation id, account credits. Use when asked what OpenRouter charged or whether a key is near its limit. Network and API key: asks first.

  • 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 (2)

  • SessionStart

    node -e "require(require('path').join(process.env.CLAUDE_PLUGIN_ROOT,'scripts','_secret-env.cjs')).bridge({openrouterApiKey:'OPENROUTER_API_KEY'})"

  • Stop

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

View source on GitHub

More from ahmadhammoud56/MOAA

All 107 plugins →

ecc

claudecodex

Harness-native ECC operator layer - 68 agents, 286 skills, 94 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses

200 skills · 94 commands · 68 agents · 1 MCP server · hooks

5

Expose the plugin-safe Claude Code subset of Agentic Awesome Skills through a single marketplace entry.

200 skills

5

Specialist Council: 60 role agents with per-role model/effort and arena-forged members; assembles teams and delivers one verified result.

2 skills · 60 agents · hooks

5

Matt Pocock's agent skills for real engineering (grilling, spec/ticket flows, TDD, code review, domain modelling and more).

37 skills

5

caveman

claude

Talk like caveman. Cut 65% output tokens vs unprompted baseline (measured). Keep all technical accuracy.

20 skills · 1 command · 3 agents · hooks

5

Persistent memory system for Claude Code - context compression across sessions. Upstream plugin `claude-mem` from thedotmack; listed as `persistent-memory` because `claude-mem` is a reserved name.

19 skills · 1 MCP server · hooks

5

Similar plugins

A four-tier memory ladder for Claude Code where promotion is earned by recurrence, not asserted by confidence. L0 raw transcripts are never injected; L1 candidate atoms are gitignored and recalled on lexical relevance per prompt; L2 project context loads each session start; L3 stable persona is always loaded. L1 to L2 needs three distinct sessions spanning two distinct calendar days (a stated claim needs two; a verified claim is the only single-observation path); L2 to L3 needs two projects and thirty days. Two gates refuse rather than guess: a claim altered by the redaction pass never promotes on evidence alone, and a contradicted claim freezes until a human resolves it. Three hooks run the loop unattended and every one fails open. Nothing reaches a committed CLAUDE.md without an explicit human adopt. Ships 5 stdlib scripts, 3 hooks, a cs-memory-curator agent, /cs-memory, a JSON schema, and a 69-check validator. Concept from TencentCloud/TencentDB-Agent-Memory (MIT); no upstream code included.

1 skill · 1 command · 1 agent · hooks

alirezarezvani/claude-skills 29,725

Audit a project's npm, PyPI, and Go dependencies for supply-chain risk: version-matched advisories for direct dependencies and the full lockfile tree, abandoned upstreams, npm publisher concentration, and install scripts

1 skill

trailofbits/skills 8,166

Ships pull requests to open-source projects you don't maintain — CONTRIBUTING compliance, PR-size/scope checks, minimal-diff implementation, AI-disclosure PR descriptions, and rebase or bot-review replies. Use for 提 PR / 上游 PR / 贡献代码, "open a PR", "fix this upstream", "rebase against main", "respond to the bot review". Not for reviewing PRs as maintainer (use github-review-pr) or general GitHub CRUD (use github-ops).

1 skill

daymade/claude-code-skills 1,527

Assess compliance with the EU General-Purpose AI (GPAI) Code of Practice under the AI Act (Regulation (EU) 2024/1689), Articles 51-56. Covers GPAI model identification (Art. 3(63)), systemic risk model designation (Art. 3(65), Art. 51, 10^25 FLOP training compute threshold), upstream provider obligations under Art. 53 (transparency, technical documentation, copyright policy, training data summary), additional systemic risk obligations under Art. 55 (model evaluation, adversarial testing, AI Office incident notification, cybersecurity), systemic-risk notification and Commission designation under Art. 52, downstream Art. 25 quasi-provider duties, and Art. 53(2) open-source exemption. Built for in-house counsel and AI governance teams reviewing LLM or foundation model deployments, drafting GPAI compliance plans, or assessing systemic risk thresholds. DACH: BaFin, BSI, BNetzA. Pairs with the EU AI Act System Classifier, High-Risk Readiness, FRIA, and Serious Incident Reporting skills.

200 skills

lawve-ai/awesome-legal-skills 949

BDD-first engineering skills forked from mattpocock/skills (synced 2026-11-04, upstream v1.3.2 + 3 commits)

50 skills

FradSer/dotclaude 596

superjawn

claude

Research-augmented fork of obra/superpowers. Ships 13 workflow skills (brainstorming, planning, code review, debugging, verification, worktrees, parallel agents) standalone, with no dependency on the upstream superpowers plugin.

13 skills

jamditis/claude-skills-journalism 452

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 plugins107 plugins