promptgarten 🌱

Command reference Β· Claude Code

/compact

Summarizes the conversation so far to free up context.

Summarizes the conversation so far to free up space in the context window. Optionally you pass a focus instruction as an argument, for example /compact focus on open TODOs and next steps β€” the summary then specifically keeps what you specify, instead of what the automatic pass considers important. Project CLAUDE.md and auto-memory are then automatically reloaded from disk; path-bound rules and nested CLAUDE.md files in subfolders, on the other hand, are lost until the corresponding file is read again. Invoked skill content is also reloaded, but capped at 5,000 tokens per skill and 25,000 tokens in total.

🎬 AS A SHORT VIDEO

Summarizes the conversation so far to free up context.

πŸ”„ THE SAME TASK (β€œCOMPACT CONTEXT”) ON OTHER PLATFORMS

Compare all 28 tasks β†’

βœ… WHEN TO USE IT?

Free up context while continuing work on the same topic

/compact

Steer the summary specifically

/compact focus on open TODOs and next steps

β›” WHEN NOT TO?

Complete change of topic

/compact summarizes the conversation so far and keeps the thread; for a complete change of topic, this drags along unnecessary baggage according to the docs β€” the docs explicitly name /clear as the way for unrelated new work.

Better: /clear

SOURCES

MORE COMMANDS Β· Claude Code

/config/context/copy/cost/dataviz/debug/deep-research/design-login/design-sync/desktop/diff/doctor

All commands Β· Claude Code β†’

Share:𝕏inπŸ’¬