Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add sdsrss/claude-mem-lite/plugin install claude-mem-liteWrote 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/sdsrss/claude-mem-lite/lesson)<a href="https://agentmods.dev/commands/sdsrss/claude-mem-lite/lesson"><img src="https://agentmods.dev/badge/commands/sdsrss/claude-mem-lite/lesson/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/sdsrss/claude-mem-lite/lesson"><img src="https://agentmods.dev/badge/commands/sdsrss/claude-mem-lite/lesson.svg" alt="Reviewed on agentmods" width="80" 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.00062 | $0.00678 |
| Opus 5.5 | $0.00025 | $0.00271 |
| Sonnet 5.5 | $0.00012 | $0.00136 |
| Haiku 4.5 | $0.00006 | $0.00068 |
Grade A, and why
lesson 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 — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/lesson
Record a lesson / gotcha / workaround. Writes a searchable observation
(type=discovery with the text as lesson_learned) so future sessions can
find it via mem_search and the PreToolUse recall hooks surface it on the
relevant files. Does NOT touch memdir — so lessons never end up in the
auto-memory index Claude Code loads into every session, and do not conflict with
Claude Code's auto-memory rules on what not to save there.
When to use
After you (or the user) solve a tricky bug or discover a non-obvious behavior:
- "you need to call X before Y or the test hangs"
- "don't use this import path — it shadows the real module"
- "the API returns null when you pass empty string, even though docs say it throws"
Don't use for trivial fixes (typos, renames), for rules that belong in memdir
(user preferences, project-wide conventions), or for general project notes
(use /claude-mem-lite:memory or mem_save instead).
Arguments
- Positional text: the lesson description (what went wrong + root cause + fix).
--file <path>: scope to a specific file. The lesson will surface via pre-tool-recall the next time the file is opened via Edit/Write.--files f1,f2,f3: comma-separated list for multiple files.--importance <1|2|3>: default2. Use3for critical lessons you always want surfaced;1for minor gotchas.
Execution
Run via Bash — pass the full lesson text as the positional content, and a
distilled version in --lesson so it lands in the high-weight lesson_learned
field. --lesson is capped at 500 chars (longer values are rejected), so for a
long lesson keep the full text in the positional content and trim --lesson to
the core insight:
node "${CLAUDE_PLUGIN_ROOT}/cli.mjs" save "<full text>" \
--type discovery \
--title "<first 60 chars of text>" \
--lesson "<core insight, ≤500 chars>" \
[--files f1,f2,...] \
--importance <1|2|3>
Confirm to user with: Lesson saved: #<id>.
Examples
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 Changed bfc9a6572388
- 3d ago Changed · -1 lines bc6fe08312e0
- 27d ago Changed 719f18a7fc16
- 1mo ago First seen · 59 lines · 62 tokens per session scan A fa8116c676fc
lesson is a command published in the GitHub repository sdsrss/claude-mem-lite (67 stars, last pushed today), licensed MIT. It adds 62 tokens to every session and 678 once invoked, about $0.0002 per session on Opus 5.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
session-save
Save the current session state — decisions, modified files, current status, and next steps — to a handoff file for later resume.
drift-detect
Configuration drift detection command. Finds inconsistencies, orphaned components, and stale content in the Badi system.
wrap-up
End-of-day ritual command. Prepares the day for closure and sets the stage for tomorrow.
clear
Context-clearing command. Provides a seamless transition across session boundaries. Target: under 30 seconds.
sync
Mid-session context refresh command. Keeps context fresh and consistent during work.
memory-diff
Memory and knowledge-base limit check + global project comparison.