ijfw-metrics

ijfw-metrics is a command for Claude Code 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 for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the ijfw plugin — 34 skills, 22 commands, 37 agents, 6 hooks shipped together

Good fit Use it to inspect today’s, the last 7 days’, the last 30 days’, or all-time metrics.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ferroxlabs/ijfw/metrics
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/FerroxLabs/ijfw

Made for: Claude Code.

Or install ijfw, the plugin that ships this one along with the rest of its 34 skills, 22 commands, 37 agents, 6 hooks.

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/github.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/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 ijfw-metrics

Your own site · 80×15
<a href="https://agentmods.dev/commands/ferroxlabs/ijfw/metrics"><img src="https://agentmods.dev/badge/commands/ferroxlabs/ijfw/metrics.svg" alt="Reviewed on agentmods" width="80" 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. 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.00037 $0.00256
Opus 5.5 $0.00015 $0.00102
Sonnet 5.5 $0.00007 $0.00051
Haiku 4.5 $0.00004 $0.00026

Measured 1mo ago against content hash 2191f5d2ef3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (214 stars, last pushed 7d ago), licensed MIT. It adds 37 tokens to every session and 256 once invoked, about $0.0001 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-30.

Related

Other commands, from other repositories

constitution

A command for creating or updating a project's constitution, a document that records its governing principles and working rules, in Simplified Chinese.

loulanyue/spec-kit-zh · 21 tokens

release-plan

Design a pre-deploy release and rollout strategy: pick the pattern (feature flag, canary, blue-green, or progressive delivery) by risk, then specify the exposure ramp, promotion metric and threshold, and rollback trigger. Designs the rollout, never executes it. Gated --godot-mobile and --godot-desktop modes plan a…

Mozurok/fhorja.dev · 0 tokens

impact-analysis

Understand a requested change well enough to make safe workflow decisions, and persist IMPACTANALYSIS.md: blast radius, contract, schema and runtime risks. Use when a task is new or partly understood, or a change may touch contracts, schema, integrations, runtime, or critical user flows. Do not use if a valid one…

Mozurok/fhorja.dev · 0 tokens

superskill

route a task through superskill packs.

permanu/superskill · 7 tokens

code-context-map

Generate and re-sync an AI-readable code context map (ranked, token-budgeted Markdown of files, imports, signatures, and typed boundary calls) for a target project (or, from a seed file, its import chain). Opt-in; not part of default task init. Use when fast structural orientation is needed before editing, when…

Mozurok/fhorja.dev · 126 tokens

contract-signoff

Harden the current decision set into a normative source of truth with no residual ambiguity, saved in DECISIONS.md and TASKSTATE.md as reviewable edits. Use when decisions are resolved, the contract direction is stable, and wording needs hardening before planning or implementation. Do not use when major ambiguities…

Mozurok/fhorja.dev · 86 tokens