lesson-refresh

lesson-refresh is a skill for Claude Code from moberghr/mtk-agent-toolkit. It costs 44 tokens per session (1,336 once invoked), scanned A, original, MIT.

A periodic audit for stored coding lessons and reminders. It checks whether their cited files and code references still exist, then suggests whether each lesson should stay, change, merge, or retire.

In plain words
What is it for?
Use it to review lesson stores, find broken references, consolidate duplicate guidance, and mark outdated lessons for human-approved retirement.
Why use it?
Lesson files can grow without limit and become misleading when the code they describe changes. The audit identifies stale or overlapping advice while leaving final decisions to a person.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the mtk plugin — 45 skills, 6 agents, 7 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/moberghr/mtk-agent-toolkit/lesson-refresh
Any agent
npx skills add moberghr/mtk-agent-toolkit --skill lesson-refresh
Clone the repo
git clone --depth 1 https://github.com/moberghr/mtk-agent-toolkit

Made for: Claude Code.

Or install mtk, the plugin that ships this one along with the rest of its 45 skills, 6 agents, 7 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lesson-refresh

README.md
[![agentmods](https://agentmods.dev/badge/skills/moberghr/mtk-agent-toolkit/lesson-refresh.svg)](https://agentmods.dev/skills/moberghr/mtk-agent-toolkit/lesson-refresh)
Your own site
<a href="https://agentmods.dev/skills/moberghr/mtk-agent-toolkit/lesson-refresh"><img src="https://agentmods.dev/badge/skills/moberghr/mtk-agent-toolkit/lesson-refresh.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,336 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01336
Opus 5 $0.00022 $0.00668
Sonnet 5 $0.00009 $0.00267
Haiku 4.5 $0.00004 $0.00134

Measured 5d ago against content hash 6b5b5eb8877f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

lesson-refresh scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/lesson-refresh/SKILL.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Lesson Refresh

Overview

Capture is solved (correction-capture, golden-path-capture, lesson-mining, promote-lesson) — but tasks/lessons.md and .claude/lessons/personal.md are append-only and grow forever. Nothing checks whether a lesson still matches the code, consolidates overlapping lessons, or retires superseded ones. A store that only grows stops being read, and a lesson citing a file that no longer exists reads as authority while pointing at nothing.

Lesson-refresh is the periodic audit that closes the lifecycle: a deterministic stale-anchor pre-pass (scripts/lesson-anchors.sh), then per-lesson triage into Keep / Update / Consolidate / Retire. It is suggest-only: it proposes a verdict per lesson with evidence; the engineer rules on each. It never deletes — retirement means marking the entry > STALE (<date>): <reason> so the history stays auditable, and even that marking happens only after explicit approval.

Prune never decides alone. The strongest field evidence for this posture: a comparable tool's first automated prune run scored 56 lessons as dead — and every single verdict was wrong. Staleness signals locate candidates; they do not decide.

When To Use

  • The engineer says "refresh lessons", "audit lessons", "are the lessons stale", "clean up lessons.md"
  • Periodically (once a release cycle) — pairs naturally with lesson-mining: mining adds, refresh retires
  • After a large refactor or file reorganization that likely moved cited paths
  • When mtk-doctor reports stale lesson anchors

When NOT To Use

  • Mid-task — refresh is a reflective sweep, not an interruption
  • To edit one known lesson — just edit it
  • To capture new lessons — that is correction-capture / lesson-mining

Workflow

  1. Deterministic pre-pass. Run bash scripts/lesson-anchors.sh and collect the STALE-PATH / STALE-SYMBOL findings with their rename suggestions. These are location signals, not verdicts — a stale anchor often means "update the citation", not "retire the lesson".
  2. Read the stores. tasks/lessons.md and (if present) .claude/lessons/personal.md. For each lesson, check its claims against the current repo: does the failure mode still exist? Is it now caught by tooling (a validator check, a hook, a rule) that postdates the lesson? Does another lesson or an S-rule cover the same ground? Prioritize by due-ness: lessons whose dated heading is oldest and which no later entry re-confirms get the deepest checks — refresh is "check what is due", not "re-litigate everything equally". Consult the economics when available: bash scripts/mtk-savings.sh prints each lesson's context rent and .mtk/recall-log.jsonl shows which entries actually surface in queries — a lesson with high rent and zero recalls is a prime Consolidate/Retire candidate. Data informs the triage; it never decides it.
  3. Triage each lesson into exactly one verdict, with cited evidence:
    • Keep — still true, still non-obvious, anchors live. The default; when unsure, Keep. Match docs to reality, not the reverse.
    • Update — core claim holds but a citation moved or a detail drifted; propose the corrected text. Re-anchoring follows unique-match-or- unresolvable: a citation is repointed only when exactly one candidate matches (the pre-pass rename suggestion); zero or several candidates → mark the citation unresolvable in the proposal, never guess.
    • Consolidate — materially overlaps another lesson or an existing rule (cite the rule id); propose the merged entry, superseding not appending.
    • Retire — the failure mode is now mechanically prevented (name the guard/check) or the cited subsystem no longer exists. Propose the > STALE (<date>): <reason> marking, never deletion.
  4. Present the triage table — one row per lesson: verdict, one-line reason, evidence. Lessons verdicted Keep may be listed in a single collapsed line. The engineer rules per lesson (accept / reject / edit); batch-accept is the engineer's call to make, never the default framing.
  5. Apply only approved rulings. Updates and consolidations edit in place; retirements add the STALE marking above the entry. Mirror accepted changes to .mtk/learnings.jsonl via scripts/learnings.sh where entries exist. Appends aside, in-place rewrites of tasks/lessons.md go through mtk_guarded_write (S3.16), and the proposed rewrite must pass bash scripts/growth-gate.sh tasks/lessons.md <proposed> — a refresh that grows the store defeats its purpose; supersede content, don't append to it.

Read the full file on GitHub · 102 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 102 lines · 44 tokens per session scan A 6b5b5eb8877f

Subscribe to this mod's changes

lesson-refresh is a skill published in the GitHub repository moberghr/mtk-agent-toolkit (7 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 1,336 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

self-improve-with-tinyfish

Enables Hermes to create new reusable skills for itself by researching live web sources with TinyFish Search and Fetch, analyzing source coverage, writing SKILL.md files, and installing them into Hermes memory. Use when the user asks Hermes to learn, teach itself, upgrade itself, or save a reusable capability.

tinyfish-io/tinyfish-cookbook · 68 tokens

flow-next-audit

Audit .flow/memory/ entries against current code and keep, update, consolidate, replace, delete, or harden each. Use when asked to audit memory or graduate a recurring lesson into a gate.

gmickel/flow-next · 46 tokens

flashcards

Spaced repetition flashcard system for learning. SM-2 algorithm, supports text and cloze deletion cards.

fuyuxiang/echo-agent · 25 tokens

mindos

MindOS: local knowledge assistant & shared KB. Keeps decisions, notes, SOPs, debugging lessons, research findings, preferences across sessions/agents. Core: save notes, search KB, organize files, run workflows, review, append CSV, hand off context, distill lessons. NOT for app source or paths outside KB. Triggers…

GeminiLight/MindOS · 136 tokens

learn-from-fix

Capture Elixir/Ecto/LiveView lessons and Hex API rules. Use after corrections or when asked to document learning, record a lesson, prevent a fixed mistake, or remember package guidance with --library.

oliver-kriska/claude-elixir-phoenix · 46 tokens

curate

Adds developer-authored annotations to the gauntlet knowledge base. Use when capturing tribal knowledge or rationale not visible in code.

athola/claude-night-market · 28 tokens