Prompt Improver
Overview
A skill that analyzes and improves prompts based on general LLM/agent best practices. It focuses on verifiability, clear scope, explicit constraints, and context economy so the agent can execute with minimal back-and-forth.
If you are running in Claude Code, also read references/claude.md and apply the additional Claude-specific techniques.
If you are running in Codex CLI, also read references/codex.md and apply the additional Codex-specific techniques.
When the input is a document that instructs an agent (e.g., plan files, AGENTS.md, system instruction docs), treat the document as the improvement target; identify issues and propose concrete improvements, and include a revised draft when helpful.
Workflow
Step 0: Classify Task and Complexity
Classify the task and decide whether an explicit exploration/planning phase should be recommended:
- Task type: bugfix, feature, refactor, research, UI/visual, docs, ops
- Complexity: single-file/small change vs multi-file/uncertain impact
- Risk: data safety, security, compatibility, performance
- Input type: prompt vs agent-instruction document (plan files, AGENTS.md, system instruction docs)
If the task is complex or ambiguous, the improved prompt should explicitly request an exploration/planning phase before implementation.
Step 1: Analyze the Prompt
Analyze the user-provided prompt from the following perspectives:
- Verifiability: Does it include means for Claude to verify its own work?
- Specificity: Are files, scenarios, and constraints clearly specified?
- Context: Is necessary background information provided?
- Scope: Is the task scope appropriately defined?
- Expected Outcome: Are success criteria clear?
- Constraints: Are language/runtime versions, dependencies, security, or compatibility requirements specified?
- Context Economy: Is the prompt concise and focused, without unnecessary information?
- Execution Preference: Is it clear whether the model should implement, propose, or just analyze?
Step 2: Identify Issues
Check for the following anti-patterns:
Step 3: Create Improved Prompt
Apply best practices to create an improved version:
Add Verifiability
Add Specific Context
Add Reference to Existing Patterns
Add Context Economy
Add Rich Context Inputs
Add Explicit Exploration/Planning When Needed
When information is missing, include explicit questions inside the improved prompt and do not assume defaults.
Example: Bugfix
Example: UI/Visual
Example: Refactor
Example: Research
Example: Ops
Example: Docs
Step 4: Output Format
Output in the following format:
[Task]
- Goal:
- Target files/paths (@...):
- Constraints (runtime/version/deps/security/compat):
- Context (symptom, logs, repro, links):
[Verification]
- Commands:
- Expected results:
- UI checks (screenshots/visual diffs):
[Exploration/Planning]
- Do exploration/planning first? (Yes/No) + reason:
[Execution Preference]
- Implement now / plan only / analyze only
- Output format (concise report, patch summary, checklist, etc.)
Goal: ... Targets: path1/path2 Context: symptom + repro + logs Constraints: runtime/deps/compat Verify: command + expected result Explore/Plan: yes/no (why) Execute: implement / plan only / analyze only Output: concise format
Reference: Best Practices Checklist
Best practices to reference when improving prompts:
Provide Verification Methods
- Include test cases
- Specify expected output
- For UI changes, request screenshot comparison
- Add "run the tests" or "verify the build succeeds"
- Include explicit commands to run
Explore → Plan → Implement Order
- Use an exploration/planning phase first for complex tasks
- Create a plan before implementation
- Small fixes don't need a formal plan
- When uncertain, ask clarifying questions before coding
Include Specific Context
- Paste error messages
- Specify existing patterns
- Clarify edge cases
- State environment constraints (runtime, language versions, dependencies)
Use Rich Inputs
- Paste logs and stack traces
- Provide URLs for docs or API references
- Attach or paste large text outputs when needed
Manage Context Window
- Keep prompts concise and focused
- Remove unrelated history or speculation
- Ask for missing info instead of guessing
Leverage Parallelism/Delegation
- For research tasks: request parallel investigation or summaries
- For code review: request an independent review pass
- Keeps the main task focused
Patterns to Avoid
- Vague instructions like "make it better" or "improve it"
- Implementation requests without verification methods
- Multiple unrelated tasks at once
- Requesting changes to files not yet read
- Large context dumps with no clear signal


