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.
By kylesnowschwartzv1.0.0MIT
Lets a slash command run your script without spending an API turn: a UserPromptSubmit hook intercepts the prompt and blocks it, so Claude never sees it. The hook runs on every prompt you send, and the demo is a template for side-effect commands like clipboard copy.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A Claude Code plugin that demonstrates hook-intercepted commands — slash commands that run code without consuming an API turn.

Normal slash commands send their content to Claude as a prompt. This pattern short-circuits that: a UserPromptSubmit hook intercepts the prompt, runs your code, and blocks the API call. Claude never sees it.
Three pieces:
commands/prompt-intercept-pattern.md) — registers the command in /help with autocomplete. disable-model-invocation: true prevents programmatic invocation. The file body is never sent to Claude.hooks/hooks.json) — wires UserPromptSubmit to the bash script.hooks/user_prompt_submit.sh) — matches the command, does work, outputs {"decision":"block","reason":"message for user"}.prompt-intercept-pattern/
├── .claude-plugin/
│ └── plugin.json
├── commands/
│ └── prompt-intercept-pattern.md # stub for /help
└── hooks/
├── hooks.json # wires the hook
└── user_prompt_submit.sh # does the work
claude --plugin-dir /path/to/prompt-intercept-pattern
Then type /prompt-intercept-pattern hello world. You'll see "Echoed: hello world" with no API call.
Open hooks/user_prompt_submit.sh and find the Side effects section. Replace the echo logic with your own: clipboard copy, file writes, notifications, whatever. The message variable is displayed to the user.
To rename the command, update three places:
name: field in commands/case match in user_prompt_submit.shargs parameter strip in user_prompt_submit.shAny command where the work is a side effect and sending a prompt to Claude is waste:
jq for JSON handlingMIT
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Generated from the plugin's indexed repository (kylesnowschwartz/prompt-intercept-pattern) — no native marketplace selected
npx claudepluginhub p/kylesnowschwartz-prompt-intercept-patternPlugins from other owners that cover similar ground