agent-memory-discipline

Featured

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.

AI & Automation 3,305 stars 467 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 tha...

Details

Author
davepoon
Repository
davepoon/buildwithclaude
Created
1 years ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category