memory-guidance

memory-guidance is a skill for Claude Code from doancan/mags. It costs 70 tokens per session (1,679 once invoked), scanned A, original, MIT.

Guidance for using a memory system to save short-lived project context, decisions, preferences, and notes between coding sessions. It explains when information belongs in memory and when it should become a document.

In plain words
What is it for?
Use it to decide what to remember, save choices and temporary observations, restore session context, and separate notes from formal project documents.
Why use it?
It prevents useful context from being lost while keeping long-term, structured knowledge in project documentation.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the mags plugin — 17 skills, 2 agents shipped together

Install

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.

agentmods
npx agentmods add skills/doancan/mags/memory-guidance
Any agent
npx skills add doancan/mags --skill memory-guidance
Clone the repo
git clone --depth 1 https://github.com/doancan/mags

Made for: Claude Code.

Or install mags, the plugin that ships this one along with the rest of its 17 skills, 2 agents.

Wrote 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.

agentmods badge for memory-guidance

README.md
[![agentmods](https://agentmods.dev/badge/skills/doancan/mags/memory-guidance.svg)](https://agentmods.dev/skills/doancan/mags/memory-guidance)
Your own site
<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>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,679 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 6d ago against content hash 95e34d576c1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

skills/memory-guidance/SKILL.md · 167 lines

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.

Read the full file on GitHub · 167 lines

Changes

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.

  1. 6d ago First seen · 167 lines · 70 tokens per session scan A 95e34d576c1f

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

memem-mine

Opt in to memem's event-triggered mining. New sessions are mined automatically via the Stop hook.

TT-Wang/memem · 26 tokens

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.

0xmariowu/Autosearch · 69 tokens

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…

0xmariowu/Autosearch · 89 tokens

stats

Show Captain Memo's corpus statistics (chunks per channel, observation counts, indexing progress, embedder info). Use when the user types /captain-memo:stats.

kalinbogatzevski/captain-memo · 36 tokens

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.

kalinbogatzevski/captain-memo · 34 tokens

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…

michalekz/claude-bridge · 102 tokens