octo-costs

octo-costs is a command for Claude Code from CES-Ltd/Lumi. It costs 11 tokens per session (1,383 once invoked), scanned A, original, MIT.

A command that reports spending for the current session and its workflows, using available Octopus usage logs and routing records. It breaks costs down by provider and workflow.

In plain words
What is it for?
Checking token usage, query counts, provider costs, workflow costs, and cumulative usage history from the available Octopus data.
Why use it?
It makes it easier to see which providers and work patterns are driving the session’s usage costs.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

Part of the octo plugin — 10 skills, 47 commands shipped together

Good fit Checking token usage, query counts, provider costs, workflow costs, and cumulative usage history from the available Octopus data.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ces-ltd/lumi/octo-costs
View source ↗ CES-Ltd/Lumi
Install

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.

Clone the repo
git clone --depth 1 https://github.com/CES-Ltd/Lumi

Made for: Claude Code.

Or install octo, the plugin that ships this one along with the rest of its 10 skills, 47 commands.

Wrote 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.

agentmods badge for octo-costs

README.md
[![agentmods](https://agentmods.dev/badge/commands/ces-ltd/lumi/octo-costs/github.svg)](https://agentmods.dev/commands/ces-ltd/lumi/octo-costs)
Your own site
<a href="https://agentmods.dev/commands/ces-ltd/lumi/octo-costs"><img src="https://agentmods.dev/badge/commands/ces-ltd/lumi/octo-costs/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.

agentmods 80×15 button for octo-costs

Your own site · 80×15
<a href="https://agentmods.dev/commands/ces-ltd/lumi/octo-costs"><img src="https://agentmods.dev/badge/commands/ces-ltd/lumi/octo-costs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,383 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00011 $0.01383
Opus 5 $0.00005 $0.00691
Sonnet 5 $0.00002 $0.00277
Haiku 4.5 $0.00001 $0.00138

Measured 11d ago against content hash 68de5a77a81b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

octo-costs 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 11d 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.

resources/seed/octopus/commands/octo-costs.md · 159 lines

How it starts

The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cost Dashboard (/octo:costs)

Your first output line MUST be: 🐙 Octopus Cost Dashboard

Display a cost breakdown by provider and workflow for the current session (and cumulative history).

EXECUTION CONTRACT (Mandatory)

When the user invokes /octo:costs, you MUST follow these steps in order.

STEP 1: Locate Usage Data

Search for session usage data in these locations (check all, use whichever exist):

~/.claude-octopus/usage/           # Per-session usage logs
~/.claude-octopus/routing.log      # Routing decisions with timestamps
~/.claude-octopus/sessions/        # Session state files
.claude-octopus/                   # Project-local usage data

Use the Bash tool to list and read files:

ls -la ~/.claude-octopus/usage/ 2>/dev/null || echo "No usage directory"
ls -la ~/.claude-octopus/routing.log 2>/dev/null || echo "No routing log"
ls -la ~/.claude-octopus/sessions/ 2>/dev/null || echo "No sessions directory"
ls -la .claude-octopus/ 2>/dev/null || echo "No project-local usage data"

STEP 2: Parse Provider Usage

For each provider found in the usage data, extract:

  • Tokens in (input/prompt tokens)
  • Tokens out (output/completion tokens)
  • Query count (number of invocations)
  • Estimated cost (calculated from the Cost Reference table below)

STEP 3: Display Per-Provider Breakdown

Format as a clean ASCII table:

Provider Cost Breakdown
============================================================
Provider           Tokens In   Tokens Out   Queries   Est Cost
------------------------------------------------------------
Claude Opus 4.6      45,200       12,800         3     $0.55
Claude Sonnet 4.6   128,000       34,500        12     $0.24
Codex CLI                 -            -         8     $0.64
Gemini CLI                -            -         4     $0.08
Perplexity                -            -         2     $0.06
------------------------------------------------------------
TOTAL                                           29     $1.57
============================================================

Read the full file on GitHub · 159 lines

Changes

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.

  1. 11d ago First seen · 159 lines · 11 tokens per session scan A 68de5a77a81b

Subscribe to this mod's changes

octo-costs is a command published in the GitHub repository CES-Ltd/Lumi (31 stars, last pushed 4mo ago), licensed MIT. It adds 11 tokens to every session and 1,383 once invoked, about $0.0001 per session on Opus 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-30.