agent-memory-discipline
Sets rules for the agent to remember or save information. It helps the agent decide when to look back and when to record what it learned.
What it does
This 'skill' teaches an AI agent how to use memory smartly. It sets rules for when the agent should look for old information before acting and when it should save new information or corrections after acting.
When to use it
- ✓When the assistant forgets your preferences or past decisions.
- ✓When you want the AI to remember something important for future projects.
- ✓When the assistant repeats mistakes or questions that have already been resolved.
Example of what to ask your AI
“Remember that we decided to use library X for project Y.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
Before doing something important, the AI searches its memory for relevant information. After making a decision, correcting a mistake, or discovering something new, the AI writes it down in memory to use later.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill agent-memory-disciplineOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/agent-memory-discipline/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Agent Memory Discipline
Overview
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.
The problem it solves is specific. An agent with memory available still repeats settled questions, reverts corrected habits, and loses decisions between sessions, because nothing tells it when recall and save are due. The rules below make both moments explicit.
When to Use This Skill
- Use when a memory tool or MCP memory server is connected but the agent is not using it consistently.
- Use when the user complains that the assistant loses preferences, conventions or past decisions between sessions.
- Use when setting up persistent memory for a project and the agent needs standing rules for reading and writing it.
- Use when the user says "remember this", "what did we decide", "recall", or "save this for next time".
How It Works
Before You Start: Any Memory Backend
The agent needs a memory tool it can call. Any backend works, and the rules are identical for each:
- Files. A
memory/folder of Markdown notes, one fact per file. No dependencies, fully greppable, versionable in git. - A local MCP memory server. Keeps everything on the local machine; several open-source options exist.
- A hosted memory service over MCP. Adds portability across tools and machines at the cost of the data living elsewhere.
Authentication is whatever the chosen backend requires: none for a local folder, the server's own configuration for a local MCP server, an API key or OAuth sign-in for a hosted service. This skill never handles credentials itself and never writes them into memory.
Step 1: Recall Before Acting
Read memory before doing any of these, not after:
- starting work on a project 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"
Skip 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.
Step 2: 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 the agent, 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 that can be 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.
Step 3: Write It So It Survives
A memory that is useless in three weeks was written wrong. Give each entry, in the text if the backend has no fields for it:
- what was decided or observed, in one sentence
- why, briefly, because the reason outlives the decision
- when it became true, and when it stopped being true if it has
- where it came from: a file, a commit, a conversation, a test run
Prefer the user's own words over a paraphrase. Paraphrase drifts.
Step 4: Close the Past Instead of Overwriting It
When something changes, the old memory is not wrong. It is closed.
If the project moved from Redux to Zustand, "we use Redux" was true from January to June. Deleting it destroys the explanation for every component written in that window. Mark it superseded, keep its validity window, and write the new one alongside.
This is the single most destructive habit in agent memory, and it stays invisible until someone asks a question about old code.
Step 5: Keep Contradictions Visible
…
FAQ
What happens if the AI finds old, contradictory information?
The AI will show both old pieces of information, along with their dates, and ask you to clarify which one is correct or more current.
Does the AI save everything I say?
No. The AI only saves important decisions, corrections you've made, or failures that occurred. It doesn't save temporary information or sensitive data like passwords.
How does the AI save information?
The AI notes down what was decided or learned, why it was important, when it happened, and where the information came from. If something changes, the old information isn't deleted but marked as 'superseded' for future reference.
Details
Original description by the author
Rules for when an agent should recall from long-term memory before acting and when it should save decisions, corrections and failures afterwards. Works with any memory backend.
Popularity
- GitHub stars
- 48k
- Ranking position
- #2047
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
agent-architecture-audit
Makes your agent check if everything is working correctly. It finds and fixes problems in AI systems, ensuring they perform as expected.
affaan-m/ECC
agent-eval
Helps your agent compare different AI coding tools. It measures which one is faster, cheaper, and more reliable for specific tasks.
affaan-m/ECC
agent-harness-construction
Makes your agent better understand how to perform tasks. It optimizes the tools and instructions the agent uses to increase its chances of success.
affaan-m/ECC