memory-and-plans

memory-and-plans is a skill for Claude Code from w2ur/claude-code-setup. It costs 70 tokens per session (885 once invoked), scanned A, original, MIT.

A guide to the two places where this setup stores long-term knowledge: shared project memory and memory belonging to one coding agent. It also explains where work plans are stored and how memory settings choose a location.

In plain words
What is it for?
Use it when creating, moving, combining, excluding from Git, or proposing storage for memory and plans.
Why use it?
It prevents memory from being duplicated, put in the wrong project, committed to source control, or confused with a work plan.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it when creating, moving, combining, excluding from Git, or proposing storage for memory and plans.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/w2ur/claude-code-setup/memory-and-plans
Install

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.

Any agent
npx skills add w2ur/claude-code-setup --skill memory-and-plans
Clone the repo
git clone --depth 1 https://github.com/w2ur/claude-code-setup

Made for: Claude Code.

Wrote 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.

agentmods badge for memory-and-plans

README.md
[![agentmods](https://agentmods.dev/badge/skills/w2ur/claude-code-setup/memory-and-plans/github.svg)](https://agentmods.dev/skills/w2ur/claude-code-setup/memory-and-plans)
Your own site
<a href="https://agentmods.dev/skills/w2ur/claude-code-setup/memory-and-plans"><img src="https://agentmods.dev/badge/skills/w2ur/claude-code-setup/memory-and-plans/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.

agentmods 80×15 button for memory-and-plans

Your own site · 80×15
<a href="https://agentmods.dev/skills/w2ur/claude-code-setup/memory-and-plans"><img src="https://agentmods.dev/badge/skills/w2ur/claude-code-setup/memory-and-plans.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 885 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.00885
Opus 5.5 $0.00028 $0.00354
Sonnet 5.5 $0.00014 $0.00177
Haiku 4.5 $0.00007 $0.00089

Measured 25d ago against content hash b514c56d9db5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory-and-plans 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 25d ago.

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.

skills/memory-and-plans/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Memory and plans — the reasons

The rules live in ~/.claude/CLAUDE.md. This skill holds the mechanics.

Two systems, one role each

system location holds
auto-memory ~/.claude/projects/-Users-{username}-Dev/memory/, indexed by MEMORY.md session handoffs, durable cross-session knowledge — user preferences, project state, feedback
per-agent memory <project root>/.claude/agent-memory/<agent>/ operational knowledge scoped to ONE agent: patterns, past corrections in that agent's domain

Do not duplicate across them.

Do not call auto-memory "agent memory". The bare phrase collides with the per-agent system's actual name and has caused real confusion.

Plans are not a memory system. They live in ~/.claude/plans/, never in a repo (project repos under ~/Dev; the private my-config-backup repo is the plans backup).

How the memory: frontmatter key resolves

An agent definition's memory: key resolves as:

value resolves to
user ~/.claude/agent-memory/<agent>/
project <project root>/.claude/agent-memory/<agent>/
local <project root>/.claude/agent-memory-local/<agent>/

Every agent that declares it declares project. None declares user.

Why per-agent stores are scattered, and why that is correct

Because the key resolves against the project root of the session that ran, a store appears wherever a session's project root happened to be:

  • one per repo
  • plus one per nested working directory a session was launched from (e.g. <repo>/client/)
  • plus one per worktree

Anything under ~/.claude/agent-memory/ is residue from sessions whose project root was ~/.claude — not a separate tier.

Do not "consolidate" them upward. That fights the resolver, and the agent will simply not find what you moved.

Per-agent memory must never be committed

The harness default-ignores only agent-memory-local/, not agent-memory/. So a repo trusting that default will happily stage its memory files.

Read the full file on GitHub · 86 lines

Changes

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.

  1. 25d ago Changed · +1 lines b514c56d9db5
  2. 1mo ago First seen · 85 lines · 70 tokens per session scan A 3355ebbefe16

Subscribe to this mod's changes

memory-and-plans is a skill published in the GitHub repository w2ur/claude-code-setup (2 stars, last pushed 7d ago), licensed MIT. It adds 70 tokens to every session and 885 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

catchup

Restore context after /clear by summarizing recent work and project state.

FlorianBruniaux/claude-code-plugins · 16 tokens

codebase-insight

When the user wants to deeply understand a codebase, map its architecture, or build a persistent mental model for future sessions. Use when the user says "explain this codebase," "map the architecture," "codebase insight," "understand this repo," "what does this project do," "how does this work," "analyze the…

irfad7/claude-power-skills · 98 tokens

workflow-capture

Maintain a durable, tagged journal of a complex workflow so it can later be distilled into a reusable skill. Use this whenever beginning a complex, multi-step workflow (design work, automation build, CAD, RAG pipeline, website work, or anything non-trivial you might want to repeat), even if the user does not say…

Mfrostbutter/skill-forge · 112 tokens

kairos-session

When starting or ending a work session, or when context files need maintenance. Use when the user says "boot up," "morning briefing," "end session," "session review," "what changed," "sync state," "kairos," "dream," "consolidate," "session start," or at the natural beginning/end of any significant work session.…

irfad7/claude-power-skills · 94 tokens

thinkback

When the user wants to review past decisions, understand why something was built a certain way, audit decision quality, or learn from past reasoning. Use when the user says "why did we," "look back," "thinkback," "decision review," "was that the right call," "what were we thinking," "review our decisions," "decision…

irfad7/claude-power-skills · 99 tokens

autodream

When ending a session, consolidating memory, or when memory files feel stale or contradictory. Use when the user says "dream," "consolidate memory," "clean up memory," "merge notes," "memory maintenance," "what do you remember," "update your knowledge," "session end," or when memory/context files have accumulated…

irfad7/claude-power-skills · 89 tokens