Session Management
/clear - Reset conversation history
- Use case: When context becomes bloated or you need fresh start
- What it preserves: CLAUDE.md files, project configuration
- What it clears: All conversation history, temporary context
- Best practice: Use before starting new major features to avoid token bloat
/compact [focus_instructions] - Intelligent conversation summarization
- Basic usage:
/compact - General summarization
- Advanced usage:
/compact focus on database changes and API modifications
- Token savings: Typically reduces context by 60-80%
- When to use: When approaching token limits or switching context
- Example:
/compact keep only the bug fixes and testing discussions
/cost - Detailed usage analytics
Output includes:
- Current session tokens (input/output breakdown)
- Total cost in USD (updated rates)
- Model usage distribution (Sonnet-4 vs Opus-4)
- Average cost per conversation
- Monthly spending trends
Configuration & Setup