agent-memory-discipline

agent-memory-discipline is a skill for Claude Code from lingxling/awesome-skills-cn. It costs 36 tokens per session (2,585 once invoked), scanned A, a copy of agent-memory-discipline, MIT.

A set of rules for using an agent's long-term memory. It tells the agent when to recall earlier information and when to save decisions, corrections, preferences, and failures.

In plain words
What is it for?
Use it when an agent has a memory tool or server and needs consistent read-and-write behavior. It applies to memory stored in files or other backends.
Why use it?
A connected memory tool does not automatically make an agent use memory. These rules help prevent repeated questions, lost decisions, and repeated mistakes between sessions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the agentic-awesome-skills plugin — 174 skills shipped together

Good fit Use it when an agent has a memory tool or server and needs consistent read-and-write behavior. It applies to memory stored in files or other backends.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lingxling/awesome-skills-cn/agent-memory-discipline
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add lingxling/awesome-skills-cn --skill agent-memory-discipline
Clone the repo
git clone --depth 1 https://github.com/lingxling/awesome-skills-cn

Made for: Claude Code.

Or install agentic-awesome-skills, the plugin that ships this one along with the rest of its 174 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-memory-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/lingxling/awesome-skills-cn/agent-memory-discipline/github.svg)](https://agentmods.dev/skills/lingxling/awesome-skills-cn/agent-memory-discipline)
Your own site
<a href="https://agentmods.dev/skills/lingxling/awesome-skills-cn/agent-memory-discipline"><img src="https://agentmods.dev/badge/skills/lingxling/awesome-skills-cn/agent-memory-discipline/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-memory-discipline

Your own site · 80×15
<a href="https://agentmods.dev/skills/lingxling/awesome-skills-cn/agent-memory-discipline"><img src="https://agentmods.dev/badge/skills/lingxling/awesome-skills-cn/agent-memory-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,585 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.02585
Opus 5.5 $0.00014 $0.01034
Sonnet 5.5 $0.00007 $0.00517
Haiku 4.5 $0.00004 $0.00259

Measured yesterday against content hash 478925af1805, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-memory-discipline scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to agent-memory-discipline — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

antigravity-awesome-skills/plugins/agentic-awesome-skills-claude/skills/agent-memory-discipline/SKILL.md · 205 lines

How it starts

The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on 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"

Read the full file on GitHub · 205 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 205 lines · 36 tokens per session scan A 478925af1805

Subscribe to this mod's changes

agent-memory-discipline is a skill published in the GitHub repository lingxling/awesome-skills-cn (299 stars, last pushed today), licensed MIT. It adds 36 tokens to every session and 2,585 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to agent-memory-discipline, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

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. Works with any memory backend.

sickn33/agentic-awesome-skills · 36 tokens

install-memu

Install or uninstall memU for whatever agent you are — identify your host, print its packaged guide, and follow it to wire (or unwire) both seams (record and inject). Use when the user asks to install, set up, integrate, remove, or uninstall memU.

NevaMind-AI/memU · 61 tokens

mm-save-session

An end-of-session recorder for Claude Code that saves the conversation summary and project state in Obsidian notes. Obsidian is a note-taking app that stores information as files.

mworldorg/markdown-memory · 129 tokens

mm-handoff

A skill that creates a compact handoff.md summary for starting a new Claude chat when the current chat is full. The file records recent work, current status, open questions, and selected project context.

mworldorg/markdown-memory · 164 tokens

mm-clear-gate

A read-only checkpoint that uses a script to check whether project notes, handoff files, repository changes, and session records have been saved before clearing context.

mworldorg/markdown-memory · 167 tokens

mm-setup

A setup guide that personalizes a shared mm system for one user. It asks for details such as your name, work area, tools, language, and Obsidian vault location, then saves them in private configuration files.

mworldorg/markdown-memory · 152 tokens