session-metrics

session-metrics is a skill for Claude Code from nicknisi/sessions. It costs 62 tokens per session (404 once invoked), scanned A, original, MIT.

A usage report for AI coding sessions that summarizes activity over a chosen date range. It includes session and message totals, tool use, projects, daily activity, and active hours.

In plain words
What is it for?
Use it to review coding activity for the past week, month, or another period, compare projects, see frequently used tools, or identify your busiest hours.
Why use it?
It turns scattered session history into an overview of how and when you use your coding tools. This makes usage patterns easier to inspect without counting sessions manually.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the sessions plugin — 7 skills, 1 MCP server shipped together

Good fit Use it to review coding activity for the past week, month, or another period, compare projects, see frequently used tools, or identify your busiest hours.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nicknisi/sessions/session-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 nicknisi/sessions --skill session-metrics
Clone the repo
git clone --depth 1 https://github.com/nicknisi/sessions

Made for: Claude Code.

Or install sessions, the plugin that ships this one along with the rest of its 7 skills, 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 session-metrics

README.md
[![agentmods](https://agentmods.dev/badge/skills/nicknisi/sessions/session-metrics.svg)](https://agentmods.dev/skills/nicknisi/sessions/session-metrics)
Your own site
<a href="https://agentmods.dev/skills/nicknisi/sessions/session-metrics"><img src="https://agentmods.dev/badge/skills/nicknisi/sessions/session-metrics.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 404 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.00062 $0.00404
Opus 5 $0.00031 $0.00202
Sonnet 5 $0.00012 $0.00081
Haiku 4.5 $0.00006 $0.00040

Measured 8d ago against content hash 49dc8368f061, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

session-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 8d 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.

plugin/skills/session-metrics/SKILL.md · 43 lines

What it actually says

Show session usage metrics and analytics.

Steps

  1. Parse the time period. Convert the user's argument to a date range (YYYY-MM-DD). Default to the past 7 days if no period specified. Common inputs: "past week", "this month", "past 30 days", "may 2026".

  2. Fetch metrics. Call get_session_metrics with:

    • startDate and endDate from the parsed range
  3. Format the dashboard:

    Session Metrics: {start} to {end}

    Overview

    • {total sessions} sessions | {total messages} messages
    • Tools: {breakdown with counts}

    Top Projects (table: project, sessions, messages) List the top 10 by session count.

    Daily Activity (table or mini-chart: date, sessions, messages) Show each day in the range.

    Active Hours Render the hours heatmap as a simple bar chart or table showing which hours of the day have the most sessions. Convert to local time labels (e.g., "9am", "2pm").

Guidelines

  • Round percentages to whole numbers.
  • For active hours, group into time blocks if the data is sparse (morning/afternoon/evening/night).
  • If a tool has zero sessions, omit it from the breakdown.
  • Keep the formatting clean — this should be pasteable into a document or message.
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. 8d ago First seen · 43 lines · 62 tokens per session scan A 49dc8368f061

Subscribe to this mod's changes

session-metrics is a skill published in the GitHub repository nicknisi/sessions (30 stars, last pushed 6d ago), licensed MIT. It adds 62 tokens to every session and 404 once invoked, about $0.0003 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.