Magic Compact (fallback shim)
A fallback shim that warns you to check the claude-magic-compact plugin when the /magic-compact hook fails to intercept the command.
What it does
This skill is a shim for the claude-magic-compact plugin. Normally the /magic-compact [N] command is intercepted by a plugin hook that compacts your session context. If this skill's body ever reaches Claude, it means the hook did not fire.
- Detects the failed-hook situation
- Alerts the user immediately instead of failing silently
- Suggests verifying that the
claude-magic-compactplugin is installed and enabled - Contains no compaction logic itself (model auto-invocation is disabled)
Who it's for
- Claude Code users who run or plan to run the
claude-magic-compactplugin - People with long sessions who compact context often and need fast failure signals
- Developers who want a reference pattern for handling plugin failure paths
Examples
- You type
/magic-compact 5, nothing gets compacted, and Claude tells you to check the plugin — you instantly know it isn't enabled - After a plugin update breaks hook registration, you get an explicit warning instead of a silent no-op
- When rolling the plugin out to a team, members who skipped installation get a clear instruction rather than confusion
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/aerovato/magic-compact/HEAD/packages/claude-code-plugin/skills/magic-compact/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the packages/claude-code-plugin/skills/magic-compact folder from the GitHub repo aerovato/magic-compact into my ~/.claude/skills/magic-compact/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/aerovato/magic-compact.git && cp -r magic-compact/packages/claude-code-plugin/skills/magic-compact ~/.claude/skills/magic-compact⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/aerovato/magic-compact.git - Copy the skill folder:
cp -r magic-compact/packages/claude-code-plugin/skills/magic-compact ~/.claude/skills/magic-compact - Important: this skill alone compacts nothing. Install and enable the actual plugin from
packages/claude-code-plugin(claude-magic-compact). - Restart Claude Code and run
/magic-compact 3to verify the hook performs real compaction. - If you instead get the "check the plugin" message, revisit step 4 and confirm the plugin is enabled.