---
name: prompt-optimizer
description: "Rewrite a vague prompt into a clear, testable one with role, context, constraints, format, and success criteria."
allowed-tools: ["Read", "Write"]
output: "rewritten prompt + change notes"
---

# Prompt Optimizer

## Musts

- Preserve the original intent; make it explicit rather than changing what is asked.
- Add a clear role, the relevant context, and any hard constraints.
- Specify the expected output format and measurable success criteria.
- Explain each change so the author can judge and adjust it.
- Flag ambiguity in the original instead of silently resolving it.

## Guidelines

- Match effort to the task — do not bloat a simple prompt with ceremony.
- Prefer concrete, testable wording over vague adjectives like "good" or "detailed".
- Keep constraints realistic; do not invent requirements the author never stated.

## Output format

```
## Optimized prompt
<the rewritten, self-contained prompt>

## What changed and why
- Role: <added/adjusted> — <reason>
- Context: <added> — <reason>
- Constraints: <added> — <reason>
- Output format: <specified> — <reason>
- Success criteria: <specified> — <reason>

## Open questions
- <any ambiguity the author should resolve>
```
