audit-session-metrics

audit-session-metrics is a skill for Claude Code from centminmod/my-claude-code-setup. It costs 147 tokens per session (2,109 once invoked), scanned A, original, MIT.

A report generator that reviews session-metrics JSON exports, which record an agent session’s token use, for avoidable usage.

In plain words
What is it for?
Use it to audit one session, all sessions in a project, or all projects in an instance, with quick or more detailed review modes.
Why use it?
It turns raw usage data into a prioritized explanation of where context or tokens were spent unnecessarily.

Skill for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it to audit one session, all sessions in a project, or all projects in an instance, with quick or more detailed review modes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/centminmod/my-claude-code-setup/audit-session-metrics
About the project

my-claude-code-setup is a starter configuration and memory-bank template for Claude Code, providing project guidance and reusable setup for Claude Code sessions. Developers use it to organize Claude Code behavior, memory, commands, skills, subagents, hooks, and settings. The catalogue entries are components of this Claude Code workflow.

centminmod/my-claude-code-setup · 2,673 stars · on GitHub · threads.com

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 centminmod/my-claude-code-setup --skill audit-session-metrics
Clone the repo
git clone --depth 1 https://github.com/centminmod/my-claude-code-setup

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 audit-session-metrics

README.md
[![agentmods](https://agentmods.dev/badge/skills/centminmod/my-claude-code-setup/audit-session-metrics/github.svg)](https://agentmods.dev/skills/centminmod/my-claude-code-setup/audit-session-metrics)
Your own site
<a href="https://agentmods.dev/skills/centminmod/my-claude-code-setup/audit-session-metrics"><img src="https://agentmods.dev/badge/skills/centminmod/my-claude-code-setup/audit-session-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 audit-session-metrics

Your own site · 80×15
<a href="https://agentmods.dev/skills/centminmod/my-claude-code-setup/audit-session-metrics"><img src="https://agentmods.dev/badge/skills/centminmod/my-claude-code-setup/audit-session-metrics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 147 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,109 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Agent Snooping · line 88
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • high Agent Snooping · line 88
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
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.00147 $0.02109
Opus 5.5 $0.00059 $0.00844
Sonnet 5.5 $0.00029 $0.00422
Haiku 4.5 $0.00015 $0.00211

Measured 12d ago against content hash a11020d222d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

audit-session-metrics scanned grade A with 1 finding 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 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/audit-extract.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`./CLAUDE.md`, `~/.claude/settings.json`, `./.claude/settings.json`,

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

.claude/skills/audit-session-metrics/SKILL.md · 164 lines

How it starts

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

Audit Session-Metrics

Reads a session-metrics JSON export and produces a prioritised, plain-English audit of token-usage waste. It runs on the session's current model (it no longer pins one — a hard model pin capped the usable context at that model's window and broke invocation on long sessions). The work is mostly summarisation over a small disk-read export, so for a much cheaper run /model haiku before invoking. On the Anthropic API haiku is Haiku 5.5 (1M window, so long sessions fit; prompts over 100K tokens bill at its higher rate). On Bedrock, Google Cloud, Microsoft Foundry, and Claude Platform on AWS it is still Haiku 4.5 with a 200k window — short/early sessions only there.

Supports three JSON scopes auto-detected from digest.scope:

  • session — single session (session_*.json) — per-turn analysis
  • project — all sessions for one project (project_*.json) — per-session analysis
  • instance — all projects (instance/*/index.json) — per-project analysis

Dispatch — how to route this invocation

First positional argument received: $ARGUMENTS[0] Second positional argument received: $ARGUMENTS[1]

Read $ARGUMENTS[0] and match by literal equality:

$ARGUMENTS[0] Route Then read (session scope) Then read (project/instance scope)
quick Quick audit references/quick-audit.md see Scope routing below
detailed Detailed audit references/detailed-audit.md see Scope routing below
(empty / other) Print usage and stop this file's "Usage" block below —

$ARGUMENTS[1] must be the path to a JSON export written by session-metrics. Accepted patterns:

  • exports/session-metrics/session_<id8>_<ts>.json — session scope
  • exports/session-metrics/project_<ts>.json — project scope
  • exports/session-metrics/instance/<datedir>/index.json — instance scope

Read the full file on GitHub · 164 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago Changed · +2 lines a11020d222d9
  2. 1mo ago First seen · 162 lines · 147 tokens per session scan A 312c2f3ffdcd

Subscribe to this mod's changes

audit-session-metrics is a skill published in the GitHub repository centminmod/my-claude-code-setup (2,673 stars, last pushed 13d ago), licensed MIT. It adds 147 tokens to every session and 2,109 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

memory-bank

Token-efficient persistent memory system for Claude Code that saves 67% tokens on session warm-up (verified with tiktoken). Layered architecture with progressive loading, compact encoding, branch-aware context, smart compression, session diffing, conflict detection, session continuation protocol, and recovery mode.…

josiahcrackle9631/memory-bank · 199 tokens

chatkit-actions

Implements interactive widget actions and bidirectional communication patterns for ChatKit. This skill should be used when building AI-driven interactive UIs with buttons, forms, entity tagging (@mentions), composer tools, and server-handled widget actions. Covers the full widget lifecycle from creation to replacement.

mjunaidca/mjs-agent-skills · 60 tokens

chatkit-integration

Foundation skill for integrating OpenAI ChatKit framework with custom backends. This skill should be used for initial ChatKit setup including server implementation, React component integration, authentication, context injection, and database persistence. For streaming UI patterns use chatkit-streaming. For interactive…

mjunaidca/mjs-agent-skills · 66 tokens

better-auth-setup

Guide implementation of OAuth 2.1 / OIDC authentication using Better Auth with the OIDC Provider plugin. Use this skill when setting up centralized authentication for multiple apps, implementing SSO across a platform, creating an OAuth authorization server, or integrating Better Auth as an identity provider. Covers…

mjunaidca/mjs-agent-skills · 91 tokens

better-auth-sso

Integrate with Better Auth SSO for OAuth2/OIDC authentication. Use this skill when implementing SSO login flows, PKCE authentication, token management, JWKS verification, or global logout in Next.js applications connecting to a Better Auth server.

mjunaidca/mjs-agent-skills · 54 tokens

fastapi-backend

Build production-grade FastAPI backends with SQLModel, Pydantic, and JWT authentication. Use this skill when building REST APIs, integrating with Neon PostgreSQL, implementing Better Auth JWT verification, or creating CRUD endpoints. Includes patterns for audit logging, worker/agent parity, and OpenAPI documentation.

mjunaidca/mjs-agent-skills · 65 tokens