Metaprompt
A prompt written by feel, without checking what actually works for the specific model
and harness that will run it, tends to either under-specify (missing a technique that
model responds well to) or over-specify (re-stating things the harness already
guarantees, which dilutes attention). This skill treats prompt-writing as a small
research task with three required inputs, not a one-shot creative exercise.
When to use this
- Writing a prompt, system message, or agent instructions meant to run on a specific
model inside a specific harness — most valuably when that combination differs from
the one currently running this conversation (you can't rely on your own default
behavior as a stand-in for how the target will behave).
- The user asks to "write a prompt for X model" or "write the system prompt for this
agent" and names or implies a target model/harness.
Instructions
1. Get all three required inputs
- Goal — what should the resulting prompt make the model do?
- Target model — the specific model/family (e.g. "Claude Opus 4.8," "GPT-5.2,"
"Gemini 3 Pro"). Techniques differ meaningfully even within one vendor's lineup —
don't accept "an LLM" as an answer.
- Target harness — what will actually run this prompt: Claude Code, Codex CLI, a
custom agent loop, the raw API, a chat UI, something else. This determines what the
harness already handles for you vs. what the prompt must spell out.
If any is missing or ambiguous, ask before drafting — a prompt optimized for the wrong
model/harness combination isn't a safe default to fall back on.
2. Research before writing — don't rely on memorized specifics
Model and harness idioms change as often as the models themselves ship. Before
drafting:
- Look up the target model's current official prompting guidance (WebSearch/
WebFetch its vendor's docs). If a skill already available in this environment is
specifically authoritative for that model/vendor (for example this repo's own
claude-api skill for Claude/Anthropic), prefer it over general web search.
- Look up the target harness's own conventions and docs (a harness-specific
instructions-file format, its tool-calling conventions, what context it injects
automatically).
- Treat anything you already "know" about a model's quirks as a hypothesis to verify,
not a fact to assert — this is exactly the staleness this skill exists to avoid.
references/research-checklist.md lists the categories to investigate for the model
and the harness — deliberately not a list of hardcoded facts, since those go stale.
3. Apply what you found
- Model-specific: structuring conventions the model responds to (XML tags,
markdown, JSON), how it handles extended/visible reasoning, how literally it
follows instructions, anything relevant to the goal around refusals/safety framing.
- Harness-specific: what the harness already provides automatically (tool
definitions, cwd/git context, sandboxing, available tools) — don't re-specify it,
that's redundant and dilutes the prompt. What output format the harness expects and
parses. Where the harness's own extension points are (system prompt vs. user
message vs. a dedicated config/instructions file).
The harness guide is the authority on what to omit, not just what to add.
4. Assemble, then self-review before delivering
Draft the complete prompt, then check it against:
- Is the goal unambiguous to someone with zero other context?
- Are format instructions precise and actually match what the harness parses?
- Does it redundantly restate anything the harness already guarantees?
- Any internal contradictions between sections?
- Is it as concise as the goal allows — a bloated prompt degrades attention as much
as a vague one does?
Full checklist in references/research-checklist.md.
5. Deliver three things
- The ready-to-paste prompt, in a code block.
- Parameter recommendations if applicable (reasoning/thinking effort, temperature,
and similar) for the target model.
- One sentence naming the key model- or harness-specific technique that shaped this
prompt — so the user understands why it's written this way, not just what to
paste.
Reference files
references/research-checklist.md — what to look up per model and per harness, and
the pre-delivery self-review checklist.
1---2name: metaprompt3description: Given a goal, a target model, and a target harness, produces a complete, ready-to-use prompt engineered for that specific combination — researching current per-model and per-harness prompting techniques rather than relying on stale memorized guidance, then self-reviewing the draft against a quality checklist. Use when writing a prompt, system message, or agent instructions meant to run on a specific model (Claude, GPT-5.x, Gemini, etc.) inside a specific harness (Claude Code, Codex CLI, a custom agent loop, raw API, chat) — especially one that isn't the model/harness currently running this conversation.4---56# Metaprompt78A prompt written by feel, without checking what actually works for the specific model9and harness that will run it, tends to either under-specify (missing a technique that10model responds well to) or over-specify (re-stating things the harness already11guarantees, which dilutes attention). This skill treats prompt-writing as a small12research task with three required inputs, not a one-shot creative exercise.1314## When to use this1516- Writing a prompt, system message, or agent instructions meant to run on a specific17 model inside a specific harness — most valuably when that combination differs from18 the one currently running this conversation (you can't rely on your own default19 behavior as a stand-in for how the target will behave).20- The user asks to "write a prompt for X model" or "write the system prompt for this21 agent" and names or implies a target model/harness.2223## Instructions2425### 1. Get all three required inputs2627- **Goal** — what should the resulting prompt make the model do?28- **Target model** — the specific model/family (e.g. "Claude Opus 4.8," "GPT-5.2,"29 "Gemini 3 Pro"). Techniques differ meaningfully even within one vendor's lineup —30 don't accept "an LLM" as an answer.31- **Target harness** — what will actually run this prompt: Claude Code, Codex CLI, a32 custom agent loop, the raw API, a chat UI, something else. This determines what the33 harness already handles for you vs. what the prompt must spell out.3435If any is missing or ambiguous, ask before drafting — a prompt optimized for the wrong36model/harness combination isn't a safe default to fall back on.3738### 2. Research before writing — don't rely on memorized specifics3940Model and harness idioms change as often as the models themselves ship. Before41drafting:4243- Look up the target model's **current** official prompting guidance (WebSearch/44 WebFetch its vendor's docs). If a skill already available in this environment is45 specifically authoritative for that model/vendor (for example this repo's own46 `claude-api` skill for Claude/Anthropic), prefer it over general web search.47- Look up the target harness's own conventions and docs (a harness-specific48 instructions-file format, its tool-calling conventions, what context it injects49 automatically).50- Treat anything you already "know" about a model's quirks as a hypothesis to verify,51 not a fact to assert — this is exactly the staleness this skill exists to avoid.5253`references/research-checklist.md` lists the categories to investigate for the model54and the harness — deliberately not a list of hardcoded facts, since those go stale.5556### 3. Apply what you found5758- **Model-specific**: structuring conventions the model responds to (XML tags,59 markdown, JSON), how it handles extended/visible reasoning, how literally it60 follows instructions, anything relevant to the goal around refusals/safety framing.61- **Harness-specific**: what the harness already provides automatically (tool62 definitions, cwd/git context, sandboxing, available tools) — don't re-specify it,63 that's redundant and dilutes the prompt. What output format the harness expects and64 parses. Where the harness's own extension points are (system prompt vs. user65 message vs. a dedicated config/instructions file).6667**The harness guide is the authority on what to omit, not just what to add.**6869### 4. Assemble, then self-review before delivering7071Draft the complete prompt, then check it against:7273- Is the goal unambiguous to someone with zero other context?74- Are format instructions precise and actually match what the harness parses?75- Does it redundantly restate anything the harness already guarantees?76- Any internal contradictions between sections?77- Is it as concise as the goal allows — a bloated prompt degrades attention as much78 as a vague one does?7980Full checklist in `references/research-checklist.md`.8182### 5. Deliver three things83841. The ready-to-paste prompt, in a code block.852. Parameter recommendations if applicable (reasoning/thinking effort, temperature,86 and similar) for the target model.873. One sentence naming the key model- or harness-specific technique that shaped this88 prompt — so the user understands *why* it's written this way, not just what to89 paste.9091## Reference files9293- `references/research-checklist.md` — what to look up per model and per harness, and94 the pre-delivery self-review checklist.