
Agent Memory Discipline
Teaches when to recall from long-term memory before acting and when to save durable...
Install
npx skills add davepoon/buildwithclaude --skill agent-memory-discipline -g -a claude-code -y- Repository
- davepoon/buildwithclaude3.7k
- Category
- AI and agents
- Updated
- 3d ago
- License
- CC0-1.0
- Context cost
- Lightabout 1,277 tokens
- Runs scripts
- No, instructions only
What it does
Teaches when to recall from long-term memory before acting and when to save durable decisions, corrections and failures afterwards. Use when a memory tool or MCP memory server is connected but the agent is not using it consistently, when the user complains that the assistant forgets preferences, conventions or past decisions between sessions, or when setting up persistent memory for a project. Works with any memory backend: a folder of Markdown files, a local MCP server, or a managed service.
Agent memory discipline
Connecting a memory tool does not make an agent use it. Tools register, the session runs, and nothing gets recalled or saved. This skill supplies the missing part: standing rules for when to read memory and when to write it.
It is backend-agnostic. Everything below works the same whether memory is a folder of Markdown files, a local MCP server, or a hosted service.
Recall before acting
Read memory before doing any of these, not after:
- starting work on a project you have touched before
- choosing a library, pattern, or tool
- writing tests, commits, or documentation, where conventions apply
- answering "how do we usually do X here"
- anything the user phrases as "again", "like last time", or "as we agreed"
Do not recall for one-off factual questions, arithmetic, or anything fully specified in the current message. Recall costs a tool call and context; spending it on a self-contained question is waste.
Search with the words the user actually used, plus the project or repository name. If the first search returns nothing useful, try one broader query, then stop and proceed without memory rather than looping.
Save after deciding
Write to memory when one of these has just happened:
- a decision was made and will still matter next week ("we use pnpm", "the billing module stays untouched")
- the user corrected you, which is the strongest signal there is
- an approach failed, and why it failed
- a preference was stated that applies beyond this task
- a fact about the environment was discovered the hard way (a port, a flag, a service that must be running)
Do not save: the contents of files you can read again, restatements of the current task, transient state, anything the user marked as temporary, and anything containing secrets, tokens, or personal data.
One memory, one fact. A paragraph containing four decisions cannot be superseded cleanly when one of them changes.

