Created
January 14, 2026 12:17
-
-
Save SeanHeelan/f19e1daab26530b9de8b063fe49340d9 to your computer and use it in GitHub Desktop.
Claude prepare-compact command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cat $HOME/.claude/commands/prepare-compact.md | |
| --- | |
| description: Prepare for context compaction by updating the plan with all necessary information | |
| allowed-tools: [TodoWrite, Read] | |
| --- | |
| # Prepare for Compaction | |
| Your context window is almost full and I need to compact the conversation. Update your plan to ensure: | |
| 1. There is a detailed explanation of your high level task, why it is necessary, and any information you have learned | |
| from the user (or by your own efforts) that help in understanding it | |
| 2. Everything you have done is included and marked as done | |
| 3. Everything in the plan that is ongoing is included and marked as ongoing, along with a brief explanation of what is | |
| done, what remains, and any other useful context | |
| 4. Everything in the plan that has not been started is included and remains marked as a to-do | |
| 5. It is clear what you need to do next, and all the context required to do it is included | |
| DO NOT delete any work items from the plan. Mark their status accordingly and provide any explanation necessary to | |
| understand that status. | |
| Then please ensure the plan contains all the context you require from our conversation in order to complete your work. | |
| Compaction is a destructive operation that may remove all useful information you need from the conversation. If the information you require is in a particular file, then reference that file and mention that it should be loaded, and why. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment