ijfw-metrics

ijfw-metrics is a command for coding agents from FerroxLabs/ijfw. It costs 37 tokens per session (256 once invoked), scanned A, original, MIT.

A command that shows token use, cost, session counts, or routing data from recorded coding-agent sessions over a chosen time period.

In plain words
What is it for?
Use it to inspect today’s, the last 7 days’, the last 30 days’, or all-time metrics.
Why use it?
It gives you a view of usage and spending without manually reading session records.

Command

Part of the claude plugin — 18 commands, 37 agents, 1 MCP server shipped together

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.

agentmods
npx agentmods add commands/ferroxlabs/ijfw/metrics
Clone the repo
git clone --depth 1 https://github.com/FerroxLabs/ijfw

Or install claude, the plugin that ships this one along with the rest of its 18 commands, 37 agents, 1 MCP server.

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 ijfw-metrics

README.md
[![agentmods](https://agentmods.dev/badge/commands/ferroxlabs/ijfw/metrics.svg)](https://agentmods.dev/commands/ferroxlabs/ijfw/metrics)
Your own site
<a href="https://agentmods.dev/commands/ferroxlabs/ijfw/metrics"><img src="https://agentmods.dev/badge/commands/ferroxlabs/ijfw/metrics.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 256 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00037 $0.00256
Opus 5 $0.00018 $0.00128
Sonnet 5 $0.00007 $0.00051
Haiku 4.5 $0.00004 $0.00026

Measured 4d ago against content hash 2191f5d2ef3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ijfw-metrics 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 4d 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/metrics.md · 21 lines

What it actually says

Call the ijfw_metrics MCP tool with:

  • period: $1 if provided (one of today, 7d, 30d, all), else 7d
  • metric: $2 if provided (one of tokens, cost, sessions, routing), else tokens

Render the result inside a fenced code block -- no extra commentary, no headers. The tool returns positive-framed text even when no data is available yet.

Examples the user might invoke:

  • /ijfw-metrics -- last 7 days, tokens
  • /ijfw-metrics 30d cost -- last 30 days, cost in USD
  • /ijfw-metrics all sessions -- all-time session counts and handoff rate
  • /ijfw-metrics today routing -- today's routing mix

Footer note (only if data appears): metrics reflect clean session-ends only -- crashes or force-quits skip the Stop hook and undercount tokens for that turn.

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. 4d ago First seen · 21 lines · 37 tokens per session scan A 2191f5d2ef3e

Subscribe to this mod's changes

ijfw-metrics is a command published in the GitHub repository FerroxLabs/ijfw (210 stars, last pushed 10d ago), licensed MIT. It adds 37 tokens to every session and 256 once invoked, about $0.0002 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.