Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add agentic-control-plane/codex-acp-plugin --skill cost-xraygit clone --depth 1 https://github.com/agentic-control-plane/codex-acp-pluginWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/agentic-control-plane/codex-acp-plugin/cost-xray)<a href="https://agentmods.dev/skills/agentic-control-plane/codex-acp-plugin/cost-xray"><img src="https://agentmods.dev/badge/skills/agentic-control-plane/codex-acp-plugin/cost-xray/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/agentic-control-plane/codex-acp-plugin/cost-xray"><img src="https://agentmods.dev/badge/skills/agentic-control-plane/codex-acp-plugin/cost-xray.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.00980 |
| Opus 5.5 | $0.00017 | $0.00392 |
| Sonnet 5.5 | $0.00009 | $0.00196 |
| Haiku 4.5 | $0.00004 | $0.00098 |
Grade A, and why
cost-xray scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cost X-ray
Produce a ranked, evidence-backed report on where this agent's model spend goes and what to change. ACP sits in the request path, so it sees composition (cache blend, context breakdown, per-tool output bytes, loop share) — not just totals. Your job: pull the data, run the decompositions below, and deliver a report the user can act on before scaling to production.
Data sources (in order of preference)
- ACP MCP tools if connected:
acp_optimize(composition),acp_trace(one run's steps),acp_recommendations(policy findings),acp_cost(spend by model). - REST fallback with the key in
~/.acp/credentials(or~/.acp/proxy-key):GET https://api.agenticcontrolplane.com/api/v1/runs?window=7d— run rollupsGET https://api.agenticcontrolplane.com/api/v1/runs/{runKey}— one run with ordered stepsGET https://api.agenticcontrolplane.com/api/v1/introspect/cost-insights?window=7d— ranked recommendations Auth:Authorization: Bearer <key>.
Analysis steps
- Headline: total cost, run count, window. If
byoAuth, label costs "@ API rates" (subscription traffic priced at what it would cost). - Cache economics — decompose before concluding. A low headline hit rate has at least four distinct causes with different fixes. Compute from step data (
model,tMs,promptTokens,cachedTokens):- per-model hit rate — Anthropic caches are per-model; if one model is cold, switching is the cause → route or batch by model;
- hit rate by gap since the previous same-model call (<1min / 1–5min / 5–60min) — decay over gaps = TTL expiry → schedule work closer together or accept it;
- full-price share immediately after a model switch — high = switching cost, low = rules it out;
- uniform ~50% across models and gaps = structural: likely cache writes of new tool output being counted as misses (heavy tool-result appending), or genuine prefix instability. Say which is more consistent with the context composition, and say what you cannot distinguish from the data.
- Context composition: system vs history vs tool-results share. If tool results dominate, name the top tools by re-read bytes (
toolResultBytesByTool) and the worst offender's MB. - Loop share: report the number. Only recommend a subagent split for autonomous agents (background/api tier) — for interactive agents the growing loop IS the work.
- Failure waste: only from
runOutcome === "failed"runs. Runs without a terminal outcome NEVER get a waste claim. - Recommendations: merge
/cost-insightsitems, ranked byimpactUsd.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 53 lines · 43 tokens per session scan A 1fb3bcbd1257
cost-xray is a skill published in the GitHub repository agentic-control-plane/codex-acp-plugin (1 stars, last pushed 12d ago), licensed MIT. It adds 43 tokens to every session and 980 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
cost-xray compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cost-xrayagentic-control-plane/codex-acp-plugin | Skill | 1 | 12d ago | MIT | A | 43 | Claude Code |
| safedepsaldegad/safedeps | Skill | 25 | 23d ago | none | A | 62 | Codex |
| token-goatDFKHelper/token-goat | Skill | 146 | yesterday | none | A | 57 | Claude Code |
| steviktorinkov/shook | Skill | 4 | 2mo ago | none | A | 60 | Claude Code |
| deepseek-vision-bridgekoco-co/deepseek-vision-bridge | Skill | 1 | 3mo ago | none | A | 70 | Claude Code |
| jp-harness-tuneSora-bluesky/ja-output-harness | Skill | 1 | 6mo ago | MIT | A | 86 | Claude Code, Codex |
| agent-qa-testingvibeeval/vibecosystem | Skill | 537 | 3d ago | MIT | A | 58 | Claude Code, Codex |