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.
git clone --depth 1 https://github.com/silouone/clensWrote 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.
[](https://agentmods.dev/commands/silouone/clens/backtrack-analysis)<a href="https://agentmods.dev/commands/silouone/clens/backtrack-analysis"><img src="https://agentmods.dev/badge/commands/silouone/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.
<a href="https://agentmods.dev/commands/silouone/clens/backtrack-analysis"><img src="https://agentmods.dev/badge/commands/silouone/clens/backtrack-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00012 | $0.00724 |
| Opus 5.5 | $0.00005 | $0.00290 |
| Sonnet 5.5 | $0.00002 | $0.00145 |
| Haiku 4.5 | $0.00001 | $0.00072 |
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- backtrack-analysis — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backtrack Analysis Command
Analyze backtracking patterns from a distilled clens session. Identifies wasted effort: failure retries, iteration struggles, and debugging loops.
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 full DistilledSession object. Focus on: backtracks, file_map, decisions, reasoning, timeline, stats.
No CLI commands are needed — the distilled JSON is the primary data source.
3. Analyze Backtracks
For each backtrack entry, determine:
- Type classification:
failure_retry,iteration_struggle, ordebugging_loop - Severity: Based on attempt count, duration, and recurrence
- Root cause hypothesis: Infer from error messages, file paths, and reasoning context
- Prevention strategy: Actionable recommendation to avoid similar issues
4. Identify Hot Files
Cross-reference backtrack file_path values to find fragile files:
- Files appearing in 2+ backtracks are flagged as fragile
- Rank by backtrack count descending
- Note the types of backtracks each file triggers
5. Assess Tool Reliability
For each tool involved in backtracks:
- Calculate failure-to-success ratio
- Compare against session-wide tool usage from
stats.tools_by_name - Flag tools with failure rate above 20%
6. Generate Report
Produce a structured report with these sections:
- Summary table: Total backtracks, counts by type, wasted attempts, time in backtracks, percentage of session
- Severity assessment: Low / Medium / High rating with justification
- Backtrack details: Per-backtrack analysis with what happened, reasoning context, root cause, prevention
- Hot files: Table of fragile files with backtrack counts and types
- Tool reliability: Table of tools ranked by failure rate
- Timeline context: Simplified timeline showing events around each backtrack
- Prevention checklist: Actionable items relevant to detected patterns
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.
- 1mo ago First seen · 79 lines · 12 tokens per session scan A e77566d62b28
backtrack-analysis is a command published in the GitHub repository silouone/clens (6 stars, last pushed 2mo ago), licensed MIT. It adds 12 tokens to every session and 724 once invoked, about $0.0000 per session on Opus 5.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 commands, from other repositories
backtrack-analysis
Deep-dive into backtracking patterns from distilled clens sessions.
fix-issues
Diagnose, reproduce, then fix reproducible open GitHub issues in parallel: one clean worktree/issue; symlink build artifacts to avoid rebuilds.
investigate
Establish the proven causal chain for the target — from the observed symptom to the root cause that actually explains it — and write a report a fixer or planner can act on without repeating your work. You change nothing and fix nothing: the repository must be exactly as you found it when you finish. No one watches the…
maintainer-review-error-handling
Review the PR for error-handling correctness — surfaced errors, no silent swallows, consistent error patterns (Pi-tuned).
review-errors
Find either defect: a real failure crosses the changed code and becomes indistinguishable from success to the caller, operator, or user who must react; or it escapes its owning item and aborts independent work. Not every error needs logging; recovery is correct when the contract permits it and the right owner can…
classify-red
The project's gate ran and at least one check failed. $ARTIFACTSDIR/validation.md is the record: every check that ran, its group, its exit status, each failing check's output tail, and the path of each check's full output log. Decide why the failed checks failed, judging every one the record names. You fix nothing and…