# Scan sessions and learn

> Scan sessions and learn is an open-source agent skill for developer tools. Reviews recent Claude Code sessions to find repeated workflows and friction, proposing. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ccomkhj/skills/tree/main/scan-sessions-and-learn
- **Repository:** https://github.com/ccomkhj/skills
- **GitHub stars:** 10
- **License:** MIT
- **Skill name:** scan-sessions-and-learn
- **Collection:** https://github.com/ccomkhj/skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill looks back across recent Claude Code sessions to surface the habits a developer repeats, such as rules re-explained often, command chains run in the same order, and steps where work keeps stalling. It counts these patterns across a time window, filters out headless runs and short sessions, and turns the strongest ones into a few lessons. Each lesson is checked against the existing AGENTS.md, CLAUDE.md, SKILL.md files and memory to see whether it is already covered or ignored, then routed to the skill or file that owns the fix.

The workflow runs a Python scanner that produces a summary and digest of sessions, optionally splitting large sets into batches that subagents review. The agent can pull matching prompts or error snippets from specific sessions to confirm whether a prompt was a correction or just a habit. A handoff file records findings and their status so later runs pick up where the last one stopped. The skill only proposes changes and never edits files itself. Its optional new-skills mode looks for routines done by hand that a new skill could absorb.

It expects Claude Code session history on the local machine and Python 3 to run the scanner. Output is a report in chat plus one handoff file, and it offers to save a few durable facts to a memory store only when asked.

## When your agent uses it

> Retrospective over recent Claude Code sessions — find the workflows you repeat and where they stall, check each lesson against what your skills and AGENTS.md already say, and hand it to the one place that owns the fix (improve-skills, skill-flow, agents-md-improver, or a proposed edit). `--new-skills` narrows it to routines you still do by hand that a new skill should carry. Proposes only; never edits. Looks at work habits, not beliefs (socrates) or context cost (manage-context).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs Python scripts](https://github.com/ccomkhj/skills/tree/HEAD/scan-sessions-and-learn)
- [No network calls found in its scripts](https://github.com/ccomkhj/skills/tree/HEAD/scan-sessions-and-learn)
- [License: MIT](https://github.com/ccomkhj/skills/tree/HEAD/scan-sessions-and-learn)

## Features

- **Session pattern scanning:** Scans recent Claude Code sessions with a Python script, filtering by time window, repository and minimum turn count.
- **Friction detection:** Flags rewound prompts, interrupts, rejections and repeated tool failures as candidates for closer review.
- **Existing rule checks:** Compares each lesson against AGENTS.md, CLAUDE.md, skill files and memory to label it missing, ignored or covered.
- **Routed proposals:** Sends each finding to one owning skill or file with a concrete suggested change, without editing anything.
- **New skill discovery:** A narrower mode that finds routines performed by hand that a new skill could carry.
- **Persistent handoff file:** Keeps findings and their status in one file so later runs continue from earlier results.

## Good for

- Find the workflows I repeat across my recent coding sessions
- Check whether my AGENTS.md already covers a rule I keep re-explaining
- Identify manual routines that would be worth turning into a new skill
- Review where my Claude Code sessions stall and suggest which skill to update

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/scan-sessions-and-learn` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccomkhj/skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/scan-sessions-and-learn &&
cp -R "$tmp/scan-sessions-and-learn" ~/.claude/skills/scan-sessions-and-learn &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/scan-sessions-and-learn` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/scan-sessions-and-learn` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccomkhj/skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/scan-sessions-and-learn &&
cp -R "$tmp/scan-sessions-and-learn" ~/.agents/skills/scan-sessions-and-learn &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/scan-sessions-and-learn` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/scan-sessions-and-learn` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccomkhj/skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/scan-sessions-and-learn &&
cp -R "$tmp/scan-sessions-and-learn" ~/.cursor/skills/scan-sessions-and-learn &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/scan-sessions-and-learn` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ccomkhj/skills.git --path scan-sessions-and-learn
```

Or copy the folder to `~/.gemini/skills/scan-sessions-and-learn` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/scan-sessions-and-learn`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ccomkhj/skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/scan-sessions-and-learn &&
cp -R "$tmp/scan-sessions-and-learn" ~/.copilot/skills/scan-sessions-and-learn &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/scan-sessions-and-learn` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ccomkhj/skills.git
```

Then copy `skills/scan-sessions-and-learn` into your agent's skills folder as `scan-sessions-and-learn`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Scan sessions and learn change my files?

No. It proposes changes and never edits. It writes only one handoff file that records findings and their status.

### What does Scan sessions and learn need to run?

It runs a Python 3 script against local Claude Code session data, invoked with the scanner's default flags for a seven-day window unless overridden.

### What do the window flags do?

You can set a number of days or sessions, pick a repository or current, set a minimum turn count, and enable the new-skills mode.

### Is Scan sessions and learn available as a plugin?

No Claude Code plugin marketplace listing is set for this skill; it is a plain skill folder in the ccomkhj/skills repository.

### How do I install Scan sessions and learn in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/scan-sessions-and-learn to use it in all your projects, or to .claude/skills/scan-sessions-and-learn in one project.

### Does Scan sessions and learn run scripts?

Yes. It runs Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Scan sessions and learn?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Scan sessions and learn?

The closest alternatives to Scan sessions and learn are Reflect, Skill creator, Skill update, Automate me and Retro.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Reflect](https://ai-powered.com/skills/reflect-michael-denyer): Reflect is an open-source agent skill for developer tools.
- [Skill creator](https://ai-powered.com/skills/skill-creator): Skill creator is a free agent skill for ai models and llm tooling.
- [Skill update](https://ai-powered.com/skills/skill-update): Skill update is an open-source agent skill for developer tools.
- [Automate me](https://ai-powered.com/skills/automate-me): Automate me is an open-source agent skill for developer tools.
- [Retro](https://ai-powered.com/skills/retro-mattpocock): Retro is an open-source agent skill for developer tools.
- [Skill improver](https://ai-powered.com/skills/skill-improver): Skill improver is an open-source agent skill for developer tools.
- [Improve skills](https://ai-powered.com/skills/improve-skills): Improve skills is an open-source agent skill for developer tools.
- [Agent insights](https://ai-powered.com/skills/agent-insights): Agent insights is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/scan-sessions-and-learn
