feat(plugins): add /planwith command for inline plan mode prompts #18217
+101
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Currently,
/planonly toggles plan mode on/off—it doesn't accept inline arguments. Users who want to plan a specific task must:/planto enable plan modeThis two-step workflow adds friction, especially for power users who already know what they want to plan.
Solution
Since
/planis a built-in CLI command that can't be modified directly, this PR adds a/planwithplugin command that demonstrates the desired functionality. The command combines both steps into one:/plan→ wait → type prompt/planwith <prompt>/plan/plan(unchanged)Example:
This immediately enters plan mode and begins planning the task.
Implementation
The command uses
allowed-tools: EnterPlanModein its frontmatter to call theEnterPlanModetool, which activates real plan mode—identical to/plan.Files Added
plugins/planwith/.claude-plugin/plugin.json- Plugin metadataplugins/planwith/commands/planwith.md- Command definitionplugins/planwith/README.md- Documentationplugins/README.md- Added planwith to plugin tableTesting
Tested locally: