Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

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.

UtilitiesBeginner13411AI score 5/10Last updated: Aug 12, 2026

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-compact plugin 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-compact plugin
  • 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

  1. You type /magic-compact 5, nothing gets compacted, and Claude tells you to check the plugin — you instantly know it isn't enabled
  2. After a plugin update breaks hook registration, you get an explicit warning instead of a silent no-op
  3. 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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download 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.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/aerovato/magic-compact.git
  3. Copy the skill folder: cp -r magic-compact/packages/claude-code-plugin/skills/magic-compact ~/.claude/skills/magic-compact
  4. Important: this skill alone compacts nothing. Install and enable the actual plugin from packages/claude-code-plugin (claude-magic-compact).
  5. Restart Claude Code and run /magic-compact 3 to verify the hook performs real compaction.
  6. If you instead get the "check the plugin" message, revisit step 4 and confirm the plugin is enabled.
View source on GitHubLicense: BSD-3-Clause