retrolens

retrolens is a skill for Claude Code from JoelYYoung/retrolens. It costs 40 tokens per session (4,468 once invoked), scanned B, a copy of retrolens, MIT.

A tool for inspecting AI conversation logs as if they were debugging records. It helps you move from a project’s saved sessions to individual turns, tool calls, and conclusions.

In plain words
What is it for?
It discovers available logs, connects them to a project, analyzes selected sessions, and extracts human lessons and instructions for future agents.
Why use it?
It makes long or confusing agent sessions easier to reconstruct, so you can understand what happened and identify useful lessons.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Part of the retrolens plugin — 1 skill, 4 commands shipped together

Good fit It discovers available logs, connects them to a project, analyzes selected sessions, and extracts human lessons and instructions for future agents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joelyyoung/retrolens/retrolens-plugin
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.

Any agent
npx skills add JoelYYoung/retrolens --skill retrolens-plugin
Clone the repo
git clone --depth 1 https://github.com/JoelYYoung/retrolens

Made for: Claude Code.

Or install retrolens, the plugin that ships this one along with the rest of its 1 skill, 4 commands.

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 retrolens

README.md
[![agentmods](https://agentmods.dev/badge/skills/joelyyoung/retrolens/retrolens-plugin/github.svg)](https://agentmods.dev/skills/joelyyoung/retrolens/retrolens-plugin)
Your own site
<a href="https://agentmods.dev/skills/joelyyoung/retrolens/retrolens-plugin"><img src="https://agentmods.dev/badge/skills/joelyyoung/retrolens/retrolens-plugin/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 retrolens

Your own site · 80×15
<a href="https://agentmods.dev/skills/joelyyoung/retrolens/retrolens-plugin"><img src="https://agentmods.dev/badge/skills/joelyyoung/retrolens/retrolens-plugin.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,468 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 89% 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.1 $0.00040 $0.04468
Opus 5 $0.00020 $0.02234
Sonnet 5 $0.00008 $0.00894
Haiku 4.5 $0.00004 $0.00447

Measured 10d ago against content hash b96a1695e714, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

retrolens scanned grade B with 1 finding 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 10d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/sample_log.py, scripts/setup.sh, scripts/validate_reader.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

find ~ -name "*.jsonl" -path "*/.claude/*" -maxdepth 6 2>/dev/null | head -20
Origin

This is a copy

89% identical to retrolens — 36 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.

retrolens-plugin/SKILL.md · 485 lines

How it starts

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

RetroLens — AI Conversation Log Navigator

Navigate AI agent conversation logs like a debugger. Point at a log directory, list sessions, then drill into turns, tool calls, and raw data.

The typical workflow follows these steps. Each step has a corresponding command (for Claude Code) and a detailed workflow section below.

/retrolens         → Discover log locations, see what's available
       ↓
/retrolens:connect → Choose a project, connect to its logs, verify
       ↓
/retrolens:analyze → Pick session(s), drill into turns, map phases
       ↓
/retrolens:reflect → Extract human lessons + agent directives

For non-Claude-Code agents, follow the same flow using the Workflow sections (A → B/C → D) directly.

Quick Start

First check whether retrolens is already installed:

retrolens --version

If the command is found, proceed to CLI Commands below.

If not found, ask the user which option they prefer:

  1. Already installed — retrolens is installed but not on PATH. Ask the user where/how it was installed (e.g., which venv, conda env, or directory), then help activate the correct environment or adjust PATH.

  2. Agent installs — let the agent install it. Ask the user which method to use:

    Method Command
    pip pip install retrolens
    uv uv pip install retrolens
    pipx pipx install retrolens

    Run the selected command and verify with retrolens --version.

  3. Install manually — the user will install it themselves. Provide the install options above for reference and wait for them to confirm it's ready.


CLI Commands

cfg — Set Working State (Do This First) ⭐

retrolens cfg set --path /path/to/logs   # Set log directory (auto-detects format)
retrolens cfg set --source vscode        # Override detected source type
retrolens cfg set --reader ./reader.py   # Register a custom reader
retrolens cfg show                       # View current config
retrolens cfg clear                      # Reset to defaults

Read the full file on GitHub · 485 lines

Files

What ships with it

9 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.

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. 10d ago First seen · 485 lines · 40 tokens per session scan B b96a1695e714

Subscribe to this mod's changes

retrolens is a skill published in the GitHub repository JoelYYoung/retrolens (2 stars, last pushed 4mo ago), licensed MIT. It adds 40 tokens to every session and 4,468 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). It is 89% identical to retrolens, differing in 36 lines, and is treated as a copy.

Related

Other skills, from other repositories

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

systematic-debugging

Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.

open-metadata/OpenMetadata · 37 tokens

diagnose

Trace from a reproduced symptom to the source code that causes it. Pin the specific file and approximate line, rate confidence in the cause and clarity of the fix independently, and always propose a concrete fix.

emdash-cms/emdash · 43 tokens

repro-admin

Reproduce an EmDash admin UI bug. Attach a container, start the demo dev server, drive the admin with agent-browser using the dev-bypass session, and capture the reproduction as screenshots plus a replayable transcript.

emdash-cms/emdash · 48 tokens

log-error-digest

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…

zebbern/claude-code-guide · 71 tokens

byted-util-volcengine-detect-retry

An orchestration workflow for Volcengine Cloud Detect, a service that checks websites or network endpoints from test locations.

bytedance/agentkit-samples · 101 tokens