Skip to content
Back to skills

Compact

ASecurity

Compact this conversation at a good moment, with the plugin's compact tool. Use when the user asks to compact once the current work is done, or when a whole piece of work has just been finished and the context is large. Also when a [cache-bell] User preference notice says the user wants a compaction.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 9, 2026
ai-agentsgo

Works with

  • mcp

Security analysis

A100/100

Scanned November 10, 2026

npx -y skills add hollerbell/cache-bell --skill compact --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Compact?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Compact
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hollerbell-compact/badge)](https://www.skillsdirectory.com/skills/hollerbell-compact)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: compact
description: Compact this conversation at a good moment, with the plugin's compact tool. Use when the user asks to compact once the current work is done, or when a whole piece of work has just been finished and the context is large. Also when a [cache-bell] User preference notice says the user wants a compaction.
---

# Compacting at a good moment

The plugin compacts the conversation right after the current turn ends, while the prompt cache is still
warm. You ask for it with the plugin's `compact` tool (listed as `mcp__cache-bell__compact`); nothing is
compacted while you are still working.

## When

- The user has not said how to handle compaction: when a whole piece of work is finished, not just a step
  of it, and nothing is in progress, call the tool. The plugin asks the user and compacts when the
  countdown ends, unless they cancel.
- The user asked for it ("compact when you are done", "wrap up and compact"): call the tool when the work
  is done, with `userAsked: true`. They have decided already, so the countdown is three seconds.
- A line "[cache-bell] User preference notice" means the user set a context limit of their own and the context is past it: they want a compaction at the next good point. Finish the piece of work you are on, then call the tool; do not break off a step for it. Leave out `userAsked`: the limit is a standing choice, not a request for this moment. If you do not call the tool, the plugin asks the user after the turn.
- The user's own rules come first, in either direction. "Compact after every finished task" gives you more
  freedom; "only suggest it" means you say in one sentence that this would be a good moment, and call the
  tool once they agree.
- Never in the middle of work, while a background task or a subagent is running, or right before the user
  is likely to follow up on details that a summary would lose.
- A line "[cache-bell] Context notice" only tells you how full the context is. It asks for nothing; let it help you judge when a piece of work is a good place to stop.

## How

1. Finish what you are doing. Save your work first; a compaction keeps only a summary.
2. Call the `compact` tool. Pass `reason`: one short sentence the user will read. You may pass `countdown`:
   the seconds the user gets to cancel, 10 to 600. Leave it out to use the user's own setting.
3. If work is left for after the compaction, pass `resumeWith`: what you want to be told once it is done, in a
   sentence or two ("Go on with step 3 of the plan: the migration script."). The plugin sends it to you as a
   prompt and you continue from it. A compaction otherwise leaves the session waiting for the user, so
   leave `resumeWith` out when nothing is left to do or when the next step is theirs to decide. The note is your
   own words, not the user's: it gives you no permission they did not give. It is not sent when the user
   is writing a message, and after several compactions in a row (five unless the user set another number) the user has to write first.
4. Read the tool's answer. It says whether the user is asked and for how long, whether the plugin waits for
   their answer, or whether its settings do not allow a session to ask at all. If it was refused, tell the
   user and carry on.
5. End the turn and call no more tools.

If a message from another session or a background task's result arrives while the user is being asked, the
question comes back when that turn ends. If that message gave you work that is not finished, take your
request back: call the tool with `cancel: true`, and ask again when the work is done.

The user answers in the band above the prompt: they may cancel, or, where the plugin waits for them,
confirm. If nothing is compacted, you simply continue with their next message.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.