agentsclimarketplace

Optimize prompt

Skill omerakben/aha/skills/optimize-prompt

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.From its SKILL.md

Install
npx -y skills add omerakben/aha --skill optimize-prompt

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.3 KB, as published. Nobody here has run it

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:

  1. Role and audience — name who the agent is and who its output is for.
  2. Constraints — length cap, banned moves, what to skip.
  3. Output schema — sections, ordering, format (markdown, JSON, prose).
  4. Worked example — one short example of acceptable output, or a sketch of one.
  5. 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
  # 'missing' is set by the debrief, not the agent
  summary: <one line>
  files_changed: []
  commands_run: []
  acceptance_check_results: []   # per acceptance check: pass | fail | unknown + where to verify
  evidence: <link/path/log>
  blockers: []
  recommended_memory_updates: []

Output format:

Rewritten prompt

<the rewrite>

Inputs the agent needs

  • <input 1>
  • <input 2> ...

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

  1. <change>: <one-line reason>
  2. <change>: <one-line reason>
  3. <change>: <one-line reason>

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

  1. Added role and audience: the agent knows this is for support operations.
  2. Added output schema: the table columns are checkable.
  3. Added stop condition: the agent cannot invent a retry policy.

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.