Use when the user submits a prompt that could benefit from grammar correction, clarity improvement, or better structure for LLM comprehension. Triggers on vague, run-on, ambiguous, or poorly structured requests.
Rewrite the user's raw input into a clear, well-structured prompt that preserves their intent while maximizing Claude's ability to deliver the right result.
Read the raw prompt and extract:
| Element | Description | Example |
|---|---|---|
| Context | Set the scene — who, what, where | "In this Next.js 14 project..." |
| Lead action | Single clear verb for the primary task | "Refactor the authentication middleware to..." |
| Expectations | Define output format and quality | "Return the updated file with inline comments explaining changes" |
| Assumptions | State what you're assuming so Claude can correct | "Assuming we want to keep backward compatibility..." |
| Restraints | Boundaries — what NOT to do, limits | "Do not modify the database schema or existing tests" |
getData() to fetchUserProfile()"Output the polished prompt in a clearly marked block:
**Polished prompt:**
[The rewritten prompt here]
Then briefly note what changed:
| Raw Pattern | Polished Pattern |
|---|---|
| "fix the bug" | "Debug and fix [specific symptom] in [file/component]. The expected behavior is [X] but currently [Y] happens." |
| "make it look better" | "Improve the visual design of [component]: [specific issues like spacing, alignment, color contrast]." |
| "add a feature" | "Implement [feature name] that [does what] in [where]. Requirements: [1, 2, 3]. Constraints: [limits]." |
| "it doesn't work" | "Diagnose why [specific action] produces [error/wrong result] instead of [expected result]. Relevant files: [paths]." |
| "clean up the code" | "Refactor [file/module] to [specific goal: reduce duplication / improve readability / extract shared logic]. Do not change external behavior." |
| "help me with X" | "[Specific action verb] X. Context: [relevant details]. Output: [desired format]." |
Raw user input:
can you like change the homepage so it looks more professional and also maybe add some animations and fix the mobile thing where the nav is broken
Polished prompt:
Improve the homepage (
src/pages/index.tsx) with three changes:
- Professional styling — Update typography, spacing, and color palette to match a modern SaaS landing page aesthetic
- Animations — Add subtle entrance animations (fade-in, slide-up) to hero section and feature cards using CSS transitions or Framer Motion
- Fix mobile navigation — Debug and fix the broken nav menu on mobile viewport (hamburger menu not opening or links not visible)
Prioritize the mobile nav fix first since it's a bug. For styling changes, keep existing content and layout structure intact.
What changed: Broke compound request into numbered priorities, specified files and technologies, clarified "mobile thing" into actionable bug description, set implementation order.
| Mistake | Fix |
|---|---|
| Over-polishing casual requests | If intent is obvious, light touch only — fix grammar, keep it short |
| Adding assumptions the user didn't imply | Only surface assumptions when the original is genuinely ambiguous |
| Making the prompt longer than necessary | Concise > comprehensive. Remove anything that doesn't add clarity |
| Changing the user's actual intent | Preserve what they want. Clarify HOW they said it, not WHAT they asked for |
| Being overly formal | Match the user's tone. Technical users want direct prompts, not essays |