prompt-enhancer
Enhance and refine prompts for AI coding agents using Chain-of-Thought reasoning. Use when user asks to improve, optimize, rewrite, or enhance a prompt. Transforms vague requests into structured, high-context instructions for Codex, Claude Code, or Gemini CLI.
When & Why to Use This Skill
The Prompt Enhancer skill is a specialized utility designed to optimize and refine instructions for AI coding agents through Chain-of-Thought reasoning. It bridges the gap between vague user intent and high-performance AI execution by transforming simple requests into structured, high-context instructions tailored for developer tools like Claude Code, Codex, and Gemini CLI, significantly improving the accuracy and reliability of AI-generated code.
Use Cases
- Refining Vague Requests: Automatically transform brief instructions like 'fix this bug' into comprehensive prompts with explicit context, objectives, and technical constraints.
- Optimizing for Coding Agents: Tailor prompts specifically for LLM-based developer tools to ensure the output adheres to specific architectural patterns and coding standards.
- Implementing Chain-of-Thought: Enhance complex logic tasks by injecting step-by-step reasoning instructions, reducing hallucinations and improving the quality of algorithmic solutions.
- Standardizing Prompt Engineering: Establish a consistent framework for prompt creation across development teams to ensure predictable and high-quality AI assistance in the software lifecycle.
| name | prompt-enhancer |
|---|---|
| description | Enhance and refine prompts for AI coding agents using Chain-of-Thought reasoning. Use when user asks to improve, optimize, rewrite, or enhance a prompt. Transforms vague requests into structured, high-context instructions for Codex, Claude Code, or Gemini CLI. |
Prompt Enhancer Skill
Transforms vague or simple prompts into structured, high-context instructions optimized for AI coding agents.
When to Use
- User asks to "improve my prompt" or "make this prompt better"
- User wants to "optimize this instruction for Codex"
- User needs help writing a better prompt for an AI agent
- User mentions "prompt engineering" or "rewrite this"
Quick Start
Run the enhance script with the user's prompt:
python3 ~/.codex/skills/prompt-enhancer/scripts/enhance.py "user's raw prompt here"
How It Works
The enhancer applies these principles:
- Add Context: What project/tech stack is involved?
- Clarify Objective: What exactly should be accomplished?
- Chain of Thought: Add step-by-step reasoning instructions
- Define Constraints: What are the boundaries and requirements?
- Specify Output: What format should the result be in?
Output Format
The enhanced prompt follows this structure:
# Context
[Refined context description]
# Objective
[Precise task definition]
# Step-by-Step Instructions
1. [Step 1]
2. [Step 2]
...
# Constraints
- [Constraint 1]
- [Constraint 2]
Additional Resources
- For the system prompt template, see TEMPLATE.md
Alternative: Use pe CLI
If you have the pe CLI installed globally:
pe "user's raw prompt here"
Install via: npm install -g prompt-enhancer (or clone repo and npm link)