ijfw-metrics

ijfw-metrics is a skill for Claude Code from FerroxLabs/ijfw. It costs 33 tokens per session (674 once invoked), scanned A, original, MIT.

An internal session-metrics tracker that records information about coding-agent sessions, such as duration, turns, agents used, memory actions, and generated handoffs. A handoff is a saved summary for continuing work later.

In plain words
What is it for?
Use it to collect session data and view measures such as turns per session, agent distribution, routing savings, handoff frequency, and memory activity.
Why use it?
It provides a record for examining how sessions are spent and how the agent uses routing, memory, and other work modes.

Skill 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 collect session data and view measures such as turns per session, agent distribution, routing savings, handoff frequency, and memory activity.

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

Any agent
npx skills add FerroxLabs/ijfw --skill ijfw-metrics
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/skills/ferroxlabs/ijfw/ijfw-metrics/github.svg)](https://agentmods.dev/skills/ferroxlabs/ijfw/ijfw-metrics)
Your own site
<a href="https://agentmods.dev/skills/ferroxlabs/ijfw/ijfw-metrics"><img src="https://agentmods.dev/badge/skills/ferroxlabs/ijfw/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/skills/ferroxlabs/ijfw/ijfw-metrics"><img src="https://agentmods.dev/badge/skills/ferroxlabs/ijfw/ijfw-metrics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 674 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00033 $0.00674
Opus 5.5 $0.00013 $0.00270
Sonnet 5.5 $0.00007 $0.00135
Haiku 4.5 $0.00003 $0.00067

Measured 1mo ago against content hash da092ff2bc49, 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/skills/ijfw-metrics/SKILL.md · 91 lines

How it starts

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

IJFW Metrics -- Internal Tracking

Lightweight metrics captured at session boundaries via hooks. Zero per-turn cost. All tracking happens in the Stop hook.

What We Track

At each session end, append to .ijfw/metrics/sessions.jsonl:

{
  "timestamp": "2026-04-13T14:30:00Z",
  "session_id": "<session-id>",
  "duration_minutes": 45,
  "turns": 23,
  "mode": "smart",
  "effort": "high",
  "agents_dispatched": {
    "scout": 8,
    "builder": 12,
    "architect": 3
  },
  "memory_ops": {
    "stores": 5,
    "recalls": 2,
    "searches": 1
  },
  "skills_loaded": ["ijfw-core", "ijfw-commit", "ijfw-review"],
  "compactions": 1,
  "handoff_generated": true,
  "routing": "OpenRouter + local model"
}

Derived Metrics (calculated on /ijfw-status)

From the JSONL log, compute:

Efficiency:

  • Average turns per session
  • Agent distribution (% scout vs builder vs architect)
  • Estimated token savings from model routing:
    • scout turns x (opus_price - haiku_price) = routing savings
    • builder turns x (opus_price - sonnet_price) = routing savings

Quality:

  • Sessions with handoff generated (continuity metric)
  • Memory operations per session (knowledge accumulation)
  • Compaction count (context pressure indicator)
  • Skills loaded per session (specialisation usage)

Cost Projection: Using Anthropic pricing (per 1M tokens):

  • Haiku: $0.25 input / $1.25 output
  • Sonnet: $3 input / $15 output
  • Opus: $15 input / $75 output

If smart routing sent 40% of turns to Haiku instead of Opus:

  • Savings per 1K output tokens: $73.75 (Opus→Haiku)
  • At 50 turns/session, ~500 output tokens/turn average:
  • Per session: ~$0.92 saved on routed turns alone

Status Display Format

When user runs /ijfw-status or asks about performance:

IJFW Status
Mode: smart | Effort: high | OpenRouter

This Session:
  12 turns | 3 agents dispatched | 2 decisions stored

All Time (47 sessions):
  Smart routing: 340 turns -> scout, 580 -> builder, 127 -> architect
  Estimated savings: ~$43 in model routing
  Memory: 89 decisions, 12 patterns, 4 consolidations
  Continuity: 94% sessions with handoff

Context health: 34% used | Next compact: ~66% threshold
---------------------------------------

Read the full file on GitHub · 91 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. 1mo ago First seen · 91 lines · 33 tokens per session scan A da092ff2bc49

Subscribe to this mod's changes

ijfw-metrics is a skill published in the GitHub repository FerroxLabs/ijfw (214 stars, last pushed 5d ago), licensed MIT. It adds 33 tokens to every session and 674 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-09-05.