From Canary Compact
Use when configuring, testing, or explaining canary-triggered session compaction behavior.
How this skill is triggered — by the user, by Claude, or both
Slash command
/canary-compact:canary-compact [setup [canary-word] [files...]][setup [canary-word] [files...]]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use the canary word to request compaction from an assistant reply.
Use the canary word to request compaction from an assistant reply.
Default canary word:
CANARY_COMPACT
When working in Claude Code, this plugin's Stop hook checks the final assistant reply. If the reply contains the canary word, the hook keeps the conversation alive and asks Claude to produce a compact-ready handoff plus the exact /compact command the user should submit.
Important limitation: current Claude Code hooks can inspect replies and continue the conversation, but they do not expose a hook action that directly invokes /compact. In Codex, this plugin exposes the shared skill and helper source, but this environment's Codex plugin manifest does not accept hook wiring.
Configuration:
CANARY_COMPACT_WORD: override the canary word.CANARY_COMPACT_CASE_SENSITIVE=false: make matching case-insensitive.CANARY_COMPACT_WHOLE_WORD=true: require token-boundary matching.To test the detector manually, build the release binaries and pipe a Stop-hook-shaped JSON payload to bin/canary-compact-hook.
When the user asks to install, configure, or update the project-level canary instruction, read references/setup.md and run the bundled setup script from the current project root.
If the skill invocation begins with setup, treat setup as a subcommand and pass only the remaining arguments to scripts/setup-canary-instructions.sh. Do not pass the literal word setup as the canary word.
Common invocations:
/canary-compact:canary-compact setup
/canary-compact:canary-compact setup CUSTOM_CANARY_WORD
/canary-compact:canary-compact setup CUSTOM_CANARY_WORD CLAUDE.md AGENTS.md docs/agents.md
npx claudepluginhub welldundun/canary-compact --plugin canary-compactCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.