hindsight
Skill0 starsChanged 4 months agoMITView on GitHub
Analyze Claude Code session logs through configurable lenses. Use when asked to review, summarize, or analyze session history.
- Installs packages
9 other projects use a version of this.
Adopted by
Most recently taken up by
- charl3y15/skillstheir own version, first seen Nov 22, 2026
- tansharma/hindsighttheir own version, first seen Nov 15, 2026
- delorenj/skillstheir own version, first seen Nov 7, 2026
- ferocknew/claude_code_public_skillstheir own version, first seen Nov 1, 2026
- JasonLovesDoggo/skillstheir own version, first seen Oct 25, 2026
- ataidecarlos/agentictheir own version, first seen Oct 17, 2026
Used with
Projects with it also use grilling.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkillgrilling
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- delorenj/skills★ 17same name
- ferocknew/claude_code_public_skills★ 9same name
- dstotijn/agent-skills★ 1same name
- YogirajA/Claude-Skills★ 1same name
- ataidecarlos/agentic★ 0same name
- charl3y15/skills★ 0same name
- JasonLovesDoggo/skills★ 0same name
- simhskal/claude-skills★ 0same name
- tansharma/hindsight★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- lens-writingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
32 rules. 0 are common, 20 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
20
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
A session log source: must be installed and synced.
- Very specific: line 38
User directories: must exist at ~/.claude/hindsight/.
- Distinctive: line 49
Follow these phases in order.
- Very specific: line 55
Before doing anything else, probe which session-log sources are installed and healthy.
- Very specific: line 69
If AVAILABLE_SOURCES is empty, halt and tell the user:
- Distinctive: line 76
If exactly one source is available, use it exclusively (single-source path — identical to today's ccvault-only behavior with agentsview …
- Distinctive: line 78
If both are available, proceed with dual-source Phase 1 (see next task — for now, treat this as a soft flag to plumb through, since …
- Distinctive: line 91
If the date range is ambiguous, ask the user to clarify.
- Distinctive: line 95
Read the available lenses from both locations (list both directories):
- Very specific: line 106
If no lens intent is expressed, default to standup
- Distinctive: line 107
If the intent doesn't clearly match any available lens, list the options and ask
- Distinctive: line 111
Before proceeding, briefly state what you understood: "Analyzing <date-range> with the <lens-name> lens."
- Distinctive: line 114
If neither lenses directory exists, tell the user to run the install script and stop.
- Very specific: line 120
Look up its ## <source> section in skills/shared/sources.md
- Distinctive: line 121
Run its list-sessions command over the date range from Phase 0
- Distinctive: line 128
If the final merged list is empty: halt with "No sessions found for the specified date range."
- Very specific: line 136
Read the lens file from its resolved location (check project lenses first, then user lenses: …
- Very specific: line 139
Check if it has an ## Extraction Hints section
- Distinctive: line 140
If it does, extract the text of that section — it will be appended to the extraction prompt
- Very specific: line 151
Before extracting, check if summaries already exist at ~/.claude/hindsight/reports/<date-range>/summaries/.
- Distinctive: line 157
If SOME sessions have summaries but others don't, extract only the missing ones and report: "Found cached summaries for X/N sessions.
- Distinctive: line 162
Before dispatching subagents, create the summaries staging directory:
- Very specific: line 177
If the lens has extraction hints, replace {LENS_EXTRACTION_HINTS} in the extraction prompt with those hints.
- Distinctive: line 226
Wait for each batch to complete before starting the next
- Distinctive: line 231
If a subagent fails, log the error and continue with remaining sessions
- Distinctive: line 238
Read the full lens file from its resolved location (same precedence as Phase 2)
- Very specific: line 240
Read ALL session summary files from ~/.claude/hindsight/reports/<date-range>/summaries/
- Distinctive: line 246
Date range is a hard filter: Do not attribute work from other dates.
- Distinctive: line 249
Do not fabricate: Every claim must trace to a session summary.
- Distinctive: line 251
Omit rather than pad: If a project has no specific activity for the date range, leave it out entirely — do not write "continued …
- Very specific: line 259
Create the directory if needed using mkdir -p
- Very specific: line 260
Write the report file using the Write tool.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- ABOUTME: Main orchestrator skill for the hindsight plugin. --><!-- ABOUTME: Dispatches subagents to summarize sessions, then applies a lens for cross-cutting analysis. -->Hindsight — Session Log Analyzer
Input
This skill accepts freeform natural language describing what the user wants to analyze. The LLM interprets the input to determine two things:
- Date range — when to look
- Lens — what kind of analysis to produce
Examples of valid input:
yesterday standupwhat knowledge can we extract from last week's sessions?summarize what happened todayreview the last 3 days for workflow optimization opportunities2026-03-01:2026-03-05 knowledge-extractionwhat did I work on this past week?
Structured formats like yesterday standup still work — the skill handles both.
Prerequisites
A session log source must be installed and synced. Currently supported:
- ccvault (
brew install 2389-research/tap/ccvault && ccvault sync)
See
skills/shared/sources.mdfor probe commands and CLI contracts.- ccvault (
User directories must exist at
~/.claude/hindsight/. If they don't, run:bash <plugin-root>/scripts/install.shWhere
<plugin-root>is determined by taking the skill base directory shown in the loading message above and going up two levels.
Pipeline
Follow these phases in order. Do not skip phases.
Phase 0: Interpret Input and Validate
Step 0: Detect available sources
Before doing anything else, probe which session-log sources are installed and healthy. Read skills/shared/sources.md and for each ## <source> section, run its Probe command. Build an AVAILABLE_SOURCES list containing every source whose probe succeeds.
AVAILABLE_SOURCES=""
# ccvault
if command -v ccvault >/dev/null 2>&1 && ccvault orient --json >/dev/null 2>&1; then
AVAILABLE_SOURCES="$AVAILABLE_SOURCES ccvault"
fi
# agentsview
if command -v agentsview >/dev/null 2>&1 && agentsview session list --limit 1 --json >/dev/null 2>&1; then
AVAILABLE_SOURCES="$AVAILABLE_SOURCES agentsview"
fiIf AVAILABLE_SOURCES is empty, halt and tell the user:
No session log source found. Install one of:
- ccvault:
brew install 2389-research/tap/ccvault && ccvault sync- agentsview:
brew install --cask agentsview && agentsview sync
If exactly one source is available, use it exclusively (single-source path — identical to today's ccvault-only behavior with agentsview substituted when appropriate).
If both are available, proceed with dual-source Phase 1 (see next task — for now, treat this as a soft flag to plumb through, since dual-source merge is wired in Task 4).
Step 1: Determine date range
Interpret the user's input to extract a date range. Resolve to start and end dates
(YYYY-MM-DD format). Use the Bash tool with date command for date math.
Common patterns:
- "today" / "yesterday" / "last week" / "last month" / "last N days"
- "this past week" / "since Monday" / "March 1st through 5th"
- Explicit formats like
2026-03-23or2026-03-01:2026-03-05
If the date range is ambiguous, ask the user to clarify.
Step 2: Determine lens
Read the available lenses from both locations (list both directories):
~/.claude/hindsight/lenses/(user/built-in lenses)<project-root>/.claude/hindsight/lenses/(project-scoped lenses)
Project lenses take precedence if a name collision occurs.
Match the user's intent to the best available lens:
- Explicit lens name (exact or partial match):
knowledge→knowledge-extraction - Intent-based matching: "what did I learn" →
knowledge-extraction, "standup summary" →standup, "improve my workflow" →workflow-optimization - If no lens intent is expressed, default to
standup - If the intent doesn't clearly match any available lens, list the options and ask
Step 3: Confirm interpretation
Before proceeding, briefly state what you understood:
"Analyzing <date-range> with the <lens-name> lens."
If neither lenses directory exists, tell the user to run the install script and stop.
Phase 1: Collect Sessions
For each source in AVAILABLE_SOURCES (from Phase 0):
- Look up its
## <source>section inskills/shared/sources.md - Run its list-sessions command over the date range from Phase 0
- Parse the JSON output
- Tag each session row with
source: "<source-name>" - Filter client-side by the source's timestamp field where the source's CLI doesn't natively support date-range flags (ccvault requires this; agentsview does not since its
--date-from/--date-tohandle it natively)
Concatenate all tagged rows. Dedupe by session id: if the same ID appears from two sources, keep the ccvault-sourced row and drop the agentsview one. This is a naive tie-break — ccvault is preferred because its extraction assumptions match its field names, and the "both installed with overlapping coverage" case is uncommon.
If the final merged list is empty: halt with "No sessions found for the specified date range."
Report to the user: "Found N sessions across M projects for <date-range> (sources: <comma-separated-list>)."
The tagged source field on each session row propagates into Phase 3 for source-aware subagent dispatch (see Task 5).
Phase 2: Load Lens
- Read the lens file from its resolved location (check project lenses first,
then user lenses:
<project-root>/.claude/hindsight/lenses/<lens-name>.md, falling back to~/.claude/hindsight/lenses/<lens-name>.md) - Check if it has an
## Extraction Hintssection - If it does, extract the text of that section — it will be appended to the extraction prompt
- Extract the
versionfield from the lens frontmatter. If not present, default to1
Phase 3: Extract Session Summaries (Parallel Subagents)
For each session, dispatch a subagent to produce a summary using the session's
source CLI (see skills/shared/sources.md). This keeps subagent context out of
the main conversation.
Cache check:
Before extracting, check if summaries already exist at
~/.claude/hindsight/reports/<date-range>/summaries/. For each session in the list,
check if <sessionId>.md exists in that directory. If ALL sessions have existing
summaries, skip extraction entirely and report:
"Found cached summaries for N sessions. Skipping extraction."
If SOME sessions have summaries but others don't, extract only the missing ones and report: "Found cached summaries for X/N sessions. Extracting Y remaining..."
Setup:
Before dispatching subagents, create the summaries staging directory:
mkdir -p ~/.claude/hindsight/reports/<date-range>/summariesWhere <date-range> follows the same format as the report output path (e.g., 2026-03-23
for a single day, 2026-03-20_to_2026-03-23 for a range).
Constructing the subagent prompt:
For each session, construct the subagent prompt by combining:
- The extraction prompt from
<plugin-root>/skills/shared/extraction-prompt.md(read it once and reuse) - The session summary schema from
<plugin-root>/skills/shared/session-summary-schema.md(read it once and reuse) - If the lens has extraction hints, replace
{LENS_EXTRACTION_HINTS}in the extraction prompt with those hints. If no hints, replace with empty string. - Source-specific instructions — for each session, use the
sourcefield tagged in Phase 1 to look up the matching## <source>section ofskills/shared/sources.md. Inline that section's CLI-contract content in place of{SOURCE_CLI_CONTRACT}, and inline the source name (e.g.,ccvaultoragentsview) in place of{source}. Different sessions in the same run may resolve to different sources. - The session ID, project name, and project path from the session list
- The date range being analyzed
- The output file path where the subagent should write its summary
The subagent prompt should be structured as:
You are a session extraction agent. Your job is to read a session
and produce a standardized summary.
## Your Task
Analyze session: {sessionId}
Project: {project} ({projectPath})
Date range: {startDate} to {endDate}
**IMPORTANT: Only summarize activity that occurred within the date range above.**
This session may span a longer period, but your summary must only cover what
happened between {startDate} and {endDate}. Use turn timestamps to determine
which activity falls within the window. If no activity occurred in this window,
write a summary with just the Metadata section and note "No activity in date range"
in the What Happened section.
**Filter by date range.** Each turn has a timestamp. Skip turns outside the
requested date range. Only include activities, decisions, and outcomes from
turns within the window.
## Instructions
{contents of extraction-prompt.md, with {source}, {SOURCE_CLI_CONTRACT}, and {LENS_EXTRACTION_HINTS} replaced}
## Output Schema
{contents of session-summary-schema.md}
## Output
Write your session summary markdown to this file using the Write tool:
{summaries_dir}/{sessionId}.md
Write ONLY the session summary markdown to the file. No preamble, no commentary.
After writing, respond with just the file path to confirm completion.Batching:
- Dispatch subagents in parallel batches of up to 5
- Wait for each batch to complete before starting the next
- Report progress: "Summarized N/M sessions..."
Error handling:
- If a subagent fails, log the error and continue with remaining sessions
- Include a note in the final report about any failed extractions
Phase 4: Cross-Cutting Analysis
Once all session summaries have been written to disk:
- Read the full lens file from its resolved location (same precedence as Phase 2)
- Extract the
# Analysis Instructionssection (everything between# Analysis Instructionsand## Extraction Hints, or end of file if no extraction hints) - Read ALL session summary files from
~/.claude/hindsight/reports/<date-range>/summaries/ - Apply the lens analysis instructions to produce the final report
- The report should follow the format specified in the lens
Aggregation compliance rules:
- Date range is a hard filter. Do not attribute work from other dates. If a summary covers a wider range than requested, only include activity that can be specifically tied to the requested dates.
- Do not fabricate. Every claim must trace to a session summary. Do not invent next steps, blockers, or context that does not appear in any summary.
- Omit rather than pad. If a project has no specific activity for the date range, leave it out entirely — do not write "continued development" filler.
Phase 5: Write Report
- Determine the output path:
- For single dates or named ranges resolving to a single day:
~/.claude/hindsight/reports/YYYY-MM-DD/<lens-name>.md - For multi-day ranges:
~/.claude/hindsight/reports/YYYY-MM-DD_to_YYYY-MM-DD/<lens-name>.md
- For single dates or named ranges resolving to a single day:
- Create the directory if needed using
mkdir -p - Write the report file using the Write tool. Include a version line after the report title:
*Generated with <lens-name> lens v<version>* - Report to the user: "Report written to
<path>" - Display the full report to the user
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.

