Skip to content
Skill

Lesson refresh

Periodically prunes a project's lesson archive by keeping, updating, promoting, encoding

Lesson refresh is an open-source agent skill for knowledge and memory. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
6
Last commit
License
MIT
Listing updated

Similar skills

About Lesson refresh

This skill maintains a project's tasks/lessons/ folder, the store of corrections an agent accumulates over sessions. For each active lesson it gathers evidence such as whether the referenced code still exists, whether the rule is already enforced by a hook, CLAUDE.md or another skill, whether sibling lessons repeat the same pattern, and how old the entry is. It then assigns one verdict per lesson: keep, update, promote, encode or archive.

The workflow runs in phases: an inventory of lesson files, a pass over graph warnings produced by a lesson-graph script to catch broken supersedes or contradicts pointers, evidence gathering, a verdict table, and then application. Interactive mode shows the batch for approval. Headless mode applies only low-risk verdicts and queues promotions and encodings for later human review. The skill never deletes lesson files; archived lessons are moved to a _archive folder with their status updated.

It expects a repository that uses the tasks/lessons layout with frontmatter fields such as status, created and updated, plus an index file, and it relies on a lesson-graph.sh script being present. It is written for Claude Code and is distributed through the claude-code-kit plugin marketplace.

When your agent uses it

Periodic maintenance of tasks/lessons/ — decide keep/update/promote/encode/archive per lesson by relevance, recency, and prior encoding. Use to prune lesson rot. To recall dormant lessons for the current task use /lesson-resurface instead.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (10 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the claude-code-kit plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add tansuasici/claude-code-kit
/plugin install claude-code-kit@claude-code-kit

Or copy only this skill to ~/.claude/skills/lesson-refresh:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/lesson-refresh &&
cp -R "$tmp/.claude/skills/lesson-refresh" ~/.claude/skills/lesson-refresh &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/lesson-refresh inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/lesson-refresh to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/lesson-refresh &&
cp -R "$tmp/.claude/skills/lesson-refresh" ~/.agents/skills/lesson-refresh &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/lesson-refresh inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/lesson-refresh to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/lesson-refresh &&
cp -R "$tmp/.claude/skills/lesson-refresh" ~/.cursor/skills/lesson-refresh &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/lesson-refresh inside it instead.

Cursor docs on skills

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

gemini skills install https://github.com/tansuasici/claude-code-kit.git --path .claude/skills/lesson-refresh

Or copy the folder to ~/.gemini/skills/lesson-refresh yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/lesson-refresh:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/lesson-refresh &&
cp -R "$tmp/.claude/skills/lesson-refresh" ~/.copilot/skills/lesson-refresh &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/lesson-refresh inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git

Then copy claude-code-kit/.claude/skills/lesson-refresh into your agent's skills folder as lesson-refresh. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Per-lesson verdicts
Assigns each active lesson one of keep, update, promote, encode or archive based on gathered evidence.
Graph warning checks
Reads warnings from a lesson graph script to flag stale supersedes pointers, cycles and contradictions.
Evidence gathering
Checks whether referenced code exists, whether hooks or CLAUDE.md already enforce a rule, and how old the lesson is.
Interactive and headless modes
Shows a batch table for approval, or in headless mode applies only safe verdicts and queues the rest.
Non-destructive archiving
Marks archived lessons with a status and moves them to an archive folder instead of deleting them.
Top Rules index upkeep
Updates the lesson index's Top Rules section when lessons are promoted or archived.

Good for

  • Prune outdated lessons after a major refactor
  • Find recurring corrections worth promoting to top rules
  • Propose moving a repeated lesson into a hook or CLAUDE.md rule
  • Run a monthly headless cleanup of the lessons folder
  • Audit archived lessons for past incidents

Lesson refresh FAQ

What files does Lesson refresh operate on?

It only works on files in tasks/lessons/, reading CLAUDE.md, CLAUDE.project.md and the hooks folder as evidence without modifying them.

Does Lesson refresh delete lessons?

No. It never deletes lesson files; it sets archived status and moves them to tasks/lessons/_archive/.

Does Lesson refresh change CLAUDE.md or hooks automatically?

No. Encoding proposals are queued for human approval in tasks/todo.md and are not applied silently.

How is Lesson refresh different from lesson-resurface?

The frontmatter description says lesson-refresh prunes the lesson archive, while /lesson-resurface is the command to recall dormant lessons for the current task.

How do I install Lesson refresh in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/lesson-refresh to use it in all your projects, or to .claude/skills/lesson-refresh in one project. Or install the claude-code-kit plugin, which includes it: /plugin marketplace add tansuasici/claude-code-kit, then /plugin install claude-code-kit@claude-code-kit.

Does Lesson refresh run scripts?

No. It is instructions only, with no 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 Lesson refresh?

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 Lesson refresh?

The closest alternatives to Lesson refresh are Lesson resurface, Mine learnings, Remember, Memory distill and Memory sync.

Where this comes from

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

More from tansuasici/claude-code-kit

  1. Audits UI code against WCAG 2.1 AA for semantics, keyboard use, contrast and ARIA

    • Open source
    • 6 GitHub stars
    • Developer tools
  2. Audits a codebase's structure for SOLID violations, coupling and module boundary issues

    • Open source
    • 6 GitHub stars
    • Developer tools
  3. Lists the skills, agents, hooks and modules installed in a kit-enabled project

    • Open source
    • 6 GitHub stars
    • Developer tools
  4. Audits code for smells, error-handling gaps and maintainability issues with fixes

    • Open source
    • 6 GitHub stars
    • Developer tools
  5. Guides the agent to write and extend a project's golden-principles.yaml rule file

    • Open source
    • 6 GitHub stars
    • Developer tools
  6. Finds unused functions, dead imports, orphan files and unreachable branches in a codebase

    • Open source
    • 6 GitHub stars
    • Developer tools