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/monkilabs/opencastle/memory-mergernpx skills add monkilabs/opencastle --skill memory-mergergit clone --depth 1 https://github.com/monkilabs/opencastleWrote 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/monkilabs/opencastle/memory-merger)<a href="https://agentmods.dev/skills/monkilabs/opencastle/memory-merger"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/memory-merger.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 | $0.00074 | $0.00695 |
| Opus 5 | $0.00037 | $0.00347 |
| Sonnet 5 | $0.00015 | $0.00139 |
| Haiku 4.5 | $0.00007 | $0.00069 |
Grade A, and why
memory-merger 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 4d 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 — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Memory Merger
Run Criteria
Combined signals to identify merge candidates.
| Criterion | Signal / Threshold |
|---|---|
| File size | LESSONS-LEARNED.md > 50 entries |
| Citation count | Cited 3+ times across sessions |
| Age | >60 days and still relevant |
| Category cluster | 5+ lessons in same category |
| Severity | Marked high or blocking |
| Discretionary | Curator / maintainer judgement (stale file) |
Workflow (numbered)
- Scan LESSONS-LEARNED.md for candidate entries (frequency, severity, age).
- Map each candidate to target file, section.
- Draft exact edit (concise rule or example).
- Apply edit with attribution comment.
- Archive migrated lesson in LESSONS-LEARNED.md with merge note.
- Update index; run validation checks.
Merge Protocol
3 — Draft Edit
Lesson: LES-XXX — [title]
Target: [file path]
Section: [section name]
Edit: [exact text]
Strategies: add rule, add anti-pattern, add code example, expand existing rule, add table row.
4 — Apply & Attribute
Edit target file; add <!-- Merged from LES-XXX --> attribution inline.
5 — Archive
Move merged lessons to ## Archived (Merged) at the bottom of LESSONS-LEARNED.md:
### LES-XXX: [title] → Merged to `[target]` on YYYY-MM-DD
Never delete lessons — archive for traceability.
6 — Update Index
Update ## Index by Category in LESSONS-LEARNED.md to mark archived lessons.
Automating the scan
# Find lessons cited 3+ times across sessions
rg -c "LES-[0-9]+" .opencastle/logs/events.ndjson | awk -F: '$2 >= 3 {print $1}'
# Find lessons referenced in recent retries
rg "retry.*LES-[0-9]+" .opencastle/logs/events.ndjson | rg -o "LES-[0-9]+" | sort | uniq -c | sort -rn | head -20
Quality Gates (validation checkpoints)
- No duplicate rules created in target files or other skills
- Archived lesson references target file and date
- Target file still passes lint/markdown checks (if applicable)
- Keyword search in the target file confirms the merge applied
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.
- 4d ago First seen · 84 lines · 74 tokens per session scan A 64c3622af3f4
memory-merger is a skill published in the GitHub repository monkilabs/opencastle (61 stars, last pushed 6d ago), licensed MIT. It adds 74 tokens to every session and 695 once invoked, about $0.0004 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 skills, from other repositories
retrieval-practice-generator
Generate low-stakes retrieval-practice questions with grounded answer notes and implementation guidance. Use for quiz starters, revision activities, delayed recall, misconception checks, or adapting recall difficulty.
aws-secrets-manager
Secret safety for AWS Secrets Manager, secret management, credentials, API keys, tokens, and passwords. Prevents AI agents from directly fetching secret values and teaches runtime dynamic references with asm-exec so plaintext never enters the LLM context window.
mindos
MindOS: local knowledge assistant & shared KB. Keeps decisions, notes, SOPs, debugging lessons, research findings, preferences across sessions/agents. Core: save notes, search KB, organize files, run workflows, review, append CSV, hand off context, distill lessons. NOT for app source or paths outside KB. Triggers…
mindos-max
MindOS: local knowledge assistant & global memory layer. Keeps decisions, notes, SOPs, debugging lessons, architecture choices, research findings, preferences, conversation summaries for all connected agents. PROACTIVE: (1) search MindOS first for past context, (2) offer to save after valuable work, (3) persist key…
tutorial-guide
The 12-lesson tutorial curriculum for teaching a human how Lingtai works. Router for orientation, agent runtime, communication, memory/molt, capabilities, operations, addons, and graduation. Invoke this skill when the human is ready to begin or continue the tutorial.
self-improve
Extract lessons from the current session, or sweep the project's past sessions when asked, and route them to the appropriate knowledge layer (project AGENTS.md, auto memory, existing skills, or new skills). Use when the user asks to "self-improve", "distill this session", "distill past sessions", "sweep past…