Home › All prompts › Claude Code Memory: Stop It Forgetting Your Decisions

Mini pack

Free

Claude Code Memory: Stop It Forgetting Your Decisions

Every Claude Code session starts with a fresh context window, and anything you only said in the chat can be lost when a session ends or gets compacted. These 9 free prompts help you see what Claude Code remembers today, put each rule and decision in the right place, keep your must-follow rules through compaction, and save each day's decisions before you close the session.

See what Claude Code really remembers, put each rule and decision in the right place, keep your must-follow rules through long sessions and compaction, and stop re-explaining your project every morning.

9 prompts in 4 sections. Replace everything in [BRACKETS IN CAPS], then copy and paste into your AI tool.

Download the free PDF

PDF, 16 pages

Written for use with

  • Claude Code: all 9 prompts are pasted into Claude Code opened in your project. Prompts 1.1, 2.3, 3.1 and 4.2 read and report first and wait for your OK before any change; 1.2 only reports; 2.1, 2.2 and 4.1 show the change and wait for your OK; 3.2 is a before-and-after quiz around a /compact you run yourself. The prompts use CLAUDE.md (project, .claude/CLAUDE.md, ~/.claude/CLAUDE.md), CLAUDE.local.md, .claude/rules/ with and without paths:, auto memory (MEMORY.md, first 200 lines or 25KB, autoMemoryEnabled), /memory, /context all, /compact, /clear, /rename, /resume, /doctor prompt-audit, the language setting and a SessionStart hook with a compact matcher. Each was checked against Claude Code's memory, context window, hooks guide, settings reference and commands docs.
  • No stats, prices or X claims: the pack quotes no numbers beyond the docs' own file limits, no posts, and has no affiliate or sponsor copy.

Written for use with Claude Code. Not yet tested against it.

All 9 prompts

  1. 1.1 What Do You Remember, and Where Is It Stored?
  2. 1.2 Find What Got Lost
  3. 2.1 Sort My Notes: CLAUDE.md, a Decisions Log, or Nowhere
  4. 2.2 Start a DECISIONS.md It Checks Before Changing Course
  5. 2.3 Clean Up Auto Memory
  6. 3.1 Rules That Must Survive a Long Session
  7. 3.2 Check It Still Remembers After /compact
  8. 4.1 End-of-Session Save: Keep Today's Decisions
  9. 4.2 Monthly Memory Tune-Up

Section 1: See What It Remembers

1.1 What Do You Remember, and Where Is It Stored?

Untested: not yet run against a model.

Use this when you're not sure what Claude Code knows about your project at the start of a session. It's for a plain map of every memory file it reads, what each one says, and anything that's missing, out of date or in two places at once.

Fill in: [WHAT MY APP DOES] (e.g. "a booking app for dog walkers"), [THINGS I KEEP RE-EXPLAINING] (e.g. "we use pnpm, replies in Spanish, never edit the migrations folder").

Don't change any files. I want to see exactly what you remember about this project and where each piece is stored.

What my app does: [WHAT MY APP DOES]
Things I keep re-explaining: [THINGS I KEEP RE-EXPLAINING]

Please:
1. Look for every instruction file that applies here: CLAUDE.md, .claude/CLAUDE.md, CLAUDE.local.md, any CLAUDE.md files in subfolders, AGENTS.md, files in .claude/rules/, and my personal ~/.claude/CLAUDE.md. Also look for your auto memory index (MEMORY.md) for this project. List each file with its path, its length in lines, and when it loads (every session, or only for certain files or folders).
2. Summarize what each file tells you in 3 to 5 short bullets.
3. For each thing I keep re-explaining, tell me whether it's written down anywhere you read at the start of a session. If it is, quote the line. If it isn't, say "only in chat".
4. Point out anything that's out of date, says the same thing twice, or contradicts another file.
5. If you can't open a file (for example, because it's outside this project), tell me which one, and I'll open it myself with /memory.

Tips to customize: After this, type /context all and look under Memory files to see which files actually loaded in this session. A CLAUDE.md in a subfolder won't be listed there, because it loads only when Claude works in that folder. To browse the notes Claude saved on its own, run /memory and open the auto memory folder. Everything in it is plain Markdown you can read.

1.2 Find What Got Lost

Untested: not yet run against a model.

Use this when Claude seems to have forgotten something you agreed on earlier, especially right after a long session or a compaction. It's for a list of the rules and decisions from this session that live only in the chat, so you can save them before they're gone.

Fill in: [WHAT WE WORKED ON TODAY] (e.g. "the checkout page and the refund flow"), [WHAT IT FORGOT] (e.g. "it started using npm again" or "not sure").

Don't change any files. I think you've lost track of some things we agreed on in this session.

What we worked on today: [WHAT WE WORKED ON TODAY]
What you forgot, as far as I can tell: [WHAT IT FORGOT]

Please:
1. List every rule, preference and decision from this session that you can still see in our conversation or its summary. For each one, say whether it's also written in a file you read at the start of every session. Quote the line if it is.
2. Mark anything that lives only in the chat as "at risk". Those are the ones the next compaction or a new session can lose.
3. If the summary seems to have dropped something I mentioned above, say so plainly. Don't guess what it was. Ask me.
4. For each "at risk" item, suggest where it should go: CLAUDE.md (I want it every session), a decisions log (it's a choice we made and the reasons), or nowhere (it only mattered today).
Show me the list. Don't save anything until I say which items to keep.

Tips to customize: If something was lost, tell Claude the missing rule again in one sentence, then run Prompt 2.1 or 3.1 to save it properly. Claude Code's docs say that if an instruction disappeared after compaction, it was usually given only in the chat. Adding it to your project-root CLAUDE.md is what makes it stick.

Section 2: Put Each Thing in the Right Place

2.1 Sort My Notes: CLAUDE.md, a Decisions Log, or Nowhere

Untested: not yet run against a model.

Use this when you have rules and notes scattered across chats, docs and your head, and you're not sure what Claude should read every time. It's for sorting each note into the right home, so your CLAUDE.md stays short and your decisions are still easy to find.

Fill in: [MY NOTES] (paste your list, one per line, e.g. "use pnpm", "we chose Stripe Checkout over a custom form because it's simpler", "the logo is blue").

Help me decide where each of these notes should live so you remember the right things.

My notes:
[MY NOTES]

First, read my CLAUDE.md files, any .claude/rules/ files, and DECISIONS.md if I have one, so you don't suggest anything I already have.

Then sort every note into one of these:
A. CLAUDE.md: short facts and "always do X" rules you need in every session, like build commands, conventions and files to leave alone.
B. A rules file in .claude/rules/: rules that only matter for one part of the project, like "API handlers" or "database migrations".
C. DECISIONS.md: choices we made and why, so you can look them up before changing something we already decided.
D. CLAUDE.local.md: things only I need, like my test account or local URLs. This file should stay out of git.
E. Nowhere: things you can work out from the code, things that only mattered once, or things already written down.

Show me a table: the note, where it goes, and a one-line reason. Rewrite each A and B note as a short, specific instruction (for example, "Use pnpm, not npm" instead of "use the right package manager"). Don't change any files until I say yes.

Tips to customize: Claude Code's docs suggest keeping each CLAUDE.md under 200 lines, writing instructions concrete enough to check, and moving long step-by-step procedures into a skill. Our free Claude Code Subagents and Skills for Beginners pack shows you how to make one. A rules file with paths: loads only when Claude works on matching files, so don't put a must-follow, project-wide rule there.

2.2 Start a DECISIONS.md It Checks Before Changing Course

Untested: not yet run against a model.

Use this when Claude Code keeps suggesting things you already ruled out, or undoes choices you made last week. It's for a short decisions log with the reasons behind each choice, and a CLAUDE.md line telling Claude to check it before changing anything it covers.

Fill in: [DECISIONS WE'VE MADE] (e.g. "Supabase for the database", "no dark mode until launch", "all dates are stored in UTC"), [WHERE TO SAVE IT] (e.g. docs/DECISIONS.md).

Help me start a decisions log so you stop undoing choices we've already made.

Decisions we've made so far:
[DECISIONS WE'VE MADE]
Where to save it: [WHERE TO SAVE IT]

Please:
1. Look through the project, our git history and this conversation for other decisions that seem settled, like the libraries we picked or the patterns we always follow. List them separately as "possible decisions" and mark each one "confirmed by me" or "your guess".
2. Draft the log. One short entry per decision: the date (or "before today" if you don't know it), the decision in one sentence, why we made it, and what would make us change it.
3. Draft a short line for my CLAUDE.md, something like: "Before you change a library, the data model or a pattern listed in [WHERE TO SAVE IT], read that file. If your change goes against a decision there, stop and ask me first."
4. Show me both. Only include "your guess" items I confirm. Don't save anything until I say yes.

Tips to customize: Don't import the log into CLAUDE.md with an @ line like @docs/DECISIONS.md. Claude Code's docs say an imported file loads along with the CLAUDE.md that imports it, so it would fill up every session. A plain mention, like the line in step 3, lets Claude open the log only when a change touches it. When you change your mind, edit the entry and add the new date, rather than leaving two decisions that disagree.

2.3 Clean Up Auto Memory

Untested: not yet run against a model.

Use this when Claude Code keeps saving notes that don't matter, or you're not sure what it has saved about you and your project. It's for a review of every auto memory note, with a plan to keep, fix, merge or delete each one.

Fill in: [THINGS I DON'T WANT REMEMBERED] (e.g. "one-off bug fixes", "anything about my old project", or "nothing in particular").

Don't change any files yet. I want to review the notes you've saved in auto memory for this project.

Things I don't want remembered: [THINGS I DON'T WANT REMEMBERED]

Please:
1. Open your auto memory index (MEMORY.md) for this project and the topic files it points to. If you can't open them, tell me, and I'll open the folder with /memory and paste them in.
2. List every note: what it says in one line, its file, and when it was last changed if the file shows it.
3. Mark each note as one of these: keep, fix (it's out of date or wrong), merge (it says the same as another note), move (it's really a rule for CLAUDE.md or a decision for my decisions log), or delete (it doesn't matter, you can work it out from the code, or it's on my list above).
4. Tell me how long MEMORY.md is now, and whether it's close to the 200 lines or 25KB that load at the start of each session.
Show me the plan as a table. Make the changes only after I say yes, and only the ones I approve.

Tips to customize: Auto memory files are plain Markdown, so you can also edit or delete them yourself from /memory. When you say "remember that..." in the chat, Claude saves it to auto memory. If you want it in CLAUDE.md instead, say "add this to CLAUDE.md". To turn auto memory off, use the toggle in /memory, or set "autoMemoryEnabled": false in a project's settings to turn it off just there. Auto memory stays on your computer and isn't shared across machines.

Section 3: Make Your Rules Survive Compaction

3.1 Rules That Must Survive a Long Session

Untested: not yet run against a model.

Use this when Claude Code forgets your language, style or "don't touch" rules partway through a long session. It's for finding where those rules live now and moving each one somewhere Claude Code reloads after compaction.

Fill in: [MY MUST-FOLLOW RULES] (e.g. "always reply in Spanish", "never edit files in /migrations", "use 2-space indentation"), [WHAT IT FORGETS] (e.g. "it switches back to English after an hour").

Don't change any files yet. These rules must hold for the whole session, even after the conversation gets compacted.

My must-follow rules:
[MY MUST-FOLLOW RULES]
What you tend to forget: [WHAT IT FORGETS]

Please:
1. For each rule, tell me where it lives right now: only in our chat, in my project-root CLAUDE.md, in a CLAUDE.md in a subfolder, or in a .claude/rules/ file with or without a paths: setting at the top.
2. Explain in plain words which of those places come back after compaction and which don't, and why each of my rules got lost.
3. Suggest a better home for each rule. Rules for the whole project should go in my project-root CLAUDE.md, or in a .claude/rules/ file with no paths: setting. For a language rule, also tell me about Claude Code's language setting.
4. Rewrite each rule to be short and specific, and put the most important ones under a clear heading near the top of CLAUDE.md.
Show me the exact changes. Don't save anything until I say yes.

Tips to customize: Claude Code's docs say your project-root CLAUDE.md, rules files without paths:, and auto memory are reloaded from disk after compaction. CLAUDE.md files in subfolders and rules with paths: come back only when Claude touches a matching file again. For replies in another language, Claude Code has a language setting, like "language": "spanish", which you can put in your settings file. If a rule must be back in front of Claude right after every compaction, a SessionStart hook with a compact matcher can add a short reminder. Our free Claude Code Guardrails pack covers hooks.

3.2 Check It Still Remembers After /compact

Untested: not yet run against a model.

Use this when you've saved your must-follow rules and want proof they come back after a compaction. It's for a quick before-and-after quiz, so you find a gap now instead of in the middle of real work.

Fill in: [MY MUST-FOLLOW RULES] (the same list as Prompt 3.1), [MY KEY DECISIONS] (3 to 5 from your decisions log).

I'm going to test whether you remember my rules and decisions after I run /compact.

My must-follow rules:
[MY MUST-FOLLOW RULES]
My key decisions:
[MY KEY DECISIONS]

Step 1, now: write 6 to 8 short quiz questions that check each rule and decision. Mix direct ones ("Which package manager do we use?") with small made-up tasks that would break a rule if you forgot it ("Add a column to the users table": the right answer follows our migration rules). Show me the questions only, no answers. I'll save them.

Step 2, after I run /compact and paste the questions back: answer each one in a sentence, and say where you got the answer from (CLAUDE.md, a rules file, auto memory, the decisions log, or the summary). If you're not sure, say "not sure" instead of guessing.

Tips to customize: Run /compact yourself between the two steps, then paste the questions back in. Any answer that comes from "the summary", or that's wrong, points to a rule that still lives only in the chat. Move it with Prompt 3.1 and test again. You can also run the quiz at the start of a brand-new session, to check what carries over from one day to the next.

Section 4: Keep It From Drifting

4.1 End-of-Session Save: Keep Today's Decisions

Untested: not yet run against a model.

Use this when you're wrapping up a working session, before you close Claude Code or start something new. It's for saving the decisions and rules from today into the right files, so tomorrow's session starts where today's left off.

Fill in: [WHAT WE FINISHED TODAY] (e.g. "refunds work, emails still to do"), [WHAT'S NEXT] (e.g. "send a receipt email after each refund").

We're wrapping up for today. Help me save what matters before I close this session.

What we finished today: [WHAT WE FINISHED TODAY]
What's next: [WHAT'S NEXT]

Please:
1. List the decisions we made today (what we chose and why) and any new rules or corrections I gave you. Quote my words where you can.
2. Draft new entries for my decisions log and any lines that belong in CLAUDE.md. Keep each one short and specific. Skip anything already written down.
3. Point out anything in CLAUDE.md or the decisions log that today's work made out of date.
4. Write a short "where we left off" note: what's done, what's half-done, and the next step. Suggest a file for it, like NEXT.md, rather than CLAUDE.md, because it'll change every day.
Show me everything first. Save only what I approve.

Tips to customize: Do this before /clear, because /clear starts a new conversation with empty context. To pick up later, start the next session with "Read NEXT.md and the decisions log, then tell me where we left off." Want the full conversation back too? Run /rename before you close, then find it later with /resume.

4.2 Monthly Memory Tune-Up

Untested: not yet run against a model.

Use this when Claude Code starts ignoring rules that used to work, or as a quick check once a month. It's for finding memory notes and instructions that are out of date, contradict each other, or have grown too long, and fixing them in one pass.

Fill in: [WHAT CHANGED THIS MONTH] (e.g. "moved from Firebase to Supabase", "dropped the blog", or "nothing big").

Don't change any files yet. Give my Claude Code memory a tune-up.

What changed in my project this month: [WHAT CHANGED THIS MONTH]

Please:
1. Read my CLAUDE.md files, CLAUDE.local.md, .claude/rules/, my decisions log, and your auto memory index for this project.
2. List anything that's out of date (especially anything touched by what changed this month), anything that points to files or commands that no longer exist, and any two lines that contradict each other. For each contradiction, quote both lines and ask me which one wins.
3. Tell me the length of each CLAUDE.md in lines, and flag any over 200. For a long one, suggest what to cut, what to move into a rules file with paths:, and what to move into a skill.
4. Suggest up to 5 rules worth adding, based on mistakes you've made or corrections I've given more than once. Mark each one "seen it happen" or "a guess".
Show me a short report with the changes you'd make. Make only the ones I approve.

Tips to customize: Claude Code has a built-in check for this too: type /doctor prompt-audit to get a report of outdated or conflicting instructions, with proposed edits. Nothing changes until you ask Claude to apply them. It needs a recent version of Claude Code. The docs warn that when two instructions contradict each other, Claude may just pick one, so fixing contradictions often matters more than adding new rules.

Get new free packs in your inbox

Optional. Every prompt here is free, and you don't need to sign up to use any of them. We email when we add new free packs. Unsubscribe anytime.

More free packs: Vibe Code Starter Pack Ship It Safe Fix My Bugs Ship It Live Make It Pretty Get Paid Signup Emails That Actually Arrive Lovable Credit Saver One Rules File for Every AI Tool Make Your Claude Code Limit Last Graduate From Lovable First App Store Submission Survive Your First Traffic Spike Get Found on Google First 100 Users Two AIs, One Project It Broke in Production Hit the Slop Wall? Refactor Without Breaking Everything Vibe Code From Your Phone AI Reverse Engineering Run Several AI Agents at Once Claude Code Guardrails Let AI Review Your AI's Code Make Your Cursor Usage Last Privacy Policy and Terms That Match Your App Install Skills, Plugins and MCP Servers Without Getting Burned Say What You Mean Prompt Injection: Don't Let a Web Page or a Strange File Hijack Your Agent Hit Your Limit Mid-Task? Switch AI Tools Without Losing Your Place Don't Let the AI Delete Your Data: Safe Database Changes Make the AI Teach You While It Builds Bolt Token Saver v0 to Production Claude Code Subagents and Skills for Beginners Logins, Tokens and JWTs in Plain English Put Your Web App on Their Phone Add AI Features in Lovable Is Anyone Using It? Simple Analytics for Vibe Coders Use the Cheap Model for the Easy Stuff: Claude Code Model Mixing Ship Updates Without Breaking the Live App: Preview Links, Checks and One-Click Rollback Try to Break It: Stress-Test Your App Before Strangers Do Fix Your Lovable Security Warnings Without Breaking the Live App What Will My App Cost to Run? A Monthly Bill You Can Predict Leave Claude Code Running Without It Getting Stuck Put Your Lovable App on Autopilot: Automations That Check and Report for You Spec and Tests First: Tell the Agent When It's Done Only Change What I Asked: Stop the AI Rewriting Code You Didn't Mention Stop Getting 429'd: Call Other People's APIs Without Hitting Limits Use the Current Version: Stop the AI Writing Outdated Library Code What Did My Agent Actually Do? Read Your Claude Code Session History Your First Google Play Launch: Get Through the 12-Tester, 14-Day Closed Test Will Anyone Want It? Check Your App Idea Before You Build Claude Code Code Mode: Try It Without Breaking Your Safety Checks Coding With Gemini 4 Neon: Make It Double-Check Its Own Work Understand the App You Already Built: A Guided Tour of Your Own Code Your Guess Might Be Wrong: Make the AI Find the Real Cause Before It Fixes Replit Missions: Give Agents a Goal, a Budget and Approval Rules Make Your Antigravity Quota Last: Pick the Right Gemini Model and Check /usage Turn a Claude Artifact Into a Desktop App, Without Giving It Too Much Access Built It for Work? Make Sure Only Your Team Can Open It Plan Before It Builds: Use GitHub Spec Kit So the Agent Builds the Right Thing Saves That Stick: Fix Data That Disappears Rebuilt Your Site With AI? Make Sure Google Can Still See Every Page Subscriptions and Paywalls: Gate Features by Plan Your AI App Builder Is Shutting Down: Get Your Code, Data and Domain Out Your Own Android App From a Prompt: Build It in Google AI Studio and Put It on Your Phone Backups You Can Actually Restore: Check, Copy and Test Your Supabase Data Accessibility Pass Before You Ship: Make Your App Work With a Keyboard, a Screen Reader and Zoom Update Your Dependencies Without Breaking the App: npm Updates, Audits, Major Upgrades and Dependabot