Skip to content
Back to skills

Claude Mem

ASecurity

Persistent project memory. Keeps a PROJECT_CONTEXT.md at the repo root holding the project's purpose, stack, commands, file map, locked decisions, current state and next steps. Reads it at the start of work and updates it at the end of every session that changed something. Use when the user says "claude-mem", "remember this for next time", "update project context", "where were we" or "pick up where we left off", at the start of work in any repo that already has PROJECT_CONTEXT.md, and before ...

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentsrustgosqlgitapi

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add mnzralee/claude-multi-agent-architecture --skill claude-mem --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Claude Mem?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Claude Mem
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mnzralee-claude-mem/badge)](https://www.skillsdirectory.com/skills/mnzralee-claude-mem)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: claude-mem
description: Persistent project memory. Keeps a PROJECT_CONTEXT.md at the repo root holding the project's purpose, stack, commands, file map, locked decisions, current state and next steps. Reads it at the start of work and updates it at the end of every session that changed something. Use when the user says "claude-mem", "remember this for next time", "update project context", "where were we" or "pick up where we left off", at the start of work in any repo that already has PROJECT_CONTEXT.md, and before ending a session that changed code or decisions. Composes with ponytail and napkin. Not for personal preferences about the user (Claude's own memory holds those), and not for a repo that already runs its own state discipline.
metadata:
  version: "1.0.0"
---

# Claude-mem: persistent project memory

You are the project's chief of staff. Every session starts cold, with no memory of yesterday's decisions, last week's dead ends, or the folder somebody renamed. Your job is to make the next session start warm, by keeping one short, true, current file that any agent or person can read in two minutes.

Input: $ARGUMENTS

## The problem this fixes

Without it, every session rediscovers the stack, relitigates settled decisions, and proposes again the approach that was already tried and rejected. Work done in one session is invisible to the next. Notes, when they exist at all, are scattered through chat history nobody can search.

## Where it sits among the memory layers

| Layer | Scope | Holds | Lifecycle |
|---|---|---|---|
| `PROJECT_CONTEXT.md` (this skill) | One repo, committed | Current state: what this is, how it is built, what is decided, what is next | Rewritten as a snapshot |
| Work records (`docs/workrecords/`) | One repo, per day | The story of what happened and why | Append-only journal |
| `mistakes.log` (napkin) | One repo | Errors made and the rule that prevents each | Append-only |
| Claude's own memory | One user, private | Preferences and facts about the user | Managed by Claude Code |

Do not duplicate across layers. `PROJECT_CONTEXT.md` links to the others; it never copies them.

## Rules

1. **Read first.** At the start of work in a repo, read `PROJECT_CONTEXT.md` if it exists, before proposing anything. Treat its Decisions section as settled unless the user reopens one.
2. **Update at the end of every session that changed something:** code, a decision, the file layout or the plan. Also update right after a decision is locked mid-session, so it survives a crash or a context reset. A session that changed nothing leaves the file alone.
3. **Snapshot, not diary.** Rewrite Current State, File Map and Next Steps to describe now; do not append to them. History lives in git and the work records.
4. **Decisions are append-only.** Each locked decision gets one dated line with its reason. A reversed decision is never deleted: mark it `SUPERSEDED YYYY-MM-DD by D-NNN` and add the new line.
5. **Verify before you write.** Every path in the File Map exists (`ls` it), every command is one that runs, every "done" in Current State points at evidence (a commit, a passing test). Never record intent as fact.
6. **Stay under 150 lines.** Past that, compress: drop finished next steps, collapse the File Map to directories, move narrative to the work record. Short enough that reading it is never skipped.
7. **Never store secrets.** No tokens, passwords, keys, connection strings or personal data. Name where a secret lives (`.env`, the vault), never its value.

If the repo already runs its own state discipline (a knowledge base with its own index and changelog, or a canonical state file the user has named), do not create `PROJECT_CONTEXT.md`. Follow that repo's rules instead.

## The file

Create it from this template the first time, only when the user asks or invokes this skill in a repo without one:

```markdown
# PROJECT_CONTEXT

> Last updated: YYYY-MM-DD by <session or agent>. Read this first. It is the current state, not a history.

## Purpose
<One or two sentences: what this is and who it is for.>

## Stack
<Languages, frameworks, datastore, hosting. Versions where they matter.>

## Commands
<The real dev, test, build, lint and deploy commands. Only ones verified to run.>

## File Map
<The directories and key files that matter, one line each, with what lives there.>

## Decisions
- D-001 | YYYY-MM-DD | <decision> | why: <reason>

## Current State
<What works, what is half-built, what is broken. Each claim backed by a commit or a test.>

## Next Steps
1. <The single next action, specific enough to start without asking.>

## Open Questions
- <What is waiting on whom.>

## See also
- Work records: docs/workrecords/
- Mistakes: mistakes.log
```

## Examples

### Example 1: recording a decision

Bad: `Decided to use Postgres.` No date, no reason, no id, so the next session cannot tell whether it is settled or why.

Good: `- D-004 | 2026-11-28 | Postgres over SQLite for the API | why: two writers (API and worker) need row-level locking`

### Example 2: current state

Bad: `Auth is done and working great. Payments mostly done.`

Good: `Auth: email magic link shipped (a1b2c3d), 14 tests pass. Payments: Stripe checkout session creates; webhook handler not written, see Next Steps 1.`

### Example 3: the end-of-session update

Bad: appending a 60-line "Session 7 summary" to the bottom, so the file grows forever and the current state is buried.

Good: rewrite Current State in place, remove the finished next step, add the new decision line, bump `Last updated`. Under ten changed lines.

## Tool usage

- **Session start:** read `PROJECT_CONTEXT.md`. If it is missing and the user did not ask for it, do not create it; mention once that claude-mem can start one.
- **Before updating:** run `git log --oneline -10` and `git status` to ground what actually changed, and `ls` every path you are about to list.
- **Updating:** use Edit for targeted section rewrites. Use Write only to create the file or after a compression pass.
- **After updating:** `wc -l PROJECT_CONTEXT.md` must report 150 or fewer.
- Commit it together with the code it describes (`docs(context): ...`) when the project commits per logical step.

## Output format

At session start, stay silent unless something matters, then use one line: `Context loaded: <purpose>; next step is <Next Steps 1>.` If the file contradicts the code, say so in one line and trust the code.

At session end, after the update:

```
PROJECT_CONTEXT.md updated
- Decisions: +D-005 (<short>)
- State: <what changed, one line>
- Next: <new Next Steps 1>
```

## Composition

- **With napkin:** the See also section points to `mistakes.log`; entries are never copied in.
- **With ponytail:** the Stack and Commands sections tell ponytail what is already installed, so minimal code reuses it.
- **With the kit's work-recording skill:** the work record tells the story, this file tells the state. Write both, duplicate neither.
- **With the Operating Standard:** this skill is how its "check memory for prior context and write findings back" snippet is made concrete at repo level.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.