session-insights

session-insights is a skill for Claude Code, Codex from luiseiman/dotforge. It costs 18 tokens per session (1,290 once invoked), scanned A, original, MIT.

A tool that reviews past Claude Code sessions, project errors, Git history, agent notes, and related records to find usage patterns. Claude Code is an AI coding assistant that works in a project from the command line.

In plain words
What is it for?
Use it to review coding-agent usage, identify frequent errors and hot files, track work patterns, and receive recommendations.
Why use it?
It brings scattered project history together so recurring problems, heavily changed files, and missing improvements are easier to spot.

Skill for Claude CodeCodex

Part of the dotforge plugin — 23 skills, 25 commands, 7 agents, 8 hooks 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 skills/luiseiman/dotforge/session-insights
Any agent
npx skills add luiseiman/dotforge --skill session-insights
Clone the repo
git clone --depth 1 https://github.com/luiseiman/dotforge

Made for: Claude Code, Codex.

Or install dotforge, the plugin that ships this one along with the rest of its 23 skills, 25 commands, 7 agents, 8 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 session-insights

README.md
[![agentmods](https://agentmods.dev/badge/skills/luiseiman/dotforge/session-insights.svg)](https://agentmods.dev/skills/luiseiman/dotforge/session-insights)
Your own site
<a href="https://agentmods.dev/skills/luiseiman/dotforge/session-insights"><img src="https://agentmods.dev/badge/skills/luiseiman/dotforge/session-insights.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,290 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.00018 $0.01290
Opus 5 $0.00009 $0.00645
Sonnet 5 $0.00004 $0.00258
Haiku 4.5 $0.00002 $0.00129

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

Security

Grade A, and why

session-insights 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 3d 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.

skills/session-insights/SKILL.md · 134 lines

How it starts

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

Session Insights

Analyze the current project's Claude Code usage patterns and generate actionable recommendations.

Step 1: Gather session data

Collect data from available sources in the current project:

  1. Session metrics~/.claude/metrics/{project-slug}/*.json (structured JSON from session-report hook)
  2. CLAUDE_ERRORS.md — error frequency by Area and Type
  3. Git log — files most frequently modified in commits mentioning "fix", "bug", "error"
  4. .claude/agent-memory/ — learnings accumulated by agents
  5. Registry history — audit score trend from $DOTFORGE_DIR/registry/projects.yml

If a source doesn't exist, skip it and note as "unavailable".

Retroactive Analysis (no session metrics yet)

When ~/.claude/metrics/{project-slug}/ is empty or doesn't exist, reconstruct a pseudo-historical picture:

  1. CLAUDE_ERRORS.md → parse dates and group errors by week/month to show trends
  2. Git loggit log --name-only --since="60 days ago" to identify:
    • Hot files (most frequently changed)
    • Fix frequency (git log --grep="fix" --oneline | wc -l)
    • Commit cadence by week
  3. Registry history → score progression over time
  4. Rule glob coverage → cross-reference git log --name-only against .claude/rules/*.md globs to estimate historical rule coverage

Mark all retroactive data clearly as:

⚠ Inferred from git history — no session metrics available yet.
   Session metrics will accumulate automatically after /forge sync.

Step 2: Compute metrics

From available data, calculate:

Session Metrics (from ~/.claude/metrics/)

When JSON metrics files exist, aggregate across the last N sessions (default 20):

  • Total sessions: count of metric files
  • Avg files touched: mean files_touched per session
  • Avg hook blocks: mean hook_blocks + lint_blocks (lower is better — team is learning)
  • Rule coverage trend: plot rule_coverage over time (improving / stable / declining)
  • Error rate: errors_added / sessions (target: < 0.5)

Read the full file on GitHub · 134 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. 3d ago First seen · 134 lines · 18 tokens per session scan A 5e79c989af30

Subscribe to this mod's changes

session-insights is a skill published in the GitHub repository luiseiman/dotforge (8 stars, last pushed 2mo ago), licensed MIT. It adds 18 tokens to every session and 1,290 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

scaffold

Set up or align a non-code ops/PM repo with the ops folder structure, CLAUDE.md, and INDEX.md hierarchy.

OdinMB/ops-workflow · 30 tokens

find-opps

Find new directions for an ops project — adjacent opportunities, strategic gaps, preparatory research. Use when known work is well-mined and you need to look outward.

OdinMB/ops-workflow · 37 tokens

prioritize

Pick 2–3 independent ops tasks from active plans and backlog for autonomous execution, weighing impact, feasibility, and project goals.

OdinMB/ops-workflow · 29 tokens

factory-db-migration

The operational discipline for running a destructive change against a production database — schema migrations, data backfills, one-shot RPCs, historical seed imports. Adjacent to factory-data-layer.md (schema design) and factory-deployment.md (where migrations execute in CI) — this skill is about the runbook around…

nonlinear-xyz/factory-kit · 155 tokens

factory-api

API conventions for both server actions and tRPC builds. Covers the decision between them, per-mutation Zod input schemas, central router composition, pagination shape, multi-field search via Drizzle ilike + or(), mutation lifecycle hooks, conditional query enabling, stale-time defaults, error response shape and…

nonlinear-xyz/factory-kit · 95 tokens

factory-auth

Auth and authorization conventions distilled across builds with three different auth stacks (Better Auth + orgs, Supabase Auth + RLS, Clerk). Covers the provider decision matrix, the unified wrapper interface (requireAuth / requireRole / withOrgContext), procedure tier stacking, session handling, OAuth callback…

nonlinear-xyz/factory-kit · 97 tokens