Skip to content
Hooks
Hook

Hooks

What prompt-improver runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
prompt-improver
2k1 skill3 hooks

Claude Code

$ npx -y skills add severity1/claude-code-prompt-improver --agent claude-code

What fires, and when

UserPromptSubmit

Fires before Claude sees each prompt you send. A plugin can use it to inject context, so the same instruction reaches the model every turn instead of only at session start.

  • python3 "${CLAUDE_PLUGIN_ROOT}/scripts/engine.py" UserPromptSubmit || python "${CLAUDE_PLUGIN_ROOT}/scripts/engine.py" UserPromptSubmit

PreToolUse

  • MatchesEnterPlanMode|Bashpython3 "${CLAUDE_PLUGIN_ROOT}/scripts/engine.py" PreToolUse || python "${CLAUDE_PLUGIN_ROOT}/scripts/engine.py" PreToolUse

SubagentStart

  • python3 "${CLAUDE_PLUGIN_ROOT}/scripts/engine.py" SubagentStart || python "${CLAUDE_PLUGIN_ROOT}/scripts/engine.py" SubagentStart
Read hooks/hooks.json

In the plugin's words

How prompt-improver describes its own hook set.

Declarative hook engine: runs the nudge rules for UserPromptSubmit, PreToolUse (plan-mode entry and Bash commands), and SubagentStart
@severity1
Ships withprompt-improver

Intelligent prompt optimization for Claude Code. It injects the right context at the right moment - at prompt submit, tool use, and subagent start - so Claude has what it needs before it acts.

Stars on GitHub

Momentum

stars in total
2.0k
Star history of severity1/claude-code-prompt-improver on GitHub, a chart by star-history.com

More plugins that ship hooks.

stop-that-shit

stop-that-shit

Hooks and skills that stop an AI coding agent from adding unrequested hashes, checksums, or extra scope to a task. Built for Codex and GPT workflows across several platforms.

2 skills8 hooks3.4k
@lennney@lennney
Install Plugin
probity

probity

Probity forces AI coding agents to follow your rules. It hooks into your agent and checks every file write and shell command before it happens. When an action breaks a rule, Probity blocks it and tells the agent why.

1 hook241
@nizos@nizos
Install Plugin
token-saver

token-saver

Keep the signal. Stop rereading the same failures. Token-Saver compresses the terminal output your AI coding assistant reads, git diff, pytest, npm install, terraform plan, kubectl, docker, to leave more room for the code, instructions, and next decision.

1 skill+2162
@ppgranger@ppgranger
Install Plugin

Questions about the hooks in prompt-improver.

Which coding agents can use the hooks in prompt-improver?
The hooks in prompt-improver install in Claude Code and Cursor: each runs Claude Code hooks from .claude/settings.json, so copy the hooks there.