Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Agent Memory Discipline

ASecurity

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.

6 stars
0 votes
0 copies
0 views
Added 9/24/2026
ai-agentsgogitapibackendsecuritydocumentation

Works with

apimcp

Security Analysis

A100/100

Scanned 9/24/2026

Install to Claude Code

$npx -y skills add ranbot-ai/awesome-skills --skill agent-memory-discipline --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Memory Discipline?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Agent Memory Discipline
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ranbot-ai-agent-memory-discipline/badge)](https://www.skillsdirectory.com/skills/ranbot-ai-agent-memory-discipline)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
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. 
category: AI & Agents
source: antigravity
tags: [markdown, api, mcp, claude, ai, agent, design, document, security, rag]
url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/agent-memory-discipline
---


# 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

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 

Attribution

ranbot-airanbot-ai
View sourceMore from ranbot-ai →
SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

693161 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →