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 commands/edobreque/clens/session-reportgit 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.00012 | $0.01180 |
| Opus 5 | $0.00006 | $0.00590 |
| Sonnet 5 | $0.00002 | $0.00236 |
| Haiku 4.5 | $0.00001 | $0.00118 |
Grade A, and why
session-report 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-report — 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 — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Session Report Command
Generate a structured performance report for a distilled clens session. Reads the distilled JSON directly for a single comprehensive analysis.
Setup
Load the session-analysis skill for schema knowledge and interpretation context before proceeding.
Variables
TARGET: $ARGUMENTS
Workflow
1. Resolve the Session
- If TARGET is empty or
--last, find the most recent distilled session in.clens/distilled/ - If TARGET is a session ID (full UUID or prefix), find
.clens/distilled/{TARGET}*.json - If no distilled file is found, inform the user:
No distilled session found. Run
clens distill --lastfirst, then re-run this command.
2. Gather Data
Read the distilled JSON file at .clens/distilled/{sessionId}.json for the complete DistilledSession object. This single file contains all extracted data: stats, backtracks, decisions, file_map, git_diff, edit_chains, reasoning, user_messages, summary, timeline, agents, team_metrics, communication_graph, plan_drift, and cost_estimate.
No CLI commands are needed — the distilled JSON is the primary data source.
3. Build Overview Table
Extract key metrics into a summary table:
| Metric | Source Field |
|---|---|
| Duration | summary.key_metrics.duration_human |
| Model | stats.model |
| Tool calls | stats.tool_call_count |
| Failures | stats.failure_count (with failure rate as percentage) |
| Files touched | stats.unique_files.length |
| Files modified | summary.key_metrics.files_modified |
| Estimated cost | stats.cost_estimate.estimated_cost_usd |
| Backtracks | backtracks.length |
| Thinking blocks | reasoning.length |
4. Calculate Efficiency Score
Compute a weighted score from 1-10:
- Failure rate (weight 3): 10 if <5%, 7 if 5-15%, 4 if 15-30%, 1 if >30%
- Backtrack density (weight 3): 10 if 0, 8 if 1-2, 5 if 3-4, 2 if 5+
- Cost efficiency (weight 2): 10 if cost/file < $0.50, 7 if < $1.00, 4 if < $2.00, 1 if > $2.00
- Phase coherence (weight 2): 10 if clear progression, 5 if some back-and-forth, 2 if chaotic
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 · 139 lines · 12 tokens per session scan A 642acb0c2d16
session-report is a command published in the GitHub repository edobreque/clens (2 stars, last pushed 2d ago), licensed MIT. It adds 12 tokens to every session and 1,180 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-report, differing in 0 lines, and is treated as a copy.
Other commands, from other repositories
session-report
Analyze a distilled clens session and generate a structured performance report.
backtrack-analysis
Deep-dive into backtracking patterns from distilled clens sessions.
session-compare
Compare two distilled clens sessions side-by-side to identify performance differences.
project-hierarchy-check
Use this command before changing organisation, project, or database config behavior.
security-validation
Use this command before handing off security-sensitive OpenLIT changes.
code-review
Perform a comprehensive review of code changes, checking quality, security, performance, and convention compliance.