backtrack-analysis

backtrack-analysis is a skill for Claude Code from edobreque/clens. It costs 12 tokens per session (2,015 once invoked), scanned A, a copy of backtrack-analysis, MIT.

A skill for examining wasted effort in a saved Clens coding session, including failed retries, difficult iterations, and debugging loops.

In plain words
What is it for?
Finding a session, reviewing its timeline and decisions, and producing either a backtracking analysis or a short clean-execution report.
Why use it?
It turns a long session record into a focused explanation of what went wrong and where the work had to backtrack.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the clens plugin — 5 skills, 3 commands, 1 agent, 17 hooks shipped together

Good fit Finding a session, reviewing its timeline and decisions, and producing either a backtracking analysis or a short clean-execution report.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/edobreque/clens/backtrack-analysis
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 edobreque/clens --skill backtrack-analysis
Clone the repo
git clone --depth 1 https://github.com/edobreque/clens

Made for: Claude Code.

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 backtrack-analysis

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/edobreque/clens/backtrack-analysis"><img src="https://agentmods.dev/badge/skills/edobreque/clens/backtrack-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,015 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00012 $0.02015
Opus 5.5 $0.00005 $0.00806
Sonnet 5.5 $0.00002 $0.00403
Haiku 4.5 $0.00001 $0.00201

Measured 1mo ago against content hash 7d69e1c2ce21, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

backtrack-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 1mo 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 backtrack-analysis — 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/backtrack-analysis/SKILL.md · 195 lines

How it starts

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

Backtrack Analysis

Deep-dive into backtracking patterns from a distilled clens session. This command focuses entirely on wasted effort: failure retries, iteration struggles, and debugging loops.

Variables

TARGET: $ARGUMENTS

Instructions

1. Resolve the Session

  • If TARGET is empty or --last, find the most recent distilled session:
    • List files in .clens/distilled/ sorted by modification time
    • Use the most recently modified .json file
  • If TARGET is a session ID (full UUID or prefix), find .clens/distilled/{TARGET}*.json
  • If no distilled file is found, tell the user:

    No distilled session found. Run clens distill --last to distill your most recent session, then re-run this command.

2. Read the Data

  • Read the distilled JSON file at .clens/distilled/{sessionId}.json
  • Parse the full DistilledSession object
  • Focus on: backtracks, file_map, decisions, reasoning, timeline, stats
  • Load the session-analysis skill for schema and interpretation context

3. Generate the Analysis

Use the following template. If there are zero backtracks, generate a short clean-execution report instead.


If Zero Backtracks

Backtrack Analysis: {session_id first 8 chars}

No backtracks detected. This session had a clean execution with no detected failure retries, iteration struggles, or debugging loops.

Session stats for context:

  • Duration: {summary.key_metrics.duration_human}
  • Tool calls: {stats.tool_call_count}
  • Failure rate: {stats.failure_rate as %}%
  • Files modified: {summary.key_metrics.files_modified}

{If stats.failure_count > 0 but no backtracks: "Note: {failure_count} tool failures occurred but none triggered backtracking patterns. The agent recovered without retrying."}


If Backtracks Exist

Backtrack Analysis: {session_id first 8 chars}

Summary

Metric Value
Total backtracks {backtracks.length}
failure_retry {count of type failure_retry}
iteration_struggle {count of type iteration_struggle}
debugging_loop {count of type debugging_loop}
Total wasted attempts {sum of all backtracks' attempts}
Time spent backtracking {sum of (end_t - start_t) for all backtracks, formatted as human duration}
% of session in backtracks {backtrack_time / stats.duration_ms * 100}%
Unique files affected {count of unique file_path values across backtracks}

Read the full file on GitHub · 195 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. 1mo ago First seen · 195 lines · 12 tokens per session scan A 7d69e1c2ce21

Subscribe to this mod's changes

backtrack-analysis is a skill published in the GitHub repository edobreque/clens (2 stars, last pushed 9d ago), licensed MIT. It adds 12 tokens to every session and 2,015 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to backtrack-analysis, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

backtrack-analysis

Deep-dive into backtracking patterns from distilled clens sessions.

silouone/clens · 12 tokens

trulens-instrumentation

Instrument LLM apps with TruLens OTEL-based tracing - from setup to debugging and optimization.

truera/trulens · 25 tokens

arize-trace

Downloads, exports, and inspects existing Arize traces and spans to understand what an LLM app is doing or debug runtime issues. Covers exporting traces by ID, spans by ID, sessions by ID, and root-cause investigation using the ax CLI. Use when the user wants to look at existing trace data, see what their LLM app is…

Arize-ai/arize-skills · 92 tokens

detect-hallucinations

Use this to detect when an LLM is making things up, so you can flag or block confident-but-wrong answers before users see them. Trigger on "detect hallucinations", "is the model making this up", "flag unreliable answers", "hallucination check", "confidence scoring for LLM output", or hardening a RAG/QA system. Pick a…

ContextJet-ai/awesome-llm-observability · 92 tokens

debug-agent-from-traces

Use this to diagnose WHY an LLM agent or chain produced a wrong, empty, slow, or expensive result, by reading its observability trace. Trigger on "my agent gave the wrong answer", "the chain returned nothing", "why is this so slow/expensive", "debug this trace/run", or when a trace tree is available. Walk the span…

ContextJet-ai/awesome-llm-observability · 85 tokens

journey-report

Analyze cross-session development lifecycle and generate a journey report.

silouone/clens · 10 tokens