whereismyai
Prompt Refiner
Prompt Refiner is a Claude Code hook that refines rough prompts into precise paragraphs using a fresh headless Claude instance.
Prompt Refiner is a Claude Code hook that intercepts rough prompts starting with ++ and sends them to a fresh headless Claude instance alongside a session transcript extract. The headless Claude generates a single refined paragraph which is copied to your system clipboard while blocking the original prompt. The main agent never sees your rough prompt or the intermediate reasoning process. It features two operational modes, allowing you to either review the refined prompt from your clipboard before sending or have it automatically refined and executed. The tool requires Claude Code 2.1 or later, jq, perl, and a compatible clipboard tool such as pbcopy, wl-copy, or xclip.
Prompt Refiner at a glance
Key features
- Catches prompts starting with ++ via a UserPromptSubmit hook
- Sends session transcript extracts and rough prompts to a headless Claude
- Copies the refined paragraph to the system clipboard
- Blocks the original prompt from the main agent
- Supports auto-execution mode via the ++. prefix
- Allows customization of the refiner instructions using markdown
- Writes operational logs and debug files to a state directory
Use it for
- Refining rough instructions into precise prompts with file anchors and constraints
- Generating exact error and test details from session transcripts automatically
- Bypassing the main agent's existing context to rethink a task
- Passing prompts across different languages while retaining original intent
Companions
Tools that articles about Prompt Refiner recommend using with it, each with its job.
- Claude Code — Built to work with Claude Code.
- Claude — Built to work with Claude.
- Context7 — Provides up-to-date documentation for AI agents and code editors.
- Playwright MCP — Enables LLMs to interact with web pages using structured accessibility snapshots.
- GitHub MCP Server — Reads pull requests, issues and code search on GitHub.
- Superpowers — Brainstorm, plan and execute skills for bigger tasks.
Alternatives to Prompt Refiner
- Claude Code Paste Preview — Shows thumbnails and opens an editor on paste to mark up images before sending.
- Grim Prompter — It guides AI coding agents to produce evidence-traced threat models for repositories.
- Oh My ClaudeCode — Orchestrates parallel Claude, Gemini, and Codex CLI workers.
- Claude Code mods — Add live lines above the prompt, command guards, panes, and games to Claude Code.
- Claude Terse — Cuts reply length in half and removes mannered prose.
- Ralph for Claude Code — Enables continuous coding cycles with built-in API safeguards and rate limiting.
- PromptForce — Cuts token waste and provides relevant codebase context for AI coding agents.
- Effortless — It selects the reasoning effort for every prompt and lowers costs.
- claudecode.nvim — Adds native AI coding assistant functionality to Neovim.
- Claude Context — It reduces token costs and provides deep context for large codebases.
- Codebase Guide — It generates accurate documentation with diagrams directly from the source code.
- Codex Plugin for Claude Code — Delegate tasks and run code reviews with Codex directly inside Claude Code.
All Prompt Refiner alternatives