
Memory Discipline Loop
Teaches an agent when to recall past context and when to save decisions to persistent memory
- Repository
- rohitg00/agentmemory
- Stars
- 30,083
- Licence
- Apache-2.0
- Files
- 2 files
What it does
This skill gives an AI agent a routine for using a persistent memory system. Before starting a non-trivial task, the agent searches saved memories for prior decisions and context. During work, it saves settled decisions along with their reasons, and it records user corrections as lessons. It also avoids saving secrets, anything already visible in the code, or step-by-step narration, and it treats retrieved memories as unverified evidence rather than instructions.
Great for
- Developers who already use the agentmemory plugin and want their agent to reuse past decisions across sessions
- Teams that want saved memories to include reasons and file paths so later sessions can judge them
- Users who want the agent to respect a requirement for explicit permission before saving anything
Skip it if
- People who do not have the agentmemory memory tools installed: the skill only describes calls to memory_smart_search, memory_save and memory_lesson_recall and does nothing without them
- Projects where stored context could be sensitive and should not persist, since the skill decides what gets saved and the memory store keeps it between sessions
Try asking
- “Before I start refactoring the auth refresh flow, check memory for earlier decisions about it”
- “Save the decision we just made to use cursor pagination and the reason we chose it”
- “I corrected your approach to database migrations; record that as a lesson so you avoid it next time”
- “Before I repeat the deployment task, recall any lessons from when we did it before”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 2 original files, the Apache-2.0 licence and an attribution note.
memory-discipline.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip memory-discipline.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip memory-discipline.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Check that the memory tools are available before relying on this loop, because the skill is inactive without them
- Tell the agent your memory preferences, such as requiring permission before saving, since the skill says to follow them
- Review saved memories periodically, since retrieved records are treated as evidence to verify rather than facts
What's inside
- SKILL.md
- TROUBLESHOOTING.md
Redistributed unmodified from rohitg00/agentmemory under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.