Hook-based prompt enrichment for Claude Code, automatically asks 1-6 clarifying questions for vague requests before execution, achieving 31% token reduction.
Before you start
Claude Code 2.0.22+ installed. The tool installs as a hook. Verify hook support with claude --version.
Prompt Improver works as a PostToolUse hook. Add it to your Claude Code settings.json hooks section. After installation, restart Claude Code, every subsequent request will pass through the clarity evaluator before execution.
Write a deliberately vague task, something like 'clean up the auth module.' The hook should intercept it and ask 1-6 clarifying questions before proceeding. If it passes through without questions, check that the hook path is correct in settings.json.
Three prefixes bypass the clarity evaluator: * (star), / (slash), # (hash). Prefix your request with any of these to skip the clarifying questions and execute immediately. Use these for commands where you know exactly what you want and the evaluation overhead is unnecessary.
The hook logs clarity evaluations and bypass decisions. After a week of use, review the log to see which request types consistently needed clarification: these are your highest-leverage areas for writing better briefs upfront.