session-compare

session-compare is a skill for Claude Code, Codex from edobreque/clens. It costs 13 tokens per session (1,328 once invoked), scanned A, a copy of session-compare, MIT.

A skill for comparing two saved Clens coding-session records side by side. Clens sessions are distilled records of earlier coding work.

In plain words
What is it for?
Selecting two sessions, reading their saved data, calculating differences, and producing a comparison report.
Why use it?
It helps identify where two sessions differed and which approach worked better, instead of comparing the original session history manually.

Skill for Claude CodeCodex

Part of the clens plugin — 5 skills, 3 commands, 1 agent, 17 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/edobreque/clens/session-compare
Any agent
npx skills add edobreque/clens --skill session-compare
Clone the repo
git clone --depth 1 https://github.com/edobreque/clens

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/edobreque/clens/session-compare.svg)](https://agentmods.dev/skills/edobreque/clens/session-compare)
Your own site
<a href="https://agentmods.dev/skills/edobreque/clens/session-compare"><img src="https://agentmods.dev/badge/skills/edobreque/clens/session-compare.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,328 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00013 $0.01328
Opus 5 $0.00006 $0.00664
Sonnet 5 $0.00003 $0.00266
Haiku 4.5 $0.00001 $0.00133

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

Security

Grade A, and why

session-compare 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 4d 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

This is a copy

100% identical to session-compare — 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.

agentic/skills/session-compare/SKILL.md · 143 lines

How it starts

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

Session Compare

Compare two distilled clens sessions side-by-side to identify performance differences and determine which approach was more effective.

Variables

TARGET: $ARGUMENTS

Instructions

1. Resolve the Sessions

  • If TARGET contains two session IDs (space-separated), use those
  • If TARGET is --last 2 or --last, find the two most recent distilled sessions:
    • List files in .clens/distilled/ sorted by modification time
    • Use the two most recently modified .json files
  • If TARGET contains only one session ID, use it as Session A and the most recent other session as Session B
  • If fewer than 2 distilled sessions exist, tell the user:

    Need at least 2 distilled sessions to compare. Run clens distill on more sessions first.

Label the older session as Session A and the newer as Session B.

2. Read Both Sessions

  • Read both distilled JSON files from .clens/distilled/{sessionId}.json
  • Parse both as DistilledSession objects
  • Load the session-analysis skill for schema and interpretation context

3. Generate the Comparison Report

Use the following template. Compute all deltas and provide analysis.


Session Comparison: {session_a_id first 8 chars} vs {session_b_id first 8 chars}

Metrics Comparison

Metric Session A Session B Delta Better
Duration {a.summary.key_metrics.duration_human} {b.summary.key_metrics.duration_human} {difference} {arrow: shorter is better}
Tool calls {a.stats.tool_call_count} {b.stats.tool_call_count} {+/- difference} {fewer is generally better}
Failures {a.stats.failure_count} {b.stats.failure_count} {+/- difference} {fewer is better}
Failure rate {a.stats.failure_rate as %}% {b.stats.failure_rate as %}% {+/- difference}pp {lower is better}
Estimated cost ${a cost} ${b cost} {+/- difference} {lower is better}
Backtracks {a.backtracks.length} {b.backtracks.length} {+/- difference} {fewer is better}
Files touched {a unique_files count} {b unique_files count} {+/- difference} {context-dependent}
Files modified {a.summary.key_metrics.files_modified} {b.summary.key_metrics.files_modified} {+/- difference} {context-dependent}
Thinking blocks {a.reasoning.length} {b.reasoning.length} {+/- difference} {context-dependent}

Read the full file on GitHub · 143 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. 4d ago First seen · 143 lines · 13 tokens per session scan A 446c1a56a6ab

Subscribe to this mod's changes

session-compare is a skill published in the GitHub repository edobreque/clens (2 stars, last pushed yesterday), licensed MIT. It adds 13 tokens to every session and 1,328 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-compare, differing in 0 lines, and is treated as a copy.