<plugin-root> names the directory that holds this plugin's .codex-plugin/plugin.json. Resolve it once from where this file was loaded, then substitute it into every path below that starts with it.
Arguments: <prompt text or file path> [--model claude|gpt|gemini|<open-weight model, e.g. gemma-3-12b>] [--optimize-for clarity|tokens|reliability] [--compare]. Wherever <arguments> appears below, substitute the text the user typed after the skill name.
Prompt Optimization
CRITICAL RULES
- Read the prompt first. If
<arguments> is a file path, read the file. If inline text, use it directly.
- Never modify the user's original prompt until they approve a variant.
- Show the frontier. Efficiency vs effectiveness is the user's call, not the optimizer's: present variants along that axis with honest cost labels, and let the user pick.
--optimize-for is the shortcut for users who already know their pole.
- Name the model class.
--model accepts a vendor name or an open-weight model name; the analysis turns it into a class (frontier reasoning model, hybrid open reasoner, small open-weight instruct model, older non-reasoning model), and every recommendation is made for that class. What enforces an output shape, and whether a reasoning scaffold helps, differ by class more than by vendor.
- Never enter plan mode. Execute immediately.
Step 1: Analysis and variant frontier (single agent pass)
Spawn the prompt-engineer agent via the Agent tool, description "Analyze the prompt and generate the variant frontier", with the brief below as its prompt. One agent, one pass: it analyzes first, natively, and returns only the observable artifacts defined in Phase 2. No explicit reasoning scaffold is imposed on it, per its own anti-pattern rules for reasoning models.
You are evaluating and optimizing a prompt.
## Input
- Original Prompt: [Insert the prompt from <arguments>]
- Optimization Target: [--optimize-for flag value, or "frontier" when absent]
- Target Model: [--model flag value, default "claude"]
## Phase 1: Analysis (private)
Analyze the prompt thoroughly before writing any output. Extract its behavioral contract
first, then classify the archetype and score on a 1-5 scale only the rubric dimensions that
archetype wants, marking the rest N/A. Identify ambiguities, missing edge cases, structural
weaknesses, and injection vulnerabilities.
Do not include this working in the response: Phase 2 defines the only output you produce.
Model-class check: turn the target model into a class before anything else. Frontier
reasoning model (Claude 4.6 and later, GPT-5.x and GPT-6, Gemini 3, o-series, R1 class):
thinking is native and controlled by an effort setting. Hybrid open reasoner (Qwen3, Gemma 4,
DeepSeek V3.x, gpt-oss): thinking is switched by mode tokens. Small open-weight instruct model
(Gemma 3, Llama 3.x 8B, Phi-4-mini, Mistral Small and anything under roughly 30B served
through Ollama, llama.cpp, vLLM or similar): no native thinking control, weak format
compliance, and a serving stack that may offer constrained decoding. Older non-reasoning
model: the classic patterns apply. Read the model-fit rows of
`<plugin-root>/skills/prompt-engineering/SKILL.md` for the class before scoring model
fit, and `<plugin-root>/skills/prompt-engineering/references/model-guidance.md` when
the target is a named vendor model whose current guidance matters to the rewrite.
Usage-profile check: determine how the prompt is used (one-off, repeated system prompt,
agent loop) and whether prompt caching applies. Which tokens matter follows from this:
output tokens bill at full price and dominate latency; a cached prefix bills 0.1x on reads
(0.025x on Claude Fable 5.1 and Mythos 5.1), so shortening it saves a tenth of what it
appears to, and a cache-breaking edit re-bills it at the write multiplier (1.25x for the
5-minute TTL, 2x for the 1-hour TTL).
Reasoning-pattern check: for a frontier reasoning model, default to NO explicit scaffold:
direct instructions plus precise success criteria, with the effort setting as the lever;
consult the "Reasoning models change the defaults" section of
`<plugin-root>/skills/prompt-engineering/references/reasoning-patterns.md` before
adding any pattern, and never add worked reasoning traces as few-shot exemplars. For a
hybrid open reasoner or a small open reasoner, the same section says what the lever is
(mode tokens, depth self-selection, zero-shot first). Otherwise, decide whether the task
would benefit from a structured reasoning scaffold beyond plain instructions (CoT,
Step-Back, ReAct, Tree-of-Thought, Self-Consistency, Reflexion, Plan-and-Solve,
Least-to-Most, Self-Ask, Skeleton-of-Thought). If yes, read that reference, pick the pattern
that matches the task shape using the selection cheat sheet, and apply it in Phase 2.
For the efficiency variant, always consult that file's token-efficient patterns
(Chain of Draft, Concise CoT, token-budget prompting, Sketch-of-Thought) and its
"Cost-aware selection" section: the efficiency pole is built from those techniques,
not from bare word-deletion.
If the existing prompt already scores 4+ on every dimension, do not add a pattern just
for completeness: record the decision in the analysis instead.
Output-shape check: if anything parses the output (JSON, a schema, an enum, a fixed
template), read `<plugin-root>/skills/prompt-engineering/references/structured-output.md`
and decide the enforcement rung for this model class: format instruction only,
instruction plus validate-and-repair, API structured outputs, or constrained decoding in
the serving stack. On a small open-weight model the instruction alone is never the
enforcement; say which rung the variant assumes and what it costs. Domain validation runs after
schema validation and the system fails closed on either, so the rung a variant names covers the
shape and not the correctness of what the shape holds: the variant says which obligations the
rung covers and which need a domain validator beside it. When the task needs
reasoning as well as a shape, order the prompt to reason first and format last, or split
it into two calls; never ask for reasoning inside the JSON. Where the target is a Claude
4.6 or later model, assistant prefill on the last turn is not available; on an open-weight
model served locally, prefilling the opening brace still is.
Task-family check: if the archetype is extraction or classification (NER, relations,
events, fields from documents, labels from a fixed set), read
`<plugin-root>/skills/prompt-engineering/references/extraction-prompting.md` and
apply the per-task shape it names; extraction is not a reasoning task, so a scaffold added
to it is a defect, and for a fixed schema at volume say plainly that a fine-tuned small
model is the ceiling the prompt cannot reach.
Judge and agent checks: if the archetype is judge / evaluator, read
`<plugin-root>/skills/prompt-engineering/references/judge-prompting.md` and build the
variants on its default shape (one criterion per judge, binary with evidence, a reference when
one exists, a checklist step for open-ended criteria, 0-5 where a scalar is needed); a judge
persona, a judge debate or a 1-10 scale in the original is a defect to report, not a style. If
the archetype is agentic / tool-use, or the text is a tool description, an instruction file, a
skill description or an orchestrator brief, read
`<plugin-root>/skills/prompt-engineering/references/agent-instructions.md` and apply
its anatomy: no few-shot demonstrations in a tool agent's system prompt by default, and long-job
persistence written as verified state rather than a reminder.
Constraint-count check: count the constraints the output must satisfy at once (format, length,
lexical, structural, content). Joint compliance saturates early on every class measured, so
escalate by count: zero to three constraints normal, four to five, add a verifier, and
above five simultaneously verifiable constraints propose a split into stages or a
verify-and-retry step as its own variant and say what it costs; the numbers are in the role's
over-constraining anti-pattern. The band decides only when the optimizer volunteers a split or
a verifier variant as its own option. It is not a reliability criterion and it does not answer
a caller's error budget: when the caller names a joint-success target, or when any counted
constraint is machine-checkable, decide on the four numbers of the output-shape eval
(schema validity, answer accuracy, executable accuracy, the wrong-but-valid rate) rather than
on the count. In a persistent agent rule file the guardrail rules are exempt: fifty guardrails
did not collapse a coding agent's task pass rate, and there the defect to hunt is a conflicting
or unverifiable rule. Output obligations the same file carries, a release-note or
commit-message format for example, count like any other simultaneous constraint.
Language check: the variants stay in the language the original is written in unless a
measurement on the target model and task says otherwise, in which case a translated variant may
enter the frontier, labelled, with the language change reported in the Behavioral changes
section and the measurement named. Absent that measurement, translating an Italian or other
non-English prompt to English is not an optimization, because the effect changes sign by task
and model; a language change the caller asks for is a behavioral change to report.
## Phase 2: Output
Based on your analysis, respond strictly in this format:
### Diagnostic Scorecard (original, predicted)
State the archetype and the model class in one line each, then one row per applicable
dimension. Include the conditional dimensions (output determinism, tool-use correctness,
trust boundaries, evalability, creative latitude) only when this archetype wants them, and
list the ones you marked N/A with a short reason underneath.
| Dimension | Score (1-5) | Key issue |
|-----------|:---:|-------|
| Intent alignment | X | ... |
| Instruction clarity | X | ... |
| Constraint correctness | X | ... |
| Model fit | X | ... |
| Context efficiency | X | ... |
| Robustness | X | ... |
### Variant Frontier
Produce 3 variants by default:
- **A. Max effectiveness**: prioritize quality, robustness, and output control; token cost is secondary.
- **B. Balanced**: resolve the analysis issues at neutral or lower token cost.
- **C. Max efficiency**: minimum tokens at estimated parity, built with a token-efficient
technique where reasoning is involved.
Collapse to fewer variants only when they would genuinely converge (trivial or already
near-optimal prompts); say that you did and why. Each variant is a fully rewritten,
ready-to-use prompt in its own fenced block. Use XML tags if the target model is Claude
and the prompt mixes instructions, context, or examples; headings suffice for simple prompts.
When the output is parsed, every variant states the enforcement rung it assumes, and the
serving-stack setting or validator that rung needs sits next to the prompt, not inside it.
### Comparison
| Variant | Tokens (est.) | Delta vs original | Technique applied | Enforcement (if parsed) | Predicted effect (unmeasured) | What you give up |
Token estimates: characters/4 on the prompt text, labeled "est.". If a variant also
constrains reasoning or output length, state the expected output-token effect
separately: that is where most of the real savings live.
### Behavioral changes
For each variant, report what changed in behavior rather than in wording: constraints
strengthened or relaxed, behaviors removed or added, interface changes, tool-policy or
reasoning-strategy changes, output-enforcement changes, trust boundaries hardened or
weakened. Print only the lines that are true. If a variant changes nothing behavioral, say
so in one line. Lead with any relaxation or removal instead of burying it under the token
saving.
### Honesty note
Close with these caveats, adapted to the case:
- Label every quality claim predicted, measured, or verified. A score this pass assigned is
predicted by definition, including the scorecard above.
- Predicted scores and parity are single-pass estimates by the same model that wrote
the variants, not measurements; small formatting changes alone are known to swing
task accuracy, so treat the deltas as hypotheses.
- To actually verify "fewer tokens, same results": run a paired eval (identical inputs
per variant, pre-declared non-inferiority margin). The prompt-engineer prompt-evals
guidance covers the method; promptfoo fits in CI.
- If the output is parsed, say that schema compliance on this model class is predicted
until measured on a hundred real inputs, and name the parse-failure rate as the first
number to collect, with the wrong-but-valid rate collected beside it: an obligation the
schema cannot express is caught by a domain validator, not by the schema.
- If the prompt is a cached system prompt, repeat the cache-economics warning from
the analysis.
- If the prompt is a judge, say that agreement with humans is predicted until Cohen's kappa
is measured on the caller's own labels, one kappa per criterion.
Step 2: The user picks the pole
After the agent returns, present its output and ask the user which variant to adopt, via AskUserQuestion: one option per variant, each label naming the pole and each description carrying the token estimate and the main trade-off; put your recommended variant first with "(Recommended)". Skip the question and deliver the matching pole directly when:
--optimize-for was passed (clarity -> A, reliability -> A with constraints and examples emphasized, tokens -> C), or
- the user already stated their target in the request.
--compare forces the full frontier presentation even when a shortcut applies.
Step 3: Deliver
Deliver the chosen variant ready to copy, with its token estimate, the enforcement rung and its setting when the output is parsed, and 1-2 test inputs the user can validate it with. Apply it to the source file only if the user asks; the original is never modified without approval.
Quick Examples
/prompt-optimize "Summarize this document": full frontier, user picks the pole
/prompt-optimize prompts/system.md --optimize-for tokens: straight to the efficiency pole
/prompt-optimize prompts/agent.md --model gpt --compare: optimize for GPT, always show the full frontier
/prompt-optimize prompts/extract.md --model gemma-3-12b: small open-weight target: the variants name their enforcement rung and the extraction shape they use
/prompt-optimize prompts/judge.md --model gpt: judge archetype: the variants decompose the rubric, drop the persona, and name the agreement check
1---2name: prompt-optimize3description: Present the efficiency-versus-effectiveness frontier as labelled variants and let the user pick. TRIGGER WHEN: the user wants to review or optimize a prompt, system message, or agent instructions for clarity/tokens/reliability.4---56> `<plugin-root>` names the directory that holds this plugin's `.codex-plugin/plugin.json`. Resolve it once from where this file was loaded, then substitute it into every path below that starts with it.7> Arguments: `<prompt text or file path> [--model claude|gpt|gemini|<open-weight model, e.g. gemma-3-12b>] [--optimize-for clarity|tokens|reliability] [--compare]`. Wherever `<arguments>` appears below, substitute the text the user typed after the skill name.89<!-- Generated by the Daodan compiler for codex. Edit the kernel, never this file. -->1011# Prompt Optimization1213## CRITICAL RULES14151. **Read the prompt first.** If `<arguments>` is a file path, read the file. If inline text, use it directly.162. **Never modify the user's original prompt** until they approve a variant.173. **Show the frontier.** Efficiency vs effectiveness is the user's call, not the optimizer's: present variants along that axis with honest cost labels, and let the user pick. `--optimize-for` is the shortcut for users who already know their pole.184. **Name the model class.** `--model` accepts a vendor name or an open-weight model name; the analysis turns it into a class (frontier reasoning model, hybrid open reasoner, small open-weight instruct model, older non-reasoning model), and every recommendation is made for that class. What enforces an output shape, and whether a reasoning scaffold helps, differ by class more than by vendor.195. **Never enter plan mode.** Execute immediately.2021## Step 1: Analysis and variant frontier (single agent pass)2223Spawn the `prompt-engineer` agent via the `Agent` tool, description "Analyze the prompt and generate the variant frontier", with the brief below as its prompt. One agent, one pass: it analyzes first, natively, and returns only the observable artifacts defined in Phase 2. No explicit reasoning scaffold is imposed on it, per its own anti-pattern rules for reasoning models.2425```26You are evaluating and optimizing a prompt.2728## Input29- Original Prompt: [Insert the prompt from <arguments>]30- Optimization Target: [--optimize-for flag value, or "frontier" when absent]31- Target Model: [--model flag value, default "claude"]3233## Phase 1: Analysis (private)34Analyze the prompt thoroughly before writing any output. Extract its behavioral contract35first, then classify the archetype and score on a 1-5 scale only the rubric dimensions that36archetype wants, marking the rest N/A. Identify ambiguities, missing edge cases, structural37weaknesses, and injection vulnerabilities.38Do not include this working in the response: Phase 2 defines the only output you produce.3940Model-class check: turn the target model into a class before anything else. Frontier41reasoning model (Claude 4.6 and later, GPT-5.x and GPT-6, Gemini 3, o-series, R1 class):42thinking is native and controlled by an effort setting. Hybrid open reasoner (Qwen3, Gemma 4,43DeepSeek V3.x, gpt-oss): thinking is switched by mode tokens. Small open-weight instruct model44(Gemma 3, Llama 3.x 8B, Phi-4-mini, Mistral Small and anything under roughly 30B served45through Ollama, llama.cpp, vLLM or similar): no native thinking control, weak format46compliance, and a serving stack that may offer constrained decoding. Older non-reasoning47model: the classic patterns apply. Read the model-fit rows of48`<plugin-root>/skills/prompt-engineering/SKILL.md` for the class before scoring model49fit, and `<plugin-root>/skills/prompt-engineering/references/model-guidance.md` when50the target is a named vendor model whose current guidance matters to the rewrite.5152Usage-profile check: determine how the prompt is used (one-off, repeated system prompt,53agent loop) and whether prompt caching applies. Which tokens matter follows from this:54output tokens bill at full price and dominate latency; a cached prefix bills 0.1x on reads55(0.025x on Claude Fable 5.1 and Mythos 5.1), so shortening it saves a tenth of what it56appears to, and a cache-breaking edit re-bills it at the write multiplier (1.25x for the575-minute TTL, 2x for the 1-hour TTL).5859Reasoning-pattern check: for a frontier reasoning model, default to NO explicit scaffold:60direct instructions plus precise success criteria, with the effort setting as the lever;61consult the "Reasoning models change the defaults" section of62`<plugin-root>/skills/prompt-engineering/references/reasoning-patterns.md` before63adding any pattern, and never add worked reasoning traces as few-shot exemplars. For a64hybrid open reasoner or a small open reasoner, the same section says what the lever is65(mode tokens, depth self-selection, zero-shot first). Otherwise, decide whether the task66would benefit from a structured reasoning scaffold beyond plain instructions (CoT,67Step-Back, ReAct, Tree-of-Thought, Self-Consistency, Reflexion, Plan-and-Solve,68Least-to-Most, Self-Ask, Skeleton-of-Thought). If yes, read that reference, pick the pattern69that matches the task shape using the selection cheat sheet, and apply it in Phase 2.70For the efficiency variant, always consult that file's token-efficient patterns71(Chain of Draft, Concise CoT, token-budget prompting, Sketch-of-Thought) and its72"Cost-aware selection" section: the efficiency pole is built from those techniques,73not from bare word-deletion.74If the existing prompt already scores 4+ on every dimension, do not add a pattern just75for completeness: record the decision in the analysis instead.7677Output-shape check: if anything parses the output (JSON, a schema, an enum, a fixed78template), read `<plugin-root>/skills/prompt-engineering/references/structured-output.md`79and decide the enforcement rung for this model class: format instruction only,80instruction plus validate-and-repair, API structured outputs, or constrained decoding in81the serving stack. On a small open-weight model the instruction alone is never the82enforcement; say which rung the variant assumes and what it costs. Domain validation runs after83schema validation and the system fails closed on either, so the rung a variant names covers the84shape and not the correctness of what the shape holds: the variant says which obligations the85rung covers and which need a domain validator beside it. When the task needs86reasoning as well as a shape, order the prompt to reason first and format last, or split87it into two calls; never ask for reasoning inside the JSON. Where the target is a Claude884.6 or later model, assistant prefill on the last turn is not available; on an open-weight89model served locally, prefilling the opening brace still is.9091Task-family check: if the archetype is extraction or classification (NER, relations,92events, fields from documents, labels from a fixed set), read93`<plugin-root>/skills/prompt-engineering/references/extraction-prompting.md` and94apply the per-task shape it names; extraction is not a reasoning task, so a scaffold added95to it is a defect, and for a fixed schema at volume say plainly that a fine-tuned small96model is the ceiling the prompt cannot reach.9798Judge and agent checks: if the archetype is judge / evaluator, read99`<plugin-root>/skills/prompt-engineering/references/judge-prompting.md` and build the100variants on its default shape (one criterion per judge, binary with evidence, a reference when101one exists, a checklist step for open-ended criteria, 0-5 where a scalar is needed); a judge102persona, a judge debate or a 1-10 scale in the original is a defect to report, not a style. If103the archetype is agentic / tool-use, or the text is a tool description, an instruction file, a104skill description or an orchestrator brief, read105`<plugin-root>/skills/prompt-engineering/references/agent-instructions.md` and apply106its anatomy: no few-shot demonstrations in a tool agent's system prompt by default, and long-job107persistence written as verified state rather than a reminder.108109Constraint-count check: count the constraints the output must satisfy at once (format, length,110lexical, structural, content). Joint compliance saturates early on every class measured, so111escalate by count: zero to three constraints normal, four to five, add a verifier, and112above five simultaneously verifiable constraints propose a split into stages or a113verify-and-retry step as its own variant and say what it costs; the numbers are in the role's114over-constraining anti-pattern. The band decides only when the optimizer volunteers a split or115a verifier variant as its own option. It is not a reliability criterion and it does not answer116a caller's error budget: when the caller names a joint-success target, or when any counted117constraint is machine-checkable, decide on the four numbers of the output-shape eval118(schema validity, answer accuracy, executable accuracy, the wrong-but-valid rate) rather than119on the count. In a persistent agent rule file the guardrail rules are exempt: fifty guardrails120did not collapse a coding agent's task pass rate, and there the defect to hunt is a conflicting121or unverifiable rule. Output obligations the same file carries, a release-note or122commit-message format for example, count like any other simultaneous constraint.123124Language check: the variants stay in the language the original is written in unless a125measurement on the target model and task says otherwise, in which case a translated variant may126enter the frontier, labelled, with the language change reported in the Behavioral changes127section and the measurement named. Absent that measurement, translating an Italian or other128non-English prompt to English is not an optimization, because the effect changes sign by task129and model; a language change the caller asks for is a behavioral change to report.130131## Phase 2: Output132Based on your analysis, respond strictly in this format:133134### Diagnostic Scorecard (original, predicted)135State the archetype and the model class in one line each, then one row per applicable136dimension. Include the conditional dimensions (output determinism, tool-use correctness,137trust boundaries, evalability, creative latitude) only when this archetype wants them, and138list the ones you marked N/A with a short reason underneath.139140| Dimension | Score (1-5) | Key issue |141|-----------|:---:|-------|142| Intent alignment | X | ... |143| Instruction clarity | X | ... |144| Constraint correctness | X | ... |145| Model fit | X | ... |146| Context efficiency | X | ... |147| Robustness | X | ... |148149### Variant Frontier150Produce 3 variants by default:151- **A. Max effectiveness**: prioritize quality, robustness, and output control; token cost is secondary.152- **B. Balanced**: resolve the analysis issues at neutral or lower token cost.153- **C. Max efficiency**: minimum tokens at estimated parity, built with a token-efficient154 technique where reasoning is involved.155156Collapse to fewer variants only when they would genuinely converge (trivial or already157near-optimal prompts); say that you did and why. Each variant is a fully rewritten,158ready-to-use prompt in its own fenced block. Use XML tags if the target model is Claude159and the prompt mixes instructions, context, or examples; headings suffice for simple prompts.160When the output is parsed, every variant states the enforcement rung it assumes, and the161serving-stack setting or validator that rung needs sits next to the prompt, not inside it.162163### Comparison164| Variant | Tokens (est.) | Delta vs original | Technique applied | Enforcement (if parsed) | Predicted effect (unmeasured) | What you give up |165166Token estimates: characters/4 on the prompt text, labeled "est.". If a variant also167constrains reasoning or output length, state the expected output-token effect168separately: that is where most of the real savings live.169170### Behavioral changes171For each variant, report what changed in behavior rather than in wording: constraints172strengthened or relaxed, behaviors removed or added, interface changes, tool-policy or173reasoning-strategy changes, output-enforcement changes, trust boundaries hardened or174weakened. Print only the lines that are true. If a variant changes nothing behavioral, say175so in one line. Lead with any relaxation or removal instead of burying it under the token176saving.177178### Honesty note179Close with these caveats, adapted to the case:180- Label every quality claim predicted, measured, or verified. A score this pass assigned is181 predicted by definition, including the scorecard above.182- Predicted scores and parity are single-pass estimates by the same model that wrote183 the variants, not measurements; small formatting changes alone are known to swing184 task accuracy, so treat the deltas as hypotheses.185- To actually verify "fewer tokens, same results": run a paired eval (identical inputs186 per variant, pre-declared non-inferiority margin). The prompt-engineer prompt-evals187 guidance covers the method; promptfoo fits in CI.188- If the output is parsed, say that schema compliance on this model class is predicted189 until measured on a hundred real inputs, and name the parse-failure rate as the first190 number to collect, with the wrong-but-valid rate collected beside it: an obligation the191 schema cannot express is caught by a domain validator, not by the schema.192- If the prompt is a cached system prompt, repeat the cache-economics warning from193 the analysis.194- If the prompt is a judge, say that agreement with humans is predicted until Cohen's kappa195 is measured on the caller's own labels, one kappa per criterion.196```197198## Step 2: The user picks the pole199200After the agent returns, present its output and ask the user which variant to adopt, via AskUserQuestion: one option per variant, each label naming the pole and each description carrying the token estimate and the main trade-off; put your recommended variant first with "(Recommended)". Skip the question and deliver the matching pole directly when:201202- `--optimize-for` was passed (clarity -> A, reliability -> A with constraints and examples emphasized, tokens -> C), or203- the user already stated their target in the request.204205`--compare` forces the full frontier presentation even when a shortcut applies.206207## Step 3: Deliver208209Deliver the chosen variant ready to copy, with its token estimate, the enforcement rung and its setting when the output is parsed, and 1-2 test inputs the user can validate it with. Apply it to the source file only if the user asks; the original is never modified without approval.210211## Quick Examples212213- `/prompt-optimize "Summarize this document"`: full frontier, user picks the pole214- `/prompt-optimize prompts/system.md --optimize-for tokens`: straight to the efficiency pole215- `/prompt-optimize prompts/agent.md --model gpt --compare`: optimize for GPT, always show the full frontier216- `/prompt-optimize prompts/extract.md --model gemma-3-12b`: small open-weight target: the variants name their enforcement rung and the extraction shape they use217- `/prompt-optimize prompts/judge.md --model gpt`: judge archetype: the variants decompose the rubric, drop the persona, and name the agreement check