Skip to content

About

A git-tracked markdown memory bank for AI coding agents (Agent Skill for Claude Code, Cursor and others)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

memory-bank

A memory bank for AI coding agents: a few markdown files in your repo that tell the agent where the project stands, so a new session picks up where the last one stopped. It is an Agent Skill (a SKILL.md plus templates), so it works in Claude Code and Cursor, and any other agent that loads skills.

Note

memory-1 is potentially a better memory system: it keeps the current state like memory-bank does (a short NOW.md), plus dated notes for decisions, reversals and preferences with their history. In a benchmark on one real project (30 questions about past decisions) it scored 1.59 out of 2 against 1.13 for memory-bank. It is one project, so treat it as a direction, not a ranking; see the benchmark. You do not need both.

  • Plain markdown, tracked in git. No service, no database. Each branch and worktree carries its own copy, so context follows the branch and shows up in PR diffs.
  • Small enough to read whole. The agent reads two short files at session start, not the whole history.
  • Trigger-based updates. The agent edits the files when a task finishes, a blocker appears or a decision is made, not every turn.

The files

memory/
  progress.md        macro checklist: done, open, known bugs          (read at session start)
  activeContext.md   scratchpad: focus, blockers, next step           (read at session start)
  decisions.md       append-only log of technical decisions and why
  archive.md         finished history, moved out to keep the two above short
  friction/          maintenance backlog: tool, doc and workflow problems to fix later

The skill creates this folder on first use from skills/memory-bank/templates/, including friction/.

The main purpose of memory-bank is to preserve project context across sessions. friction/ is a secondary maintenance log: it records tools, documentation or workflows that failed, misled the agent or required a workaround, so those problems can be fixed later. It does not contribute to the project memory used to resume work and is not read at session start. Keep entries brief, record the workaround, and continue the current task; review open entries when planning maintenance. A problem that blocks the current task also belongs in activeContext.md.

Install

Any agent: the skills CLI

npx skills add illescasDaniel/memory-bank

It asks which agents to install for (Claude Code, Cursor and others) and whether to install into the current project or globally. Non-interactive: npx skills add illescasDaniel/memory-bank -a claude-code -a cursor -y, plus -g for global.

By hand

Copy the skills/memory-bank folder into your agent's skills directory.

Project (shared with your team) All your projects
Claude Code .claude/skills/memory-bank/ ~/.claude/skills/memory-bank/
Cursor .cursor/skills/memory-bank/ ~/.cursor/skills/memory-bank/
git clone https://github.com/illescasDaniel/memory-bank
cp -r memory-bank/skills/memory-bank your-project/.claude/skills/

Use it

Ask your agent: "set up the memory bank". It creates missing files in memory/ from the templates, preserving existing notes even in a partially initialized folder. From then on the skill's description tells the agent when to use it (session start, finished task, blocker, decision, end of session).

Skills are loaded when the agent judges them relevant, so for a guaranteed session start add this to your AGENTS.md (or CLAUDE.md), which is always in context:

## Memory bank

Project state lives in `memory/` (git-tracked, so it follows the branch). At session start, read
`memory/activeContext.md` then `memory/progress.md`. Update on these triggers only: a task is completed or discovered
(`progress.md`); focus changes, a blocker is hit or work concludes (`activeContext.md`); a significant technical
decision is made (`decisions.md`, append-only, newest first). Full protocol: the `memory-bank` skill.

Starting a feature branch? Ask the agent to "initialise the memory bank for this branch": it resets progress.md and activeContext.md and leaves decisions.md alone.

Using it with jev-mem

A markdown bank holds current state. It is the wrong place for the hundreds of dated facts a project accumulates (why you chose X, what caused that bug, what a gotcha looks like), because the agent cannot read them all each session. jev-mem is built for that part: long-term memory the agent searches by relevance, with newer facts superseding older ones. Run both and keep them apart:

Kind Where Why
Current state: focus, work in progress, blockers, next steps memory/ (this repo's skill) small, read whole, follows the branch, reviewed in PRs
Dated facts that stay true: decisions and reasons, bug causes, gotchas, preferences jev-mem too many to read whole; recalled by relevance
Rules the agent must always follow AGENTS.md / CLAUDE.md always in context

Never put current state in the semantic memory: "next step is X" goes stale silently. A significant decision gets both a decisions.md entry and a one-fact jev-mem note. The memory-bank skill already says this, and jev-mem's own skill mirrors it, so the two agree out of the box.

Contributing

Issues and pull requests are welcome. The skill is deliberately short: if a change makes SKILL.md longer, it should earn it.

License

MIT, see LICENSE.

About

A git-tracked markdown memory bank for AI coding agents (Agent Skill for Claude Code, Cursor and others)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors