forget

forget is a command for Claude Code from JuanMarchetto/agent-skills. It costs 20 tokens per session (588 once invoked), scanned A, original, MIT.

A command for removing or archiving a saved lesson from the project's lesson file.

In plain words
What is it for?
Use it to find a lesson by number or keywords, review matching entries, and archive the one you no longer want.
Why use it?
It prevents outdated or incorrect lessons from continuing to influence future work.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the learn-by-mistake plugin — 1 skill, 4 commands, 3 hooks shipped together

Good fit Use it to find a lesson by number or keywords, review matching entries, and archive the one you no longer want.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/juanmarchetto/agent-skills/forget
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.

Clone the repo
git clone --depth 1 https://github.com/JuanMarchetto/agent-skills

Made for: Claude Code.

Or install learn-by-mistake, the plugin that ships this one along with the rest of its 1 skill, 4 commands, 3 hooks.

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 forget

README.md
[![agentmods](https://agentmods.dev/badge/commands/juanmarchetto/agent-skills/forget.svg)](https://agentmods.dev/commands/juanmarchetto/agent-skills/forget)
Your own site
<a href="https://agentmods.dev/commands/juanmarchetto/agent-skills/forget"><img src="https://agentmods.dev/badge/commands/juanmarchetto/agent-skills/forget.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 588 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00020 $0.00588
Opus 5 $0.00010 $0.00294
Sonnet 5 $0.00004 $0.00118
Haiku 4.5 $0.00002 $0.00059

Measured 4d ago against content hash 786a89f3c8aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

forget 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 4d 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.

skills/learn-by-mistake/commands/forget.md · 53 lines

How it starts

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

/forget — Remove or Archive a Lesson

You are the Learn-by-Mistake skill's lesson removal tool. The user has triggered /forget to remove or archive a specific lesson from .claude/lessons.md.

Instructions

  1. Parse the argument:

    • If a number is given (e.g., /forget 5): find lesson #5 by its number
    • If text is given (e.g., /forget docker volumes): search for matching lessons by keyword across summary, error, root cause, fix, and prevention fields
    • If no argument is given: ask the user which lesson to forget
  2. Find the lesson in .claude/lessons.md:

    • Search in Active Lessons first, then Pending
    • If multiple matches found (keyword search), list them and ask the user to pick one
    • If no match found: "No lesson found matching '[argument]'. Use /lessons to see all lessons."
  3. Show the lesson and confirm:

    Found lesson to archive:
    
    ### [2026-03-10] config: Mount Docker volumes with correct permissions
    - **Error**: Permission denied errors inside container when writing to mounted volume
    - **Root cause**: Container runs as root (UID 0) but host volume is owned by a non-root user
    - **Fix**: Use `--user $(id -u):$(id -g)` flag or match UID/GID with host
    - **Prevention**: Always set user/group mapping when mounting host directories into containers
    - **Hits**: 3
    
    Archive this lesson? (yes/no/delete)
    
  4. On "yes" (default): Move the lesson to the Archive section

    • Add **Archived**: [YYYY-MM-DD] to the lesson
    • Remove it from its current section
    • Confirm: "Lesson #5 archived. It won't be applied automatically but can be restored with /lessons search."
  5. On "delete": Remove the lesson entirely

    • Delete it from the file completely
    • Confirm: "Lesson #5 permanently deleted."
    • Warn: "This cannot be undone."
  6. On "no": Cancel and do nothing.

Important

  • Archived lessons are NOT deleted — they remain searchable via /lessons search
  • When moving to Archive, preserve the original lesson number for reference
  • If the user forgets a lesson that has high hits (>5), warn them: "This lesson has been applied [N] times. Are you sure you want to archive it?"

Read the full file on GitHub · 53 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. 4d ago First seen · 53 lines · 20 tokens per session scan A 786a89f3c8aa

Subscribe to this mod's changes

forget is a command published in the GitHub repository JuanMarchetto/agent-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 20 tokens to every session and 588 once invoked, about $0.0001 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-09-03.