compact in AI

From the Claude Code Slash Commands cheat sheet · Conversation Management · verified Jul 2026

/compact

Compress conversation to reduce token usage

bash
/compact
/compact [focus instructions]
💡 Compresses conversation to save tokens
⚡ Add focus instructions to preserve specific content
🔍 Helpful when approaching context limits
🎯 Reduces costs while keeping important info
compactconversationtokens

Continue with Claude Code Slash Commands

Save the full cheat sheet or work through every related task.

More AI tasks

Back to the full Claude Code Slash Commands cheat sheet