prompt-optimizerlisted
Install: claude install-skill yorilavi/prompt-optimizer
# Prompt Optimization Skill
> **v1.0.1** · by Yori Lavi · updated 2026-05-29 · see [CHANGELOG](./CHANGELOG.md)
> Requires: Claude Code · Optional: [Codex CLI](https://github.com/openai/codex) for automated GPT review
This skill guides an iterative prompt optimization process using both Claude and GPT as reviewers. When the Codex plugin is available, the GPT review step runs automatically — no manual copy-paste needed.
## Prerequisites Check
Before starting, detect whether Codex is available:
```bash
codex --version 2>/dev/null
```
If Codex is installed and authenticated, use **Automated Mode** (Step 3a).
If not, fall back to **Manual Mode** (Step 3b).
Inform the user which mode will be used at the start of the session.
## Process Overview
### Step 1: Get Initial Prompt
Ask the user for the prompt they want to optimize. Clarify:
- What is the prompt's purpose?
- Who/what will receive this prompt?
- What's the desired output?
### Step 2: Optimize the Prompt
Improve the initial prompt by:
- Adding clarity and specificity
- Structuring with clear sections if needed
- Removing ambiguity
- Adding constraints or guardrails
- Improving instruction flow
Present the optimized version to the user with a brief explanation of changes.
### Step 3a: GPT Review via Codex (Automated Mode)
Use `codex exec` to delegate the review to GPT. Write the review request to a temp file, then invoke Codex.
**For iteration 1 (first pass):**
```bash
cat <<'PROMPT_EOF' > /tmp/prompt-review-re