setup

setup is a command for Claude Code from msshives-gif/claude-plugins. It costs 13 tokens per session (874 once invoked), scanned B, original, MIT.

A first-run setup command for compact-manager, a tool that monitors and manages context usage in coding-agent sessions.

In plain words
What is it for?
Use it to choose a compact-manager mode and learn the related commands.
Why use it?
It explains the available operating modes and helps configure the tool before use.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the compact-manager plugin — 5 commands, 5 hooks shipped together

Good fit Use it to choose a compact-manager mode and learn the related commands.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add msshives-gif/claude-plugins
Claude Code
/plugin install compact-manager

Made for: Claude Code.

Or install compact-manager, the plugin that ships this one along with the rest of its 5 commands, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/msshives-gif/claude-plugins/setup/github.svg)](https://agentmods.dev/commands/msshives-gif/claude-plugins/setup)
Your own site
<a href="https://agentmods.dev/commands/msshives-gif/claude-plugins/setup"><img src="https://agentmods.dev/badge/commands/msshives-gif/claude-plugins/setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for setup

Your own site · 80×15
<a href="https://agentmods.dev/commands/msshives-gif/claude-plugins/setup"><img src="https://agentmods.dev/badge/commands/msshives-gif/claude-plugins/setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 874 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00013 $0.00874
Opus 5.5 $0.00005 $0.00350
Sonnet 5.5 $0.00003 $0.00175
Haiku 4.5 $0.00001 $0.00087

Measured 1mo ago against content hash 190fb4c23549, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

setup scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

itself: `find ~/.claude/plugins -maxdepth 8 -type f -name
plugins/compact-manager/commands/setup.md · 65 lines

What it actually says

Walk the user through turning compact-manager on. Be brief — this is two decisions, not a tutorial.

  1. Locate the compact-manager CLI. The path in the later steps normally reads as an absolute path (script installs write it in). If it instead still says ${CLAUDE_PLUGIN_ROOT} literally — plugin installs may not substitute command markdown — find the CLI file itself: find ~/.claude/plugins -maxdepth 8 -type f -name compact-manager -path "*/bin/*" 2>/dev/null (this handles versioned cache layouts, where a directory merely NAMED compact-manager has no bin/). If several paths match, use the most recently modified (ls -t).
  2. Read the current state: ~/.claude/compact-manager.json (may not exist; mode defaults to off), "${CLAUDE_PLUGIN_ROOT}/bin/compact-manager" overview, and env | grep '^COMPACT_MANAGER_' — environment variables OVERRIDE the file, so if any are set, warn the user that editing the file alone may not change effective behavior in sessions carrying those variables. If a mode is already set, say so and ask whether the user wants to change it before continuing.
  3. Explain the choice in about three sentences, then ask which mode they want:
    • advisory — pure hooks, any platform, zero risk: the model is warned crossing 70% of the context window (and again, firmer, at 80% — whichever thresholds are crossed) so it can save its working state, and after any compaction the saved state is injected back so the session resumes oriented. The user still runs /compact themselves.
    • managed — advisory plus a per-session watcher that types /compact into the session's tmux pane at a verified-idle moment. Linux/WSL + tmux only; each session must be attached explicitly.
    • (off stays available — everything inert.)
  4. Ask one follow-up: do they run models with a context window other than 1M? The default context_window is 1,000,000 (the Claude 5 standard); smaller/legacy models need a models override, e.g. {"haiku": {"context_window": 200000}} (substring match, longest wins). Getting this wrong is asymmetric: too small warns — and in managed mode compacts — far too early; too large just means advisories never fire.
  5. If the user is switching AWAY from managed (to advisory or off): running watchers snapshot their config at spawn and will keep typing /compact regardless of the file change. Check overview for live watchers and stop each one ("${CLAUDE_PLUGIN_ROOT}/bin/compact-manager" stop <session-id>, with the user confirming the list) — or tell the user explicitly that existing watchers stay active until stopped or their session ends.
  6. Write ~/.claude/compact-manager.json with the chosen mode (and any overrides). If the file exists, MERGE — show the user the exact final JSON before writing, and never drop keys they already set. The hooks re-read the file each time, so it takes effect immediately.
  7. Close with the command map, one line each: managed sessions attach with the attach command (/compact-manager:attach or /compact-manager-attach); …status shows mode, watchers, and per-session usage (or run bin/compact-manager overview directly — no model turn); …detach stops this session's watcher. If they chose managed and this session is in tmux ($TMUX_PANE non-empty), offer to attach right now.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 65 lines · 13 tokens per session scan B 190fb4c23549

Subscribe to this mod's changes

setup is a command published in the GitHub repository msshives-gif/claude-plugins (2 stars, last pushed 7d ago), licensed MIT. It adds 13 tokens to every session and 874 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.