Discover and explore top open-source AI tools and projects—updated daily.
severity1Intelligent prompt enhancer for Claude Code
Top 38.7% on SourcePulse
This project provides an intelligent prompt improvement hook for Claude Code, designed to enrich vague user prompts before execution. It targets Claude Code users seeking to enhance output precision and reduce iterative clarification, ultimately improving first-try results.
How It Works
The core mechanism involves a UserPromptSubmit hook that intercepts user prompts. It wraps these prompts with evaluation instructions, prompting Claude to assess clarity against conversation history. For ambiguous inputs, Claude initiates a dynamic research plan, gathering context from the codebase, web, or documentation. Subsequently, it formulates 1-6 targeted, grounded questions using the AskUserQuestion tool for the user. Upon receiving answers, Claude proceeds with the original request, now armed with enhanced context. Clear prompts bypass this clarification process entirely. This approach leverages conversation history and dynamic planning for efficient, context-aware prompt refinement.
Quick Start & Requirements
scripts/improve-prompt.py to ~/.claude/hooks/ and ensure it's executable. Update ~/.claude/settings.json to include the hook under UserPromptSubmit.AskUserQuestion tool).Highlighted Details
AskUserQuestion tool to ask a maximum of 1-6 clarifying questions.*, /, #) for direct prompt execution without evaluation.Maintenance & Community
No specific details regarding maintainers, community channels (e.g., Discord, Slack), or roadmap are present in the provided README.
Licensing & Compatibility
UserPromptSubmit hooks from plugins from executing, mandating manual installation.Limitations & Caveats
Manual installation is the sole method due to a bug affecting plugin hooks. Users must remember to use bypass prefixes (*, /, #) if they wish to skip the prompt improvement process. The functionality is dependent on Claude Code version 2.0.22+ and its AskUserQuestion tool.
2 weeks ago
Inactive