Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Abhillashjadhav/AI-PM-essential-skills --skill prompt-optimizer-loopgit clone --depth 1 https://github.com/Abhillashjadhav/AI-PM-essential-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/abhillashjadhav/ai-pm-essential-skills/prompt-optimizer-loop)<a href="https://agentmods.dev/skills/abhillashjadhav/ai-pm-essential-skills/prompt-optimizer-loop"><img src="https://agentmods.dev/badge/skills/abhillashjadhav/ai-pm-essential-skills/prompt-optimizer-loop/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/abhillashjadhav/ai-pm-essential-skills/prompt-optimizer-loop"><img src="https://agentmods.dev/badge/skills/abhillashjadhav/ai-pm-essential-skills/prompt-optimizer-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00155 | $0.00741 |
| Opus 5.5 | $0.00062 | $0.00296 |
| Sonnet 5.5 | $0.00031 | $0.00148 |
| Haiku 4.5 | $0.00015 | $0.00074 |
Grade A, and why
prompt-optimizer-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prompt Optimizer Loop
Improve a prompt the way engineers improve code: one change at a time, measured against a locked test, keep winners, revert losers. Interactive — the user approves each round.
Step 0 — Collect the three inputs
- TARGET: the prompt to improve (verbatim).
- TEST INPUTS: 2-3 realistic inputs that would hit this prompt in production. If the user has none, help draft them, then confirm.
- CHECKLIST: 3-6 binary yes/no quality checks (e.g., "output is valid JSON", "response under 100 words", "never invents a source"). If missing, draft candidates from the user's complaints and get approval. Once approved, the checklist is LOCKED — it cannot change during the loop. Changing it starts a new loop.
Step 1 — Baseline
Run the TARGET prompt against every test input. Score each output against every checklist item. Record the baseline as passes/total (e.g., 9/15 across 3 inputs × 5 checks).
Step 2 — One mutation
Identify the checklist item failing most often. Propose exactly ONE change to the prompt targeting that failure (add a constraint, reorder, add an example, tighten wording). State the hypothesis: "Adding X should fix check Y because Z." Never bundle multiple changes — attribution dies.
Step 3 — Re-test
Run the mutated prompt against ALL test inputs (not just the failing one). Score against the full locked checklist.
Step 4 — Keep or revert
- Score improved AND no previously-passing check broke → KEEP. New version becomes current.
- Score flat or worse, or a regression appeared → REVERT to the previous version. Log why the hypothesis failed.
Show the scoreboard after every round:
ROUND N | mutation: <one line> | hypothesis: <one line>
SCORE: X/Y (was X/Y) | regressions: none|<list> | verdict: KEEP|REVERT
Step 5 — Stop conditions
Stop when any of: all checks pass on all inputs; 2 consecutive reverts (diminishing returns); user says stop; 8 rounds reached. Then output: final prompt (clean copy), original prompt (untouched), full round-by-round changelog.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 49 lines · 155 tokens per session scan A 831997135d6f
prompt-optimizer-loop is a skill published in the GitHub repository Abhillashjadhav/AI-PM-essential-skills (9 stars, last pushed 17d ago), licensed MIT. It adds 155 tokens to every session and 741 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
prompt-optimizer-loop compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| prompt-optimizer-loopAbhillashjadhav/AI-PM-essential-skills | Skill | 9 | 17d ago | MIT | A | 155 | Claude Code |
| prompt-engineeringericrisco/rsc-harness | Skill | 573 | yesterday | MIT | A | 83 | Claude Code, Codex |
| eval-llm-judgeCalibre-Labs/reforge-ai-evals | Skill | 95 | 3d ago | MIT | A | 105 | Claude Code, Codex |
| context-engineering-advisordeanpeters/Product-Manager-Skills | Skill | 7.9k | 25d ago | none | A | 32 | Claude Code |
| evals-designorlando-japan/claude-code-setting | Skill | 2 | 1mo ago | MIT | A | 34 | Claude Code, Codex |
| add-promptcyanheads/evals-mcp-server | Skill | 1 | 23d ago | Apache-2.0 | A | 37 | Claude Code |
| llm-app-patternsdavila7/claude-code-templates | Skill | 33k | today | MIT | A | 54 | Claude Code, Codex |