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/lanzelot1/claw-brain/learngit clone --depth 1 https://github.com/Lanzelot1/claw-brainWhat 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 | $0.00007 | $0.00561 |
| Opus 5 | $0.00003 | $0.00280 |
| Sonnet 5 | $0.00001 | $0.00112 |
| Haiku 4.5 | $0.00001 | $0.00056 |
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 — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Review the current conversation and save reusable insights to memory/lessons.md.
Steps
- Read
memory/lessons.md(if it exists) to see what's already saved - Scan the conversation for:
- Workarounds or solutions discovered through trial-and-error
- User corrections or preferences ("don't do that", "I prefer X")
- Patterns or conventions confirmed
- Mistakes worth avoiding next time
- Filter by priority:
- Always save: user corrections, stated preferences, confirmed conventions
- Save if non-trivial: debugging solutions, workflow patterns, tool quirks
- Skip: obvious facts, session-specific details, raw logs
- Check for duplicates — don't add entries that overlap with existing ones. Update existing entries if the new version is better.
- Append new entries to
memory/lessons.md. Format:- YYYY-MM-DD: [topic] — insight text - Graduation check — Review the extracted learnings for any insight that is a durable fact about the domain (not a personal preference, not a debugging workaround, not session-specific). Examples: "API rate-limits at 100 req/s", "The auth service requires JWT with RS256".
- For each durable insight, ask the user: "This looks like permanent knowledge rather than a session learning:
{insight}. Want me to add it toknowledge/{area}/instead?" - If yes: append to the most relevant existing knowledge file (don't create a new file). Add
source: "session discovery, YYYY-MM-DD"to the frontmatter if needed. Search other knowledge areas for related files and add cross-references using[title](../area/file.md)format under a## Relatedsection. - If no: leave it in
lessons.mdas normal
- For each durable insight, ask the user: "This looks like permanent knowledge rather than a session learning:
- If the file exceeds 50 entries, ask the user which older entries can be consolidated or removed
- Show a summary of what was saved (or "nothing new to save" if the session was routine)
Git
memory/lessons.md is gitignored — no branch or PR needed.
Rules
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 · 41 lines · 7 tokens per session scan A c76cef33c9b0
learn is a command published in the GitHub repository Lanzelot1/claw-brain (11 stars, last pushed 4mo ago), licensed MIT. It adds 7 tokens to every session and 561 once invoked, about $0.0000 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-30.
Other commands, from other repositories
triage-pr
Triage a PR — classify, optionally fix, optionally enable auto-merge.
tech-debt
Run bun run check:fix and then bunx knip and identify unused files and functions to refactor the project and simplify. Look at the deprecated features and confirm with the user to delete them. Look at the dependencies and remove the ones that are not needed based on knip results.
skill-inbox
Unified entry point for managing skill suggestions and browsing all installed skills. Provides two views: suggestions (default) and all skills.
reflect
Curate and compress recent memory. This command reviews the last 7 days of journal entries, extracts durable insights, and updates long-term memory files. Think of it as memory maintenance -- moving important things from short-term to long-term storage.
remember
Store something in the appropriate memory file. This command is the smart router for the memory system.
retrospective
Run after epic completion to review overall success, extract lessons learned, and explore if new information emerged that might impact the next epic.