# hindsight

> A Claude Code skill that reviews a session and saves only lasting lessons to memory

- Repository: https://github.com/EfficientStreet/hindsight
- Category: Agent skills & plugins
- Stars: 174 · Forks: 27 · Language: n/a · License: MIT
- Experience: Beginner friendly
- Page: https://ir.adyog.com/repos/efficientstreet/hindsight/

AI coding assistants forget everything between sessions. You correct the same mistake twice, or the assistant re-learns through trial and error something it already worked out last week. Hindsight is a single skill file that targets this problem.

When you ask for it, it goes back over the whole session: the tasks, the corrections and the dead ends. For anything that took several tries, it looks for the one upstream fix that would have prevented the chain. It keeps only lessons that would change how future work is handled and writes them to the assistant's memory folder. A clean session gets a plain 'nothing to report'.

It was built for and tested with Claude Code's per-project memory. Before writing, it checks whether an existing memory already covers the topic and extends that one instead of adding a near-duplicate. It never redoes the session's work and runs only when you trigger it. Per the README, it falls back to a written report if there is no memory system.

## What it does

- **One trigger reviews the whole session**: Phrases like 'get some hindsight' or 'what did you learn today?' start a pass over the full session, not just the last exchange.
- **Looks for root causes**: For work that took multiple attempts, it asks what single earlier fix would have avoided the whole chain, rather than just noting a mistake happened.
- **Filters instead of logging**: Only lessons that would change how future tasks are handled are saved. One-off specifics are discarded.
- **Updates existing memory**: It checks for an existing entry on the same topic and extends it rather than creating a near-duplicate.
- **On-demand and read-only**: The skill sets disable-model-invocation, so the assistant never runs it on its own. Its only writes are to memory and its index.

## What you could build

- Run it at the end of a long coding session to record the corrections you had to make.
- Capture a project's settled decisions so a future session doesn't re-argue them.
- Cut token spend by saving lessons that would otherwise be rediscovered by trial and error.
- Adapt the skill's environment section to another assistant's memory layout.
- Get a written lessons report when your assistant has no persistent memory.

## Who it's for

Claude Code users, or users of similar assistants with file-based memory, who are comfortable copying a file into a skills folder.

## Get started

Copy SKILL.md into your assistant's skills folder (use ~/.claude/skills/hindsight for all projects). At the end of a session, say something like 'Get some hindsight.'

```
mkdir -p .claude/skills/hindsight
```
```
cp SKILL.md .claude/skills/hindsight/SKILL.md
```

Tags: claude-code, skills, memory, self-improvement
