agentistics: Command for Claude Code

.claude/commands/nay-costs.md

nay-costs is a command for Claude Code from blpsoares/agentistics. It costs 0 tokens per session (224 once invoked), scanned A, original, MIT.

A command that asks the Nay agent to analyze spending on Claude Code and produce a detailed cost report.

In plain words
What is it for?
Use it to calculate total and average spend, rank costly projects and sessions, compare model costs, measure cache savings, and suggest ways to reduce spending.
Why use it?
It brings model, project, session, cache, and anomaly data together so expensive usage is easier to find and understand.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

This is blpsoares/agentistics's own configuration. It tells Claude Code how to work on agentistics itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentistics configures →

Reuse

Borrowing it

Nothing to install: this file belongs to blpsoares/agentistics. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/blpsoares/agentistics/main/.claude/commands/nay-costs.md
Clone the repo
git clone --depth 1 https://github.com/blpsoares/agentistics

Made for: Claude Code.

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 nay-costs

README.md
[![agentmods](https://agentmods.dev/badge/commands/blpsoares/agentistics/nay-costs.svg)](https://agentmods.dev/commands/blpsoares/agentistics/nay-costs)
Your own site
<a href="https://agentmods.dev/commands/blpsoares/agentistics/nay-costs"><img src="https://agentmods.dev/badge/commands/blpsoares/agentistics/nay-costs.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 224 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.00000 $0.00224
Opus 5 $0.00000 $0.00112
Sonnet 5 $0.00000 $0.00045
Haiku 4.5 $0.00000 $0.00022

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

Security

Grade A, and why

nay-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 5d 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.

.claude/commands/nay-costs.md · 17 lines

What it actually says

Use the Nay agent to do a deep-dive cost analysis of my Claude Code spending.

Nay should:

  1. Call agentistics_costs for the model pricing breakdown.
  2. Call agentistics_projects to rank projects by cost.
  3. Call agentistics_sessions with limit=50 to identify the most expensive individual sessions.

Produce a report covering:

  • Total spend and daily average
  • Model cost table: model name | tokens used | cost | % of total
  • Cache savings: how much was saved vs. full pricing; what hit rate means in $/month at current pace
  • Top 5 most expensive projects (table: project | sessions | total cost | avg cost/session)
  • Top 5 most expensive sessions (table: date | project | model | duration | cost)
  • Recommendations: concrete suggestions to reduce cost (e.g., use Haiku for X type of work, improve caching by Y)

Flag any session that cost more than 3× the average session cost as an anomaly worth investigating.

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. 5d ago First seen · 17 lines · 0 tokens per session scan A 5b0f7494a365

Subscribe to this mod's changes

nay-costs is a command published in the GitHub repository blpsoares/agentistics (39 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 224 tokens. 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-09-01.