Atlas / Skills / ruvnet / Cost Track

Cost TrackCAUTION

skills/ruvnet/cost-track

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Verdict
CAUTION
Grade
B
Trust score
89 /100
Version
—
Hosts
1 documented
License
MIT
Stars
73,227
01

Overview

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Read from source at commit ef7d4f0535e5OBSERVED · 2026-09-25
02

Host compatibility

What the documentation claims. We have not run a compatibility test.

HostStatusNotes
claude-codementioned
03

What it tells the agent

The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.

---
name: cost-track
description: Auto-capture per-session token usage from the Claude Code session jsonl and persist to the cost-tracking namespace
argument-hint: ""
allowed-tools: Bash mcp__plugin_ruflo-core_ruflo__memory_store
---

# Cost Track

Reads the active Claude Code session jsonl (`~/.claude/projects/<encoded-cwd>/<session>.jsonl`), tallies assistant-message `usage` per model, computes USD cost using REFERENCE.md pricing, and writes a structured record to the `cost-tracking` AgentDB namespace. This is the **producer** that gives `cost-report` and `cost-optimize` real data to consume.

## When to use

- After a meaningful chunk of work, to capture spend for the report.
- At session-end to persist the final tally.
- Periodically during long sessions (cron-friendly — see `/loop 30m`).

## Steps

1. **Run the tracker** from the project root:

   ```bash
   node plugins/ruflo-cost-tracker/scripts/track.mjs
   ```

   The script auto-discovers the session jsonl from the current working directory. To pin a specific session: `TRACK_SESSION=/path/to/session.jsonl`. To dry-run (no memory write): `TRACK_DRY_RUN=1`.

2. **Inspect the markdown summary** — total cost, per-model and per-tier breakdowns, and the persisted memory key.

3. **Verify persistence** — `mcp__plugin_ruflo-core_ruflo__memory_search --query "session-" --namespace cost-tracking` should list the new record. `cost-report` step 1 reads from this namespace.

## Record shape (in `cost-tracking` namespace)

Key: `session-<sessionId>`. Value (JSON):

```json
{
  "sessionId": "1dba3b8c-...",
  "cwd": "/Users/cohen/Projects/ruflo",
  "startedAt": "2026-05-04T...",
  "endedAt": "2026-05-05T...",
  "messageCount": 234,
  "byModel": {
    "claude-opus-4-7": {
      "tier": "opus",
      "input_tokens": 12345,
      "output_tokens": 6789,
      "cache_creation_input_tokens": 800000,
      "cache_read_input_tokens": 2000000,
      "messages": 50,
      "cost_usd": 1.23
    }
  },
  "byTier": { "haiku": 0.0, "sonnet": 0.45, "opus": 1.23, "unknown": 0 },
  "total_cost_usd": 1.68,
  "capturedAt": "2026-05-05T..."
}
```

## Pricing source of truth

The script's `PRICING` constant mirrors REFERENCE.md "Model pricing (USD per 1M tokens)". Update both together when prices change. Cache-write tokens are billed at `cache_write` rate; cache-read tokens at `cache_read` (per Anthropic billing docs).

## Env overrides

| Env | Default | Purpose |
|---|---|---|
| `TRACK_CWD` | `process.cwd()` | Override which project's sessions to scan |
| `TRACK_SESSION` | most-recent jsonl | Pin a specific session file |
| `TRACK_OUT` | unset | Also write the JSON summary to this path |
| `TRACK_DRY_RUN=1` | unset | Skip the `memory store` call |
| `TRACK_QUIET=1` | unset | Suppress markdown output |
| `TRACK_NAMESPACE` | `cost-tracking` | Override target namespace |

## Cross-references

- `cost-report` (consumer) — reads records produced by this skill
- REFERENCE.md "Cost attribution formula" — the math the script implements
- `cost-budget-check` (consumer; landing in P2) — reads totals to evaluate alerts
04

Trust audit

CAUTIONgrade B · trust 89/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryWARN
L1Static analysis of the codeNA
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
none-observed
Shell
none-observed
Dependencies
pinned
Secrets in source
none-found

Findings (4)

MEDIUMInventory / provenance · inv.symlink · CWE-1104
crates
crates
Why it matters. link not followed
MEDIUMInventory / provenance · inv.symlink · CWE-1104
plugin/agents
plugin/agents
Why it matters. link not followed
MEDIUMInventory / provenance · inv.symlink · CWE-1104
plugin/commands
plugin/commands
Why it matters. link not followed
MEDIUMInventory / provenance · inv.symlink · CWE-1104
plugin/skills
plugin/skills
Why it matters. link not followed

Gates applied: no_behavioural_pass.

Audited 2026-09-25 · audit v0.4.1 · source sha ef7d4f0535e5full audit observations/trust-audit/skill/ruvnet__cost-track.json · Report an issue / request a re-scan
05

Audit history

Every audit this skill has had.

DateSourceVerdictGradeScoreChange
2026-09-25ef7d4f0535e5CAUTIONB89first audit
06

Questions

What does the Cost Track skill do?

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Is Cost Track safe to install?

With care. The audit graded it B (89/100) and found 4 things worth knowing before you trust this skill, listed below with the exact line each was found on.

What can Cost Track access on my machine?

The audit observed no filesystem, network or shell use at all in its source.

Which assistants does Cost Track work with?

Its documentation mentions claude-code. That is what the text claims, not a compatibility test we ran.

How current is this page?

The grade is for one exact copy of the source (ef7d4f0535e5), read on 2026-09-25. The repository is watched, and a new audit runs when it changes — this is the first audit.

Advertisement