echo-sleuth-for-claude
AGENTS.md9 starsChanged 8 months agoISCView on GitHub
Echo Sleuth mines Claude Code session JSONL files for insights. It helps users recall past work, trace decisions, learn from mistakes, and understand file histories by analyzing ~/.claude/projects/ conversation data. Flow: Commands dispatch to agents. Agents use skills for domain knowledge and call scripts (via Bash tool) for data extraction. Scripts are thin bash wrappers around scripts/echolib.py.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository4 other files it gives its agents.
- experience-synthesisSkill
- git-miningSkill
- jsonl-coreSkill
- memory-managementSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
All in scripts/, require only Python 3.6+ (stdlib only) and bash.
- Very specific: line 58
Index first: Always query list-sessions.sh before opening raw .jsonl files.
- Very specific: line 59
Script-based parsing: Use the provided scripts instead of ad-hoc grep/jq pipelines.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Echo Sleuth — Plugin Development Guide
Purpose
Echo Sleuth mines Claude Code session JSONL files for insights. It helps users recall past work, trace decisions, learn from mistakes, and understand file histories by analyzing ~/.claude/projects/ conversation data.
Architecture
commands/ → User-facing slash commands (entry points)
agents/ → Task-specific agents dispatched by commands via the Task tool
skills/ → Reusable knowledge (parsing rules, git patterns, synthesis taxonomy)
scripts/ → Python/bash tools that do the actual JSONL parsing and extractionFlow: Commands dispatch to agents. Agents use skills for domain knowledge and call scripts (via Bash tool) for data extraction. Scripts are thin bash wrappers around scripts/echolib.py.
Commands
/recall— Search and analyze past sessions/recap— Summarize recent sessions/timeline— Chronological project history (sessions + git)/lessons— Extract lessons learned/dashboard— Global memory overview and staleness alerts/audit— Memory staleness audit (heuristic or deep)/extract— Extract knowledge from conversation sessions/prune— Interactive memory cleanup
Agents
recall— Unified search: session finding, decision archaeology, mistake huntingfile-historian— Trace a file's history across sessions and gitanalyze— Deep analysis of specific sessionsschema-scout— Detect JSONL schema changesmemory-auditor— Deep content-aware memory verification
Skills
jsonl-core— Canonical JSONL parsing infrastructure and record type referencegit-mining— Git log/blame/diff patterns for correlating commits with sessionsexperience-synthesis— Taxonomy for categorizing insights (decisions, mistakes, patterns)memory-management— Memory format, staleness scoring, and routing knowledge
Scripts
All in scripts/, require only Python 3.6+ (stdlib only) and bash. Git scripts additionally require git.
echolib.py— Core Python parsing module (no pip dependencies)list-sessions.sh— Index-based session listing with grep/limitsession-stats.sh— Single-pass session statisticsextract-messages.sh— Human-readable message extractionextract-tools.sh— Tool call extraction with error filteringextract-files-changed.sh— Files edited in a sessionparse-jsonl.sh— Low-level JSONL parser with schema detectionbuild-index.sh— Build fallback index for projects without sessions-index.jsongit-context.sh/git-sessions.sh— Git history helpersmemory-dashboard.sh— Memory overview and heuristic audit outputextract-knowledge.sh— Two-pass knowledge extraction from sessionsrecall-lite.sh— End-to-end no-API recall: list-sessions + extract-messages + extract-tools, dumped raw. Wraps the others. Invoked by/recall --liteand runnable directly from a shell.
Key Conventions
- Index first: Always query
list-sessions.shbefore opening raw.jsonlfiles. - Script-based parsing: Use the provided scripts instead of ad-hoc grep/jq pipelines.
echolib.pyhandles schema variations and noise filtering. - Grep tool is not bash: In agent/skill docs,
Grep pattern=...calls refer to the Claude Code Grep tool, not the bashgrepcommand. ${CLAUDE_PLUGIN_ROOT}: Resolves to this plugin's root directory at runtime. Use it to reference scripts.- Cache side effect:
build-index.sh/build_fallback_index()writes.echo-sleuth-index.jsoninside~/.claude/projects/<dir>/. This is excluded from the plugin repo via.gitignore. - Lite mode: Slash commands cost a model turn by definition — that's the contract. When users hit billing/tier errors or want raw evidence, route them to lite mode: either
/recall --lite(one cheap turn, raw script output, no synthesis) orscripts/recall-lite.shfrom a shell (zero API calls). Do not pretend a slash command can be made API-free. - Empty TSV fields: When parsing tab-separated rows from
list-sessions.shin bash, do not useIFS=$'\t' readdirectly — bash collapses consecutive tabs because tab is whitespace IFS, which corrupts rows where SUMMARY (or any other field) is empty. Translate tabs to a non-whitespace delimiter first (tr '\t' $'\x1f', thenIFS=$'\x1f' read). Seerecall-lite.shfor the pattern.
Prerequisites
- Python 3.6+ (stdlib only, no pip packages)
- bash
- git (optional, needed only for git-mining features and git-based agents)
- curl (optional, needed only for URL validation in /audit --deep)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

