# Capture what to remember for next time

At the end of a session, have Claude Code summarize the work and propose short CLAUDE.md lines, each with a reason, before anything is edited.

Paste into: **Claude Code**, started in your project folder

## Prompt template

How the builder on the page fills in this template, so you can do the same:

- `{{key}}` becomes the text entered for that field, exactly as typed. Empty text, or text that is only whitespace (spaces, tabs or line breaks), counts as empty: a required field then becomes `[fill in: <label>]` with its label, and an optional field becomes nothing.
- For a choice field, `{{key}}` becomes the text of the chosen option, or of the default when none is chosen.
- Text between `{{#key}}` and `{{/key}}` stays only when that field is not empty; a choice field always counts as filled. The markers themselves are removed, and a marker that stands alone on its line takes its line break with it.
- Each value is inserted once, as it is: `{{…}}` inside a value stays as typed.

```text
We have been working on {{focus}}. Summarize what we did this session and suggest what to add to {{target}}.

Summary: a few bullets on what changed, what we decided and why, and anything left unfinished.

Suggestions: only things a future session would otherwise have to rediscover or be told again, such as commands that are not obvious, conventions that differ from the defaults, gotchas we hit, or corrections I had to give more than once. For each one, give:
- the exact line to add, short and concrete enough to check
- the section it belongs in
- one line on what happened this session that justifies it

Leave out anything you could work out by reading the code, anything likely to change soon, and details that only mattered for this task. Read the current file first and do not suggest duplicates. Point out any existing line that is now wrong or conflicts with what we learned. If a suggestion is really a multi-step procedure, say it fits better in a skill. If you are unsure whether something holds in general or only held this time, say so.

Do not edit any file yet. I will tell you which suggestions to apply.
```

## Fields

- `{{focus}}` (required): What the session was about.
- `{{target}}`: Which file to suggest for. Choose one:
  - the project CLAUDE.md, which the team shares (default)
  - CLAUDE.local.md, my personal notes for this project
  - ~/.claude/CLAUDE.md, my preferences for all projects

This site doesn't run Claude or show model output. Results depend on your input and the model you use.

## When to use this template

- You are wrapping up a session in which Claude Code had to discover something about the project, such as a non-obvious test command or a convention it got wrong at first.
- You noticed yourself correcting Claude in the same way you did in an earlier session, and want the correction written down once.
- A teammate will continue the work, and you want the useful context in the shared project file rather than in your head.

## When not to use it

- The session was short and routine, with nothing Claude had to figure out. Adding lines anyway makes CLAUDE.md longer without making it more useful.
- You only want Claude to remember a personal preference. With auto memory turned on, asking Claude to remember it saves it there, with no CLAUDE.md edit.
- The rule must hold every single time, such as never editing a protected file. CLAUDE.md is context, not enforcement; use a hook for that.

## Why this structure

- The focus field reminds Claude what the session was for, so the summary and suggestions stay on that work even after a long, wandering session.
- The target choice matches where CLAUDE.md files live: the project file is shared through the repository, CLAUDE.local.md is personal for one project, and ~/.claude/CLAUDE.md applies to all your projects.
- Each suggestion must come with the session event that justifies it, which filters out generic advice and lets you judge every line quickly.
- Telling Claude to leave out what it can read from the code and to check for duplicates and conflicts helps keep the file short and consistent.
- The final rule makes this a proposal. Nothing changes until you pick the lines, so the file only grows with entries you agree with.

## Example input (fictional)

What the session was about:

```
adding rate limiting to the public API
```

Which file to suggest for:

```
the project CLAUDE.md, which the team shares
```

## Follow-ups to send Claude

- Apply suggestions 1, 3 and 4, and show me the diff of the file.
- Turn the multi-step procedure you mentioned into a project skill instead of a CLAUDE.md entry.
- Read the whole CLAUDE.md and suggest lines to remove because they are outdated or Claude already follows them without being told.

## Common mistakes

- Accepting every suggestion. A long CLAUDE.md costs context in every session and important rules get lost; keep only lines that would change what Claude does.
- Adding vague lines such as "write clean code". Prefer concrete ones, such as the exact command to run before committing.
- Running this after the session has been cleared or compacted. Ask while the details are still in the conversation.

## Related templates

- [Turn a repeated task into a skill](https://awesomeclaudeprompts.com/prompts/turn-task-into-skill/): Describe a workflow you repeat and have Claude Code save it as a skill, so you or your team can run it later as a slash command.
- [Add a hook for repeat behavior](https://awesomeclaudeprompts.com/prompts/add-claude-code-hook/): Describe an action and when it should run; Claude Code writes the hook into your settings, tries it once and shows you how to check or remove it.
- [Turn meeting notes into action items](https://awesomeclaudeprompts.com/prompts/meeting-notes-to-action-items/): Turn rough meeting notes into a clear list of action items with owners and due dates, plus decisions made and questions left open.

## Sources

- [Claude Code docs: Prompt library](https://code.claude.com/docs/en/prompt-library) (Anthropic documentation)
- [Claude Code docs: How Claude remembers your project](https://code.claude.com/docs/en/memory) (Anthropic documentation)
- [Claude Code docs: Write effective instructions](https://code.claude.com/docs/en/memory#write-effective-instructions) (Anthropic documentation)
- [Claude Code best practices: Avoid common failure patterns](https://code.claude.com/docs/en/best-practices#avoid-common-failure-patterns) (Anthropic documentation)

---

Awesome Claude Prompts is an independent project. It is not affiliated with, endorsed by, or sponsored by Anthropic. Claude is a trademark of Anthropic, PBC.
