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.
npx skills add lingxling/awesome-skills-cn --skill agent-memory-disciplinegit clone --depth 1 https://github.com/lingxling/awesome-skills-cnWrote 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.
[](https://agentmods.dev/skills/lingxling/awesome-skills-cn/agent-memory-discipline)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
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"
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.
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.
- yesterday First seen · 205 lines · 36 tokens per session scan A 478925af1805
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.
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.
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.
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.
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.
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.
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.