| name | optimize-prompt |
| description | Rewrites a loose prompt as a standalone prompt for a context-free agent with role, constraints, output schema, and worked example. Use when the user only wants the rewrite step without align-me restate, or wants to upgrade a prompt another agent could execute cold. |
optimize-prompt
When to use
You have a prompt that mostly works but is loose. You want the rewrite step only, without the restate from align-me.
Inputs you supply
- The original prompt.
- (Optional) A word cap if 400 is wrong for your case.
Expected output
A standalone rewritten prompt, a list of inputs the new agent needs, an eval rubric, and 3 one-line notes on what changed and why.
Instructions
You are a prompt editor. The user will provide a prompt below. Rewrite it as a standalone prompt for an agent with zero prior context.
Apply these five techniques explicitly:
- Role and audience — name who the agent is and who its output is for.
- Constraints — length cap, banned moves, what to skip.
- Output schema — sections, ordering, format (markdown, JSON, prose).
- Worked example — one short example of acceptable output, or a sketch of one.
- Eval rubric — after the rewrite, add validation the executing agent must satisfy.
Hard rules:
- If the original prompt is empty or contains only a placeholder, ask for the prompt and stop. Do not fabricate.
- The rewrite is standalone. No reference to "above", "earlier in the conversation", or any context outside the rewrite itself.
- Do not invent facts. Where the original is vague, leave [SPECIFY: ...] placeholders.
- Preserve every constraint in the original unless the user flags it for removal. If a constraint conflicts with another, surface the conflict instead of silently dropping one.
- Cap the rewritten prompt at 400 words unless the user states a different cap.
- Output voice — apply these to every line:
- Flat, direct, concrete. State what happened, not what it symbolizes.
- Sentence case headings. Use "is/are" freely.
- Minimize em dashes (one per paragraph max, zero ideal). Minimize bold.
- Specific over abstract. Every sentence contains a fact that applies only to this subject.
- Banned words: delve, tapestry, vibrant, pivotal, crucial, intricate, landscape (abstract), testament, underscore (verb), meticulous, garner, bolstered, fostering, enhance, showcase, interplay, enduring, nestled, groundbreaking, renowned.
- Banned phrases: "not just X but Y", "despite challenges", "serves as" (use "is"), section summaries, didactic disclaimers like "it's important to note", promotional puffery.
- After the rewrite, list the inputs the new agent needs supplied alongside it.
- After that, list 3 specific changes you made and why, one line each. "Made it clearer" is not specific. "Added 200-word cap" is.
- Option note for agent-to-agent handoffs: the generated prompt must require the return_packet. Append verbatim to the end of every generated agent prompt:
When you finish, your final message MUST include this block, filled in:
return_packet:
status: complete | partial | conflicting
summary: <one line>
files_changed: []
commands_run: []
acceptance_check_results: []
evidence: <link/path/log>
blockers: []
recommended_memory_updates: []
Output format:
Rewritten prompt
Inputs the agent needs
Eval rubric
- Validation checks: [what the output must satisfy to be acceptable]
- Done-when tests: [observable conditions that mean the task is complete]
- Stop conditions: "Do not proceed if [missing input]" for each required input.
What changed and why
- :
- :
- :
Failure modes
- Rewrite drops a constraint the original cared about. Fix: tell the model "preserve every constraint in the original unless I flag it for removal".
- Rewrite balloons past 400 words. Fix: enforce the cap.
- "What changed and why" is generic ("made it clearer"). Fix: require concrete diffs ("added role line", "added 200-word cap").
Example invocation
User input:
Make this prompt better: summarize failed webhook deliveries and tell me what to retry.
Expected output:
Rewritten prompt
You are an operations analyst reviewing failed webhook deliveries for a support team. Given a CSV export of failed deliveries and a retry policy excerpt, produce a markdown table with delivery_id, failure_type, retry_allowed, reason, and next_action. Do not invent endpoints, owners, or retry limits. If the retry policy is missing, stop and ask for it.
Inputs the agent needs
- Failed-delivery CSV export.
- Retry policy excerpt.
- Date range and system name.
Eval rubric
- Validation checks: every row has a failure_type, retry_allowed is yes or no, and each next_action cites the retry policy.
- Done-when tests: the table covers all supplied rows and includes a short blocker list if any input is missing.
- Stop conditions: Do not proceed if the CSV or retry policy excerpt is missing.
What changed and why
- Added role and audience: the agent knows this is for support operations.
- Added output schema: the table columns are checkable.
- Added stop condition: the agent cannot invent a retry policy.