Borrowing it
Nothing to install: this file belongs to PeterPirog/mcp-light-memory. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/PeterPirog/mcp-light-memory/main/.agents/skills/internal-rag/SKILL.mdgit clone --depth 1 https://github.com/PeterPirog/mcp-light-memoryWrote 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/skills/peterpirog/mcp-light-memory/internal-rag)<a href="https://agentmods.dev/skills/peterpirog/mcp-light-memory/internal-rag"><img src="https://agentmods.dev/badge/skills/peterpirog/mcp-light-memory/internal-rag/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/skills/peterpirog/mcp-light-memory/internal-rag"><img src="https://agentmods.dev/badge/skills/peterpirog/mcp-light-memory/internal-rag.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.01680 |
| Opus 5.5 | $0.00025 | $0.00672 |
| Sonnet 5.5 | $0.00012 | $0.00336 |
| Haiku 4.5 | $0.00006 | $0.00168 |
Grade A, and why
internal-rag 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 2mo 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 — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Internal RAG
Start every substantial task
Windows:
python .agents\skills\internal-rag\mlm.py context --task "<current task>"
Linux/macOS:
python3 .agents/skills/internal-rag/mlm.py context --task "<current task>"
The context packet groups memories by type:
- Verified facts (decisions, knowledge, constraints) — trust these as established context.
- Lessons & pitfalls (gotchas, failures) — apply to avoid repeating mistakes.
- Unverified hypotheses — treat as tentative ideas, not facts. Verify before acting.
If RECOVERY REQUIRED appears, do not make new edits. Inspect Git state, reconstruct unfinished work, checkpoint it, then run guard.
Filtering by type or status
# Only decisions and knowledge (verified facts)
mlm.py search --query "database" --type decision knowledge
# Only active memories (exclude tentative)
mlm.py search --query "cache" --status active
# Only hypotheses (what's still unverified)
mlm.py search --query "performance" --type hypothesis
# Combine in context
mlm.py context --task "fix database pool" --type decision gotcha --status active
Before the first code edit
Create a task-start checkpoint:
python3 .agents/skills/internal-rag/mlm.py checkpoint --reason "task-start" --phase "starting implementation" --next "first concrete implementation step"
On Windows use python instead of python3.
Checkpoint frequently
Checkpoint after each meaningful milestone, important discovery, blocker/failure, or plan change, and before dependency installs, large builds/tests, migrations, broad refactors, compaction, and the final answer.
Guard before finishing
python3 .agents/skills/internal-rag/mlm.py guard
If guard is stale, checkpoint and run guard again. Do not finish until GUARD OK.
Retrieval (selective, never preload all)
python3 .agents/skills/internal-rag/mlm.py search --query "symbols subsystem error" --limit 8
python3 .agents/skills/internal-rag/mlm.py search --query "..." --json # for tooling
What ships with it
11 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.
- irag_atomic.py 17 KB runs code
- irag_distill.py 11 KB runs code
- irag_embeddings.py 11 KB runs code
- irag_ephemeral.py 17 KB runs code
- irag_gc.py 21 KB runs code
- irag_hooks.py 4.9 KB runs code
- irag_index.py 36 KB runs code
- irag_mcp_protocol.py 24 KB runs code
- irag_mcp_router.py 20 KB runs code
- irag.py 239 KB runs code
- mlm.py 1.4 KB runs code
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.
- 2mo ago First seen · 184 lines · 62 tokens per session scan A e3c169a28ce5
internal-rag is a skill published in the GitHub repository PeterPirog/mcp-light-memory (0 stars, last pushed 2mo ago), licensed MIT. It adds 62 tokens to every session and 1,680 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-31.
internal-rag compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| internal-ragPeterPirog/mcp-light-memory | Skill | 0 | 2mo ago | MIT | A | 62 | Claude Code, Codex |
| knowledge-orgbojieli/ai-agent-book | Skill | 57k | 29d ago | Apache-2.0 | A | 96 | Claude Code, Codex |
| xerjxerj-org/xerj | Skill | 19k | yesterday | Apache-2.0 | A | 38 | Claude Code, Codex |
| install-openviking-memoryvolcengine/OpenViking | Skill | 42k | yesterday | AGPL-3.0 | A | 191 | Claude Code, Codex |
| kb-memoryfish827-08/rag-kb | Skill | 5 | 2d ago | Apache-2.0 | A | 112 | Claude Code, Codex |
| setup-open-indexDrDroidLab/open-index | Skill | 113 | 2mo ago | MIT | A | 48 | Claude Code, Codex |
| goodmem:helpPAIR-Systems-Inc/goodmem-claude-code-plugin | Skill | 9 | 3d ago | MIT | A | 46 | Claude Code |