Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Run automatically on Claude Code events. Claude doesn't decide.
1 caution to review before installing
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Status: Abandoned experiment. This plugin was an attempt to warn users when entering plan mode with a non-Opus model. Due to Claude Code's plan mode being largely handled through internal UI flows (not hookable tool calls), the interception is unreliable — most plan mode entries and finalizations bypass the plugin entirely.
A simpler alternative: configure the status line to display the current model. This makes it easy to glance at the model before planning, without needing a hook. Example status line config in
~/.claude/settings.json:"statusLine": { "type": "command", "command": "echo $input | jq -r '.model.display_name // .model.id'" }
Asks for confirmation when entering plan mode with a non-Opus model. Planning works best with Opus — this plugin helps prevent accidentally generating plans with less capable models.
The plugin uses a combination of hooks to detect and warn about non-Opus plan mode usage:
| Hook | Event | What it does |
|---|---|---|
save-model.sh | SessionStart | Captures the current model and saves it to a temp file |
check-plan-model.sh | PreToolUse on EnterPlanMode | Asks for confirmation if the model isn't Opus |
check-plan-model.sh | PreToolUse on ExitPlanMode | Warns that the plan was generated by a non-Opus model |
tag-plan-file.sh | PostToolUse on Write | Prepends a warning header to plan files in ~/.claude/plans/ |
cleanup.sh | SessionEnd | Removes the temp file |
The plugin provides best-effort protection, not guaranteed interception. Claude Code's plan mode can be entered and finalized through multiple paths, not all of which are hookable:
EnterPlanMode — hooks fire reliably. This is the main case (agent autonomously decides to plan).Write + ExitPlanMode — both hooks fire. Plan files get the warning header, and the agent is told to warn the user.ExitPlanMode nor Write go through hookable tool calls./plan command — enters plan mode immediately without triggering hooks. The subsequent prompt submission is not intercepted.shift+tab toggle — a UI-level toggle that doesn't fire any hooks.In practice, the plugin is most effective when the agent initiates plan mode on its own (which is the case most likely to catch you off guard). User-initiated plan mode (/plan, shift+tab) is harder to intercept because it bypasses the tool call layer.
claude --plugin-dir ~/dev/cc-plugins/plan-guard
jq — JSON parsing in hook scriptsgrep -P — PCRE support for model name extractionBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub clemux/claude-code-plugins --plugin plan-guardPlugins from other owners that cover similar ground