
Plan Guard
- Updated April 7, 2026
- clemux/claude-code-plugins
plan-guard asks for confirmation when the agent enters plan mode while using a non-Opus model. It is a safety hook that prevents accidentally planning complex work on a weaker model. Developers add it to keep planning quality high in Claude Code. Content is brief, so this classification is best-effort.
Key points
- Confirms plan mode
- Flags non-Opus models
- Safety guard hook
Plan Guard by the numbers
- Data as of Jul 7, 2026 (Skillselion catalog sync)
/plugin marketplace add clemux/claude-code-plugins/plugin install plan-guard@clemux-claude-code-pluginsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Last updated | April 7, 2026 |
|---|---|
| Repository | clemux/claude-code-plugins ↗ |
What it does
Prompts for confirmation when an agent enters plan mode while running on a non-Opus model, guarding against weak planning.
README.md
plan-guard
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.
How it works
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 |
Limitations
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:
- Agent calls
EnterPlanMode— hooks fire reliably. This is the main case (agent autonomously decides to plan). - Agent explicitly calls
Write+ExitPlanMode— both hooks fire. Plan files get the warning header, and the agent is told to warn the user. - Built-in plan approval UI ("Ready to code?") — hooks are bypassed. When Claude Code uses its internal plan finalization flow, neither
ExitPlanModenorWritego through hookable tool calls. /plancommand — enters plan mode immediately without triggering hooks. The subsequent prompt submission is not intercepted.shift+tabtoggle — 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.
Installation
claude --plugin-dir ~/dev/cc-plugins/plan-guard
Dependencies
jq— JSON parsing in hook scriptsgrep -P— PCRE support for model name extraction