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/helloruru/claude-memory-engine/skillnpx skills add HelloRuru/claude-memory-engine --skill skillgit clone --depth 1 https://github.com/HelloRuru/claude-memory-engineWhat 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.00055 | $0.01891 |
| Opus 5 | $0.00028 | $0.00945 |
| Sonnet 5 | $0.00011 | $0.00378 |
| Haiku 4.5 | $0.00006 | $0.00189 |
Grade B, and why
memory-engine scanned grade B with 1 finding 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.
Unrestricted tool accessmediumExcessive agency
A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.
You don't need to remember to run any command before closing. How it starts
The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Memory Engine v1.6
A memory and learning system for Claude Code, built with hooks and markdown.
Modules
1. Smart Context
Auto-detects the current project from your working directory and loads its memory.
- Resolves per-project memory directory automatically — no hardcoded paths
- Implementation:
~/.claude/scripts/hooks/session-start.js - Config:
references/smart-context.md
2. Auto Learn (Pitfall Detection)
Detects pitfall patterns before context compression — retries, errors followed by fixes, user corrections.
- Saves both the problem and the fix to
~/.claude/skills/learned/ - Same mistake 3+ times across different days → suggests writing it into permanent rules
- Implementation:
shared-utils.js→detectPitfalls()+savePitfalls()
3. Student Loop (/reflect)
8-step learning cycle. First 3 steps are automatic (every session). Last 5 via /reflect.
- Takes notes — records what was done, files changed, decisions made
- Links them — tags the project, connects to previous notes
- Spots patterns — scans for pitfall signals
There is no real "end" to a Claude Code conversation. Memory Engine saves at three points:
- Every 20 messages (
mid-session-checkpoint) — most reliable, self-counted - Before context compression (
pre-compact) — pitfall detection runs here, context is fullest - When conversation ends (
session-end) — best-effort, not guaranteed to fire
You don't need to remember to run any command before closing. 4. Review — read past 7 days, mark useful vs outdated 5. Refine — 4-question decision tree (Keep? Condense? Already covered? Delete as last resort) 6. Re-study — re-analyze cleaned data for buried patterns 7. Slim down — list removable items, wait for user confirmation 8. Wrap up — produce a report
4. Session Handoff (/handoff)
Pass context between Claude Code windows without losing progress.
/handoffsaves ahandoff-*.mdfile with progress, decisions, unfinished tasks- Next session auto-detects it on startup (
session-start.js) - Mid-conversation detection via
memory-sync.js - Each handoff is shown once, tracked by
.handoff-read.json
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 172 lines · 55 tokens per session scan B 60c81523347b
memory-engine is a skill published in the GitHub repository HelloRuru/claude-memory-engine (133 stars, last pushed 3mo ago), licensed MIT. It adds 55 tokens to every session and 1,891 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
opencli-sitemap-author
Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.
golden-rss
Use when testing the rss golden build.
omh-code-review
This is a Hermes-native code-review workflow skill.
redteam-web-detail-pack
Routing and boundary guidance for authorized general web application security testing. Use as a web testing router when the attack surface should be dispatched to more specific web vulnerability skills.
android-pentest
安卓应用渗透测试 — APK分析、Hook、自动化测试、运行态驱动、签名恢复、抓包分析.
studio
Architecture Studio control plane — initialize or inspect a studio workspace, create and register projects, or route an architecture/AEC task to the right agent or skill. Use when the user runs /as:studio, asks to set up or open their studio, manage its projects, or describes a task without naming a skill.