add-compact - Add /compact command for manual context compaction
Adds a /compact session command that compacts conversation history to fight context rot in long-running sessions using the Claude Agent SDK's built-in slash command.
Tags
Updated: 2026-03-23Capabilities
Typical Inputs
What this skill does
- add session command
- intercept session commands
- authorize session commands
- compact conversation history
- archive conversation history
- forward session ID
- verify admin access
Inputs
- Claude Agent SDK
- git repository
- main group access
- admin permission
- session ID
Outputs
- /compact session command
- compacted conversation
- conversation archive file
- new session ID
- admin denial message
Requirements
- Claude Agent SDK with slash command support
- Node.js runtime
- git access
- group messaging interface
- main group or admin sender
