# Cost Transparency

> Surface the real cost (wall-clock time and tokens/context) of long-running steps so the user can spot a runaway step and the agent can self-calibrate. Use when a step takes materially longer than a typical edit — a long build, a long test run, a multi-minute wiring task, a heavy generation.

- Skill: `jcdavis131/cost-transparency` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jcdavis131/cost-transparency`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jcdavis131/cost-transparency/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: jcdavis131 (https://skillmd.com/u/jcdavis131)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/jcdavis131/cost-transparency

---


# Cost Transparency

The two scarce resources of an agent loop are **wall-clock** and **tokens/context**. Make them visible on heavy steps; silence on small steps.

## When to surface cost

- A step runs longer than ~30 seconds.
- A step consumes a surprising amount of context (a big file read, a verbose command output).
- A step is being repeated (loop iteration) — show the per-iteration cost so drift is visible.
- A long-running background command (build, test, deploy) returns — report its elapsed time alongside its result.

## The shape

Inline, one line, no ceremony:

```
Wired api telemetry routers (7m 4s · ↑ 14.7k tokens)
```

- Time first, tokens second.
- For background commands, the elapsed time comes from the shell task metadata.
- For context use, it's an estimate — "↑ 14.7k tokens" is fine; don't fake precision you don't have.

## When NOT to surface cost

- Sub-second edits — noise.
- Routine reads/greps — noise.
- Every single step in a fast sequence — only surface the aggregate if the sequence as a whole was expensive.

## Why it earns its keep

- **User side:** a step that took 7m once and is about to be repeated 5× is a 35m problem. Visible cost lets the user catch that before it happens.
- **Agent side:** if wiring routers cost 7m and 14.7k tokens last time, the agent should not blindly re-run that pattern; it should look for a cheaper path (targeted edit, cached result, smaller read).

## Anti-patterns

- Fake precision: "7m 04.312s" — you don't have that resolution; round.
- Cost without action: reporting a 7m step and then casually repeating it. The report should change behavior.
- Cost on every micro-step: trains the user to ignore the signal.

