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 skills/silouone/clens/session-analysisnpx skills add silouone/clens --skill session-analysisgit clone --depth 1 https://github.com/silouone/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.00028 | $0.01110 |
| Opus 5 | $0.00014 | $0.00555 |
| Sonnet 5 | $0.00006 | $0.00222 |
| Haiku 4.5 | $0.00003 | $0.00111 |
Grade A, and why
session-analysis 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- session-analysis — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Session Analysis
Knowledge base for interpreting clens distilled session data. This skill provides schema documentation and analysis guidance for the DistilledSession JSON files produced by clens distill.
What is clens?
clens captures AI agent sessions (Claude Code) as local JSONL event streams via hooks. The distill command processes raw events through 23 extractors into a single structured JSON file containing stats, backtracks, decisions, file maps, git diffs, edit chains, diff attribution, reasoning traces, user messages, summaries, timelines, plan drift, active duration, agent tree, agent distillation, agent enrichment, aggregate team data, team metrics, decisions (team), summary (team), communication graphs, communication sequences, agent lifetimes, and journey data.
Pillars
- Distill Schema -- Complete type-annotated schema for every field in the distilled JSON output
- Interpretation Guide -- How to read metrics, reference ranges, pattern interpretation, and actionable analysis techniques
Key Conventions
- All timestamps are Unix milliseconds (
number). Convert withnew Date(t)for human-readable output. - Cost estimates are USD approximations based on token heuristics (~20% margin). Not billing-accurate.
- Distilled files live at
.clens/distilled/{sessionId}.json. Raw events at.clens/sessions/{sessionId}.jsonl. - Session IDs are UUIDs. Use first 8 characters for display (e.g.,
a1b2c3d4). - The
completeflag indicates whether all extractors ran successfully. Iffalse, some sections may be empty. - Optional fields (marked with
?) are omitted from the JSON when absent, not set tonull.
Data Sources (23 Extractors)
| Extractor | Field | Source | Description |
|---|---|---|---|
| stats | stats |
Hook events | Aggregate counts, durations, tool usage, failure rates, cost |
| backtracks | backtracks |
Hook events | Failure retries, iteration struggles, debugging loops |
| decisions | decisions |
Hook events | Timing gaps, tool pivots, phase boundaries |
| file-map | file_map |
Hook events | Per-file read/edit/write/error counts |
| git-diff | git_diff |
Git + hooks | Commits, hunks, working tree changes |
| edit-chains | edit_chains |
Hook + transcript | Thinking-to-code binding, abandoned edits, net changes |
| diff-attribution | edit_chains.diff_attribution |
Git + hooks | Maps git hunks to specific edit tool_use_ids |
| reasoning | reasoning |
Transcript | Extended thinking blocks with intent classification |
| user-messages | user_messages |
Transcript | User prompts, commands, system messages |
| summary | summary |
Synthesized | Narrative, phases, key metrics, top errors, workload |
| timeline | timeline |
Synthesized | Chronological interleaved event stream |
| active-duration | (feeds summary) | Synthesized | Active vs idle vs pause time |
| plan-drift | plan_drift |
Hook + filesystem | Spec vs actual file drift score |
| agent-tree | agents[] |
Links + hooks | Sub-agent hierarchy tree construction |
| agent-distill | agents[] |
Transcript per agent | Per-subagent stats, file_map, tokens, model |
| agent-enrich | agents[] |
Links | Enriches agents with communication, tasks, messages |
| aggregate | (feeds stats, file_map) | Agents + parent | Merges agent data into parent-level aggregates |
| team | team_metrics |
Links | Agent count, task completions, utilization |
| decisions-team | decisions |
Links + hooks | Team-level decision extraction with agent context |
| summary-team | summary |
Links + agents | Team-level summary with agent workload breakdown |
| comm-graph | communication_graph |
Links | Message edges between agents |
| comm-sequence | comm_sequence |
Links | Temporal message ordering between agents |
| agent-lifetimes | agent_lifetimes |
Links | Agent spawn/stop timestamps and lifespans |
What ships with it
2 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.
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 · 68 lines · 28 tokens per session scan A 61df1904947e
session-analysis is a skill published in the GitHub repository silouone/clens (6 stars, last pushed 1mo ago), licensed MIT. It adds 28 tokens to every session and 1,110 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.
Other skills, from other repositories
backtrack-analysis
Deep-dive into backtracking patterns from distilled clens sessions.
journey-report
Analyze cross-session development lifecycle and generate a journey report.
session-analysis
Schema knowledge and interpretation guide for clens distilled session data. Auto-loads when reading .clens/distilled/ files.
session-compare
Compare two distilled clens sessions side-by-side to identify performance differences.
session-report
Analyze a distilled clens session and generate a structured performance report.
effect-and-errors
Composing Effect programs, domain errors, HttpError, repository error types, or error propagation at HTTP boundaries.