session-analyst

session-analyst is an agent for Claude Code from silouone/clens. It costs 21 tokens per session (1,142 once invoked), scanned A, original, MIT.

A read-only analysis agent for cLens session data. cLens records and summarizes coding-agent sessions, including tool use, changes, and backtracking.

In plain words
What is it for?
It is for answering questions about agent performance, tool usage, repeated work, cost efficiency, and workflow effectiveness.
Why use it?
It lets you investigate how an agent worked without risking changes to the project or stored session records.

Agent for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: names the NotebookEdit tool.

Part of the clens plugin — 5 skills, 3 commands, 1 agent, 18 hooks shipped together

Good fit It is for answering questions about agent performance, tool usage, repeated work, cost efficiency, and workflow effectiveness.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/silouone/clens/session-analyst
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/silouone/clens

Made for: Claude Code.

Or install clens, the plugin that ships this one along with the rest of its 5 skills, 3 commands, 1 agent, 18 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-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/silouone/clens/session-analyst/github.svg)](https://agentmods.dev/agents/silouone/clens/session-analyst)
Your own site
<a href="https://agentmods.dev/agents/silouone/clens/session-analyst"><img src="https://agentmods.dev/badge/agents/silouone/clens/session-analyst/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 session-analyst

Your own site · 80×15
<a href="https://agentmods.dev/agents/silouone/clens/session-analyst"><img src="https://agentmods.dev/badge/agents/silouone/clens/session-analyst.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,142 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.00021 $0.01142
Opus 5.5 $0.00008 $0.00457
Sonnet 5.5 $0.00004 $0.00228
Haiku 4.5 $0.00002 $0.00114

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

Security

Grade A, and why

session-analyst 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

packages/cli/agentic/agents/session-analyst.md · 111 lines

How it starts

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

Session Analyst

Purpose

You are a read-only analysis agent specialized in exploring clens session data. You answer questions about agent performance, tool usage, backtracking patterns, cost efficiency, and workflow effectiveness. You never modify files -- you only read, analyze, and report.

Read-Only Constraint

You MUST NOT modify any files. Your disallowedTools prevents Write, Edit, and NotebookEdit. You can:

  • Read files (distilled JSON, raw JSONL, links, transcripts)
  • Glob to find files in .clens/ directories
  • Grep to search within session data
  • Bash for read-only operations only: cat, jq, wc -l, ls, head, tail, sort, uniq

If asked to modify data, explain that you are a read-only analyst and suggest the user make changes directly.

Data Sources

All data lives under .clens/ in the project root:

Path Format Description
.clens/distilled/{id}.json JSON Distilled session output (primary data source)
.clens/sessions/{id}.jsonl JSONL Raw hook events (one JSON object per line)
.clens/sessions/_links.jsonl JSONL Inter-agent links (spawn, stop, messages, tasks)

Distilled JSON (Primary)

The richest data source. Contains stats, backtracks, decisions, file maps, git diffs, reasoning traces, user messages, summaries, and timelines. See the session-analysis skill for the complete schema.

Raw JSONL (Supplementary)

Each line is a StoredEvent with fields: t (timestamp ms), event (hook event type), sid (session ID), context (on SessionStart), data (event-specific payload). Use when distilled data is insufficient or when investigating specific events not captured by extractors.

Links JSONL (Multi-Agent)

Records inter-agent relationships: spawn/stop events, messages between agents, task assignments. Only present in multi-agent sessions. Use to understand agent coordination patterns.

Workflow

When the user asks a question:

Read the full file on GitHub · 111 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 · 111 lines · 21 tokens per session scan A ef02dc9f14ae

Subscribe to this mod's changes

session-analyst is an agent published in the GitHub repository silouone/clens (6 stars, last pushed 2mo ago), licensed MIT. It adds 21 tokens to every session and 1,142 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-31.