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.
npx agentmods add agents/edobreque/clens/session-analystgit clone --depth 1 https://github.com/edobreque/clensWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00021 | $0.01142 |
| Opus 5 | $0.00010 | $0.00571 |
| Sonnet 5 | $0.00004 | $0.00228 |
| Haiku 4.5 | $0.00002 | $0.00114 |
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 2d 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.
This is a copy
100% identical to session-analyst — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
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:
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.
- 2d ago First seen · 111 lines · 21 tokens per session scan A ef02dc9f14ae
session-analyst is an agent published in the GitHub repository edobreque/clens (2 stars, last pushed 2d ago), licensed MIT. It adds 21 tokens to every session and 1,142 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to session-analyst, differing in 0 lines, and is treated as a copy.
Other agents, from other repositories
session-analyst
Read-only agent that explores clens session data and answers questions about agent performance patterns.
ADR Generator
Expert agent for creating comprehensive Architectural Decision Records (ADRs) with structured formatting optimized for AI consumption and human readability.
AI-Native Engineer
AI-native engineering persona focused on GitHub platform and Azure AI Foundry: designs production agentic architectures (model routing, prompt and semantic caching, context and memory, tools and MCP, guardrails, evaluation, observability, and cost), then renders complete architecture diagrams with official Azure…
Azure Principal Architect mode instructions
Provide expert Azure Principal Architect guidance using Azure Well-Architected Framework principles and Microsoft best practices.
Frontier Engineer
Senior engineer persona for Frontier Cockpit: builds and extends local OpenTelemetry, Azure forwarding, dashboards, workshop assets, and repository automation while preserving telemetry privacy and validation gates.
Data Auditor
Read-only auditor for Frontier Cockpit: checks that rendered and documented numbers match cited or audited sources and flags fabricated, altered, or unsourced metrics. Does not edit files.