agent-memory-discipline
Rules for when an agent should recall from long-term memory before acting and when it should save decisions, corrections and failures afterwards.
Skill by sickn33
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sickn33-agent-memory-discipline
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/agent-memory-discipline
What's inside
- Skill name
agent-memory-discipline- Description
- 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.
- License
- CC0-1.0
- Instructions
- 192 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- entry-format.md · references/
SKILL.md (first lines)
# 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
Within the user-authorized memory scope and host retention policy, write 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
If recall returns two entries that disagree, do not pick the closer match and proceed. Surface both, with their dates, and ask or flag. A convention that a recent failure contradicts is exactly the situation where the user needs to be told, not smoothed over.
### Step 6: Weigh Evidence and Policy Differently
- **Evidence** is what happened: one run, one failure, one observation. Cheap, plentiful, individually unreliable.
- **Policy** is what should happen: a convention, a decision, a rule. Expensive, and should be hard to change by accident.
An observation becomes policy when a human confirms it, when it lands in a merged decision record, or when an authorized owner explicitly adopts the repeated observations as policy. Never promote a single observation to a rule without one of those.
### What Following This Skill Produces
Two things, and nothing else:
- **Recalled context, stated before the work starts.** The relevant entries are named with their dates and sources, so the user can see what the agent is relying on. Conflicting entries are shown side by side, not merged.
- **New memory entries after decisions, corrections and failures.** One fact each, in this shape:
```text
Project uses pnpm, not npm. Stated by the user on 2026-08-11 after a lockfile conflict. Applies to all packages in this repo.
```
A superseded entry keeps its text and gains an end date and a pointer to the entry that replaced it. The full format, with closing and evidence examples, is in [references/entry-format.md](references/entry-format.md).
## Examples
### Example 1: A Correction
The user says: *"stop using npm here, we're on pnpm."*
1. This is a correction, which is the strongest save signal. Save it.
2. Write the entry:
```text
Project uses pnpm, not npm. Stated by the user on 2026-08-11 after a lockfile conflict. Applies to all packages in this repo.
```
3. Do not also save "the user was annoyed", "ran npm install", or the lockfile contents.
4. Next session, before running any package command in this repo, recall first and find it.
### Example 2: A Contradiction
Recall returns two entries:
```textFrom sickn33/agentic-awesome-skills, CC0-1.0.
More from sickn33/agentic-awesome-skills
- 0.881score
asset-inventory
devops-skills
Maintain IT asset inventory and configuration management database.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.881score
arm-templates
devops-skills
Deploy Azure resources with ARM templates and Bicep.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.881score
access-review
devops-skills
Conduct periodic access reviews and certifications.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.878score
ai-coding-agent-guardrails
devops-skills
Secure AI coding agents (Claude Code, Cursor, Codex, Copilot) with permission boundaries, secret protection, code review gates, and safe sandbox…
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.878score
agents-generator
OJPalenzuela
Generate project-specific AGENTS.md and companion rules by analyzing a codebase.
SkillAFreshness: A★ 48.4KClaude Code - 0.876score
aws-lambda
devops-skills
Build and deploy serverless functions on AWS Lambda.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.876score
aws-s3
devops-skills
Configure S3 buckets, policies, and lifecycle rules.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.876score
aws-iam
devops-skills
Manage IAM users, roles, and policies.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.876score
aws-rds
devops-skills
Provision and manage RDS databases.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.876score
azure-aks
devops-skills
Deploy and manage Azure Kubernetes Service clusters.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.876score
aws-vpc
devops-skills
Design and implement VPCs and networking.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.876score
aws-ecs-fargate
devops-skills
Deploy containers on ECS and Fargate.
SkillAFreshness: A★ 48.4KClaude Code +9
Signals
- Stars
- 48,428
- Forks
- 7,039
- Open issues
- 0
- Last commit (this folder)
- Oct 24, 2026 (5 days ago)
- Last release
- Oct 24, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- CC0-1.0
- Website
- aaskills.tech/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from sickn33
- 0.665score
agentphone
sickn33
Build AI phone agents with AgentPhone API.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.665score
ai-seo
sickn33
Optimize content for AI search and LLM citations across AI Overviews, ChatGPT, Perplexity, Claude, Gemini, and similar systems.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.665score
agent-evaluation
sickn33
Evaluate agent behavior with versioned cases and explicit verifiers.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.665score
agent-memory-systems
sickn33
Design tenant-scoped memory, retrieval and retention for agents.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.665score
add-app-clip
sickn33
Add an iOS App Clip target to an Expo app.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.665score
angular-best-practices
sickn33
Angular performance optimization and best practices guide.
SkillAFreshness: A★ 48.4KClaude Code +9
Cite this page
agent-memory-discipline skill. Agent Mart. https://agentmart.dev/skills/sickn33-agent-memory-discipline (last updated 2026-10-24)