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/doancan/mags/memory-guidancenpx skills add doancan/mags --skill memory-guidancegit clone --depth 1 https://github.com/doancan/magsWrote 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/doancan/mags/memory-guidance)<a href="https://agentmods.dev/skills/doancan/mags/memory-guidance"><img src="https://agentmods.dev/badge/skills/doancan/mags/memory-guidance.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.1 | $0.00070 | $0.01679 |
| Opus 5 | $0.00035 | $0.00839 |
| Sonnet 5 | $0.00014 | $0.00336 |
| Haiku 4.5 | $0.00007 | $0.00168 |
Grade A, and why
memory-guidance 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 6d 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 — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Memory System Usage
Memory vs Documents
Distinguish between memory entries and documentation files based on the nature and lifespan of the information:
Use memory for:
- Quick decisions made during a session ("chose Zustand over Redux for state management")
- Session context that needs to persist ("user prefers verbose commit messages")
- Temporary notes that may become docs later ("need to revisit auth flow")
- Bug observations not yet formalized ("intermittent timeout on /api/users under load")
- Convention reminders ("this project uses single quotes in TypeScript")
- User preferences and working style notes
- Short-lived context that expires after a few sessions
Use documents for:
- Structured knowledge that others will reference
- Architecture decisions that affect the whole project (ADRs)
- Guides, tutorials, and how-to content
- API references and specifications
- Anything that needs review, versioning, or a status workflow
- Content longer than a few paragraphs
Apply this rule of thumb: if the information needs a heading structure, frontmatter, or will be read by someone other than the current session context, it belongs in a document. If it is a concise fact, preference, or observation, store it in memory.
Memory Categories
Organize every memory entry into one of these categories. Always assign a category -- never store uncategorized entries.
decisions
Store choices and their reasoning. Include what was decided, why, and what alternatives were rejected.
Category: decisions
Content: Selected PostgreSQL over MongoDB for the billing service. Reason: need ACID transactions for financial data. MongoDB considered but rejected due to eventual consistency model.
Tags: database, billing, architecture
Use decisions when: a technical choice was made, a trade-off was evaluated, a direction was set for implementation.
conventions
Store agreed-upon patterns, coding standards, and project norms that are not yet in formal documentation.
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.
- 6d ago First seen · 167 lines · 70 tokens per session scan A 95e34d576c1f
memory-guidance is a skill published in the GitHub repository doancan/mags (3 stars, last pushed 7mo ago), licensed MIT. It adds 70 tokens to every session and 1,679 once invoked, about $0.0003 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-31.
Other skills, from other repositories
memem-mine
Opt in to memem's event-triggered mining. New sessions are mined automatically via the Stop hook.
autosearch:experience-compact
Promote recurring patterns from experience/patterns.jsonl into the compact experience.md digest (≤120 lines, read by runtime AI before calling the skill). Triggers on N-events / file-size / user-feedback / session-end. Guards against single-success noise and pollution via promotion thresholds.
autosearch:context-retention-policy
Session-level policy for keeping the runtime AI's context window healthy across long research — keep-last-k tool results, offload older evidence to disk, trigger compaction at thresholds. Borrows MiroThinker's keeptoolresult, deepagents' summarization middleware, and deer-flow's SummarizationEvent pattern. Orthogonal…
stats
Show Captain Memo's corpus statistics (chunks per channel, observation counts, indexing progress, embedder info). Use when the user types /captain-memo:stats.
observations
List recent captured session observations (the Haiku-summarized voyage logs). Use when the user wants to see what Captain Memo has logged from past sessions.
claude-bridge-role-memory-keeper
Playbook for a Claude Code agent in the dedicated memory keeper role — single-writer for shared agent memory across a team of 3+ peers. Use when you are designated as the keeper (= other peers send you write candidates, you write them and watch for drift). Memory hygiene + reconciliation against the canon + drift…