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 commands/juanmarchetto/agent-skills/learngit clone --depth 1 https://github.com/JuanMarchetto/agent-skillsWrote 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/commands/juanmarchetto/agent-skills/learn)<a href="https://agentmods.dev/commands/juanmarchetto/agent-skills/learn"><img src="https://agentmods.dev/badge/commands/juanmarchetto/agent-skills/learn.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.00021 | $0.00749 |
| Opus 5 | $0.00010 | $0.00375 |
| Sonnet 5 | $0.00004 | $0.00150 |
| Haiku 4.5 | $0.00002 | $0.00075 |
Grade A, and why
learn 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 2d 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 — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/learn — Force Lesson Extraction
You are the Learn-by-Mistake skill's lesson extraction engine. The user has triggered /learn to force-extract a lesson from the most recent error in this conversation.
Instructions
-
Find the most recent error in this conversation. Look for:
- Failed Bash commands (non-zero exit codes)
- Error messages in stderr
- Compilation/build failures
- Runtime exceptions or tracebacks
- Any tool use that produced an error
-
If no error is found, tell the user: "No recent error found in this conversation. Try running a command first, or describe the mistake you want to capture."
-
Extract a lesson using this format:
### [YYYY-MM-DD] category: one-line summary - **Error**: The error message or pattern (sanitized, enough to match against) - **Root cause**: Why it actually failed — the real bug, not the symptom - **Fix**: What resolved it — specific, actionable, referencing project files/config when relevant - **Prevention**: Reusable rule to check BEFORE this error can happen again - **Hits**: 1Categories (use exactly one):
build,test,runtime,types,linter,git,dependency,config -
Show the lesson to the user and ask for approval before writing. Example:
Extracted lesson from the last error: ### [2026-03-17] config: Use --no-pager with git log in scripts - **Error**: git log hangs in non-interactive shell - **Root cause**: git defaults to a pager (less) which blocks when there is no TTY - **Fix**: Always pass `--no-pager` or pipe to `cat` when using git in scripts - **Prevention**: When calling git commands in scripts or hooks, always use `--no-pager` or `| cat` - **Hits**: 1 Write this to .claude/lessons.md? (yes/no/edit) -
On approval, write the lesson directly to the Active Lessons section of
.claude/lessons.md:- If the file doesn't exist, create it with the standard template (see below)
- Place it at the end of the Active Lessons section (before the next section header)
- Sort Active Lessons by Hits count (highest first) when rewriting the file
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.
- 2d ago First seen · 77 lines · 21 tokens per session scan A 57ad569f2e72
learn is a command published in the GitHub repository JuanMarchetto/agent-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 21 tokens to every session and 749 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.
Other commands, from other repositories
unicli-repair
Diagnose and fix a broken Uni-CLI adapter from the original failure evidence.
checkpoint
Write a new link in the continuum chain summarizing decisions/changes since the last link.
dream
Roll up the last N links into a single phase-digest link; originals move to archived/ (never deleted).
recall
Search past links in the continuum chain by tag/keyword and return matched summaries.
status
Show continuum chain health — link count, latest link, STATE.md size, archive usage, pending checkpoint.
comms-import
Back-fill old history from a WhatsApp "Export chat" .txt file — parsed, normalized, and reconciled into this repo's timeline by content fingerprint.