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.
npx agentmods add skills/moberghr/mtk-agent-toolkit/lesson-refreshnpx skills add moberghr/mtk-agent-toolkit --skill lesson-refreshgit clone --depth 1 https://github.com/moberghr/mtk-agent-toolkitWrote 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.
[](https://agentmods.dev/skills/moberghr/mtk-agent-toolkit/lesson-refresh)<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>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.
| Model | Per session | Once 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 |
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.
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-doctorreports 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
- Deterministic pre-pass. Run
bash scripts/lesson-anchors.shand 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". - Read the stores.
tasks/lessons.mdand (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.shprints each lesson's context rent and.mtk/recall-log.jsonlshows 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. - 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.
- 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.
- Apply only approved rulings. Updates and consolidations edit in place;
retirements add the STALE marking above the entry. Mirror accepted changes
to
.mtk/learnings.jsonlviascripts/learnings.shwhere entries exist. Appends aside, in-place rewrites oftasks/lessons.mdgo throughmtk_guarded_write(S3.16), and the proposed rewrite must passbash scripts/growth-gate.sh tasks/lessons.md <proposed>— a refresh that grows the store defeats its purpose; supersede content, don't append to it.
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.
- 5d ago First seen · 102 lines · 44 tokens per session scan A 6b5b5eb8877f
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.
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.
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.
flashcards
Spaced repetition flashcard system for learning. SM-2 algorithm, supports text and cloze deletion cards.
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…
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.
curate
Adds developer-authored annotations to the gauntlet knowledge base. Use when capturing tribal knowledge or rationale not visible in code.