Skip to content
FunCoding

Search

Search docs, Skills and MCP

agent-memory-discipline

Teaches when to recall from long-term memory before acting and when to save durable decisions, corrections and failures afterwards. Use when a memory tool or MCP memory server is connected but the agent is not using it consistently, when the user complains that the assistant forgets preferences, conventions or past decisions between sessions, or when setting up persistent memory for a project. Works with any memory backend: a folder of Markdown files, a local MCP server, or a managed service.

文档与办公3.6kplugins/all-skills/skills/agent-memory-discipline/SKILL.md

Install

Send this to Claude Code, Codex or Cursor. The agent checks the Skill for safety first and installs it only after you confirm.

读取 https://funcoding.ai/skills/davepoon/buildwithclaude/agent-memory-discipline/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

Agent memory discipline

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.

It is backend-agnostic. Everything below works the same whether memory is a folder of Markdown files, a local MCP server, or a hosted service.

Recall before acting

Read memory before doing any of these, not after:

  • starting work on a project you have 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"

Do not 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.

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 you, 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 you can 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.

Write it so it survives

A memory that is useless in three weeks was written wrong. Each entry should carry, 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 your paraphrase. Paraphrase drifts.

Do not overwrite the past, close 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 is invisible until someone asks a question about old code.

Keep contradictions instead of resolving them silently

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.

Evidence and policy are different weights

  • 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 it has worked repeatedly. Never promote a single observation to a rule on your own.

A worked example

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: 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", "I ran npm install", or the lockfile contents.
  4. Next session, before running any package command in this repo, recall first and find it.

Checklist to keep in the loop

Before acting on project-specific work: did I recall? After a decision, correction, or failure: did I save it, in one sentence, with its reason? When something changed: did I close the old entry instead of deleting it?


Backends

This skill assumes a memory tool exists. Any of these work:

  • 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 your machine; several open-source options exist.
  • A hosted memory service over MCP. Adds portability across tools and machines at the cost of your data living elsewhere.

Written and maintained by the team behind Mnemoverse, which is one hosted implementation. The rules above are deliberately backend-neutral and were written to be useful without it.

Similar Skills

pdf
anthropics/skills180k

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

Docs & office

discernment-nudge
anthropics/skills180k

discernment-nudge

After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.

Docs & office

doc-coauthoring
anthropics/skills180k

doc-coauthoring

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

Docs & office

docx
anthropics/skills180k

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

Docs & office

pptx
anthropics/skills180k

pptx

Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.

Docs & office

canvas-design
anthropics/skills180k

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

Docs & office