Agent skill

Agent Memory Discipline

by davepoon in davepoon/buildwithclaude

Teaches when to recall from long-term memory before acting and when to save durable decisions, corrections and failures afterwards.

CC0-1.0Auto-check passedAgent Workflows

Install Agent Memory Discipline

skills CLI
$ npx skills add davepoon/buildwithclaude --skill agent-memory-discipline -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davepoon/buildwithclaude agent-memory-discipline --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davepoon/buildwithclaude.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/all-skills/skills/agent-memory-discipline .claude/skills/agent-memory-discipline && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-memory-discipline
GitHub stars
3.6k
Used in
1 other repo
Token cost
~1.4k tokens
SKILL.md length
825 words
Files
1
Skills in repo
246
Repo updated
First seen
Licence
CC0-1.0

At a glance

Teaches when to recall from long-term memory before acting and when to save durable decisions, corrections and failures afterwards.

  • Works in 4 steps: This is a correction, which is the… → Write: Project uses pnpm, not npm.… → Do not also save "the user was annoyed",… → …
  • MCP memory server is connected but the agent is not using it consistently
  • SKILL.md covers Recall before acting, Save after deciding, Write it so it survives and Do not overwrite the past,…, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Agent Memory Discipline is an agent skill from davepoon/buildwithclaude. 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.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Agent memory. It works with Model Context Protocol. The repository describes itself as: A single hub to find Claude Skills, Agents, Commands, Hooks, Plugins, and Marketplace collections to extend Claude Code, Claude Desktop, Agent SDK and OpenClaw. The licence is CC0-1.0.

When your agent uses it

  • MCP memory server is connected but the agent is not using it consistently
  • The user complains that the assistant forgets preferences
  • Past decisions between sessions
  • Setting up persistent memory for a project

Example prompts

  • “Use the agent-memory-discipline skill to teach when to recall from long-term memory before acting and when to save durable decisions, corrections…”
  • “/agent-memory-discipline”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  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.

What it can do on your machine

Read from SKILL.md and the folder at commit 616deb5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • mnemoverse.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Memory Discipline loads about 1.4k tokens when it runs. Until then it costs about 130 tokens; SKILL.md has 825 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~130
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davepoon/buildwithclaude at commit 616deb5, republished under its CC0-1.0 licence (© davepoon). 825 words, ~1,425 tokens.

Download SKILL.mdSave it as .claude/skills/agent-memory-discipline/SKILL.md (or your agent's skills folder).
name
agent-memory-discipline
description
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.
category
ai-agents
license
CC0-1.0

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.

Show full SKILL.md (343 more words)Show less

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.

© davepoon, CC0-1.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/all-skills/skills/agent-memory-discipline of davepoon/buildwithclaude.

Open the folder on GitHubat commit 616deb5

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in davepoon/buildwithclaude, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Agent Memory Discipline next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Memory Discipline compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Memory Discipline this skilldavepoon/buildwithclaude3.6k1 repos~1.4kAutomated safety check: PassCC0-1.0
MemPalace Memory SearchMemPalace/mempalace59k—~1.4kAutomated safety check: PassMIT
MemPalace Setup and OperationMemPalace/mempalace59k—~2.2kAutomated safety check: PassMIT
agentmemory Setup and Diagnosticsrohitg00/agentmemory29k—~1kAutomated safety check: NotesApache-2.0
Claude-Mem Install for Grok Botthedotmack/claude-mem99k—~440Automated safety check: PassApache-2.0
Qmdbreferrari/obsidian-mind5k—~1.7kAutomated safety check: PassMIT

Similar skills

  • MemPalace Memory Search

    MemPalace/mempalace

    Mines project files and conversation exports into a local, searchable memory palace and recalls past work by semantic search through the mempalace CLI.

    59k GitHub stars~1.4k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Installs and configures MemPalace as a private local palace, a shared-brain hub or a client of an existing hub, including MCP registration and version-correct initialization.

    59k GitHub stars~2.2k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Sets up and troubleshoots a local agentmemory install, covering the MCP connection, environment variables, ports, authentication and optional feature flags.

    29k GitHub stars~1k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Claude-Mem Install for Grok Bot

    thedotmack/claude-mem

    Use this when setting up claude-mem on Grok Bot: local worker plus CMEM Pro observer (default), optional host-login observer, or remote cmem.ai. No Cursor…

    99k GitHub stars~440 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Qmd

    breferrari/obsidian-mind

    Search the vault using QMD semantic search. An agent skill from breferrari/obsidian-mind.

    5k GitHub stars~1.7k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed
  • Agent Memory

    tigerless-labs/agent-memory

    Read and write the shared long-term memory store. An agent skill from tigerless-labs/agent-memory.

    3k GitHub stars~1.3k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from davepoon/buildwithclaude

All 246 skills in this repo
  • iOS Hig Design Guide

    davepoon/buildwithclaude

    Build, update, and apply iOS design specifications using Apple Human Interface Guidelines (HIG) source data.

    3.6k GitHub stars~735 tokensUpdated today
    Auto-check passed
  • Video Downloader

    davepoon/buildwithclaude

    Download YouTube videos with customizable quality and format options.

    3.6k GitHub starsUsed in 1 repo~871 tokens
    Auto-check passed
  • Qwen Vision

    davepoon/buildwithclaude

    A skill your agent uses when the user asks to "analyze video", "watch this video", "what happens in this video", "describe this clip", "review this footage", "classify these videos", "compare…

    3.6k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Atlas Cloud Media

    davepoon/buildwithclaude

    Discover Atlas Cloud image and video models, inspect their live schemas, and submit one confirmed media generation request with bounded GET polling.

    3.6k GitHub stars~852 tokensUpdated today
    Auto-check passed
  • Browser Extension Launch

    davepoon/buildwithclaude

    面向没有编程经验的用户,把想法做成可试用的浏览器插件,并完成检查、商店材料、审核提交和上线验证;也用于继续已有插件、排错和发布新版。用户说“帮我做个插件”“把插件上架”“继续我的插件”时使用。普通网站开发、仅查询插件知识不触发。

    3.6k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Slack Gif Creator

    davepoon/buildwithclaude

    Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives.

    3.6k GitHub starsUsed in 12 repos~4.3k tokens
    Auto-check passed

Categories

Questions about Agent Memory Discipline

What does Agent Memory Discipline do?

Teaches when to recall from long-term memory before acting and when to save durable decisions, corrections and failures afterwards. Agent Memory Discipline is an agent skill from davepoon/buildwithclaude. Teaches when to recall from long-term memory before acting and when to save durable decisions, corrections and failures afterwards.

When should I use Agent Memory Discipline?

Agent Memory Discipline fits situations like: MCP memory server is connected but the agent is not using it consistently; the user complains that the assistant forgets preferences; past decisions between sessions; setting up persistent memory for a project.

How do I install Agent Memory Discipline in Claude Code?

Run `npx skills add davepoon/buildwithclaude --skill agent-memory-discipline -a claude-code`. Or copy the skill folder (plugins/all-skills/skills/agent-memory-discipline in davepoon/buildwithclaude) into .claude/skills/agent-memory-discipline in your project. Claude Code loads it when a task matches its description.

How do I install Agent Memory Discipline in Codex?

Run `npx skills add davepoon/buildwithclaude --skill agent-memory-discipline -a codex`. Or copy the skill folder (plugins/all-skills/skills/agent-memory-discipline in davepoon/buildwithclaude) into .agents/skills/agent-memory-discipline in your project. Codex loads it when a task matches its description.

Can I use Agent Memory Discipline in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davepoon/buildwithclaude --skill agent-memory-discipline -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-memory-discipline, .gemini/skills/agent-memory-discipline, .github/skills/agent-memory-discipline and .opencode/skills/agent-memory-discipline in your project.

What does Agent Memory Discipline need to run?

SKILL.md names no scripts, command-line tools or credentials: Agent Memory Discipline is instructions for the agent only. Our summary lists: Node.js.

Does Agent Memory Discipline access the network?

SKILL.md names 1 domain. As links in the text: mnemoverse.com. This is read from the text; nothing was executed.

Is Agent Memory Discipline safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Memory Discipline use?

Agent Memory Discipline is published under the CC0-1.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Memory Discipline use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Memory Discipline?

Skills that share tags, products or a category with Agent Memory Discipline: MemPalace Memory Search (MemPalace/mempalace, 59k stars), MemPalace Setup and Operation (MemPalace/mempalace, 59k stars), agentmemory Setup and Diagnostics (rohitg00/agentmemory, 29k stars) and Claude-Mem Install for Grok Bot (thedotmack/claude-mem, 99k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Memory Discipline?

davepoon (a GitHub user) maintains it in davepoon/buildwithclaude, which has 3,605 GitHub stars. The repository holds 246 skills in this directory. The repository was last updated on October 9, 2026.

Source: davepoon/buildwithclaude on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.