Skip to content
Skills Library
AI & agents · Writing

metaprompt

/metaprompt

This skill should be used when the user wants to turn a plain-English task description into a reusable prompt template with {$VARIABLE} placeholders, using Anthropic's cookbook metaprompt. Triggers when asked to "metaprompt", "write a prompt for X", "generate a prompt template", "turn this task into a prompt", "help me prompt-engineer X", or when a task needs to be run repeatedly over varying inputs and deserves a stable template rather than an ad-hoc prompt.

Licence
MIT
Last repository change
18.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 18.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

This skill should be used when the user wants to turn a plain-English task description into a reusable prompt template with {$VARIABLE} placeholders, using Anthropic's cookbook metaprompt. Triggers when asked to "metaprompt", "write a prompt for X", "generate a prompt template", "turn this task into a prompt", "help me prompt-engineer X", or when a task needs to be run repeatedly over varying inputs and deserves a stable template rather than an ad-hoc prompt.

Triggers from the description

s cookbook metaprompt. Triggers when asked towrite a prompt for Xgenerate a prompt templateturn this task into a prompthelp me prompt-engineer X
Original author description

This skill should be used when the user wants to turn a plain-English task description into a reusable prompt template with {$VARIABLE} placeholders, using Anthropic's cookbook metaprompt. Triggers when asked to "metaprompt", "write a prompt for X", "generate a prompt template", "turn this task into a prompt", "help me prompt-engineer X", or when a task needs to be run repeatedly over varying inputs and deserves a stable template rather than an ad-hoc prompt.

How it works

  1. Procedure
  2. Rules that carry the quality
  3. Placeholder discipline
  4. Currency note
Original SKILL.md headings · 80 lines, 629 words
SKILL.md preview
---
name: metaprompt
description: This skill should be used when the user wants to turn a plain-English task description into a reusable prompt template with {$VARIABLE} placeholders, using Anthropic's cookbook metaprompt. Triggers when asked to "metaprompt", "write a prompt for X", "generate a prompt template", "turn this task into a prompt", "help me prompt-engineer X", or when a task needs to be run repeatedly over varying inputs and deserves a stable template rather than an ad-hoc prompt.
allowed-tools: ["Read", "Write"]
---

# Metaprompt

Writes prompt templates. You give it a task in plain English; it returns a template
with `{$VARIABLE}` placeholders that someone can fill in later and send to a model.

Source: Anthropic cookbook, `misc/metaprompt.ipynb`
(https://platform.claude.com/cookbook/misc-metaprompt). The reference file is the
cookbook's metaprompt text verbatim, minus its Python string wrapper
(anthropics/anthropic-cookbook, MIT licence). It has no table of contents on purpose —
keeping it verbatim matters more than navigation; read it in full (step 1).

## Procedure

1. **Read `reference/metaprompt.md` in full.** Do not skim it and do not work from
   memory of it. Its five worked examples are the teaching signal — the output
   quality comes from them, not from the closing instructions.

2. **Get the task statement.** One or two sentences describing what the eventual
   prompt should make the assistant do. If the user gave a vague gesture rather than
   a task ("something for our support inbox"), ask once for a concrete sentence
   before proceeding. Do not invent scope.

3. **Substitute the task into the `{{TASK}}` slot** near the end of the reference
   file — that is the only double-brace slot, and the only thing you fill in.

4. **Follow the metaprompt's own three numbered steps, in order**, emitting:
   - `<Inputs>` — the minimal, non-overlapping set of variable *names*. One is
     common; more than three is almost always wrong.
   - `<Instructions Structure>` — the plan for where each variable goes.
   - `<Instructions>` — the finished template.

5. **Write the finished template to a file** if the user named one, or asked for a
   file. Otherwise print it. Default location is the current working directory;
   ask rather than guessing if the target is ambiguous.

## Rules that carry the quality

These come from the metaprompt itself. They are the parts most often lost:

- **You are not completing the task.** You are writing instructions for a model that
  will complete it later. If your output answers the user's example question, you
  have done the wrong thing.
- **Long inputs come before the directions about them.** A `{$DOCUMENT}` goes above
  the instruction that says what to do with the document, never below it.
- **Justification before the verdict.** When the template asks for a score, rating,
  or classification, it must ask for the reasoning first and the score second.
- **Scratchpad only when earned.** Add `<scratchpad>` or `<Inner monologue>` tags for
  genuinely multi-step tasks. Omit for simple ones.
- **Demarcate variables with XML tags** so the model can see where a substituted
  value starts and ends.
- **Name output tags without closing them.** Say "write your answer inside `<answer>`
  tags" — do not emit stray open-and-close tag pairs.

## Placeholder discipline

Two brace conventions are in play and confusing them breaks the output:

| Syntax | Whose | What to do |
|---|---|---|
| `{{TASK}}` | the metaprompt's | You fill this in, once, with the user's task. |
| `{$VARIABLE}` | the generated template's | Must survive **untouched** into your output. Never resolve, never substitute. |

If the template you produce contains no `{$...}` placeholders at all, you have
written an answer rather than a template. Start over.

## Currency note

The cookbook predates the tool-use API. Its fifth example teaches function calling
via `<function_call>` XML tags and a text-parsed `<function_result>`. That pattern is
superseded — the Messages API has native `tool_use` / `tool_result` blocks.

Keep this in mind when the requested task involves tools: take the example's
*structure* (scratchpad before acting, handle the error case, refuse tools you were
not given) but do not reproduce its XML function-call transport. Say so in a note
under the generated template rather than silently modernising it.

The `[YES]`/`[NO]` string-prefix convention in the second example is likewise dated;
prefer a structured output or a tagged answer for anything that needs parsing.
Files in this package (2)
  • SKILL.md 4 KB
  • reference/metaprompt.md 25 KB

Versions

RepositoryScoreLicence
This page · kjgarza/marketplace-claude100MIT
jairotorregrosa/jaiskills100MIT

Database snapshot: 13.11.2026 · package version e490cad9893b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 98add-prompt
    Scaffold a new MCP prompt template. Use when the user asks to add a prompt, create a reusable message template, or define a prompt for LLM interactions.
  • 100antml-prompt-writer
    Writes system prompts and meta prompts for Claude-based harnesses that use AntML (Anthropic Markup Language): function-calling syntax, thinking blocks, citations, artifacts, sub-agent spawning, and the metaprompt method. Use whenever the user wants to write, review, or improve a…
  • 100prompt-to-skill
    Converts a prompt a user runs repeatedly into a reusable, paid-quality SKILL.md. Use when someone says "I keep pasting this prompt", "turn this prompt into a skill", "package this workflow", or has a recurring task pattern they want portable across projects and sessions. Do NOT…
  • 95brain-prompt
    Metaprompting assistant — "/brain-prompt <rough idea>" turns a rough ask into "the right prompt": a complete, tuned master prompt with SPARC phases, per-phase rubrics, standing rules, and cost guardrails, ready to paste or run. Use when the user says "/brain-prompt", "brain…
  • 100promptctl
    Manage reusable prompts with the promptctl CLI: template-based prompt engineering, prompt generation, and scoring a prompt before it ships. Use when the user wants to "write a reusable prompt", "score this prompt", "turn this into a prompt template", "share prompts across…
  • 100promptctl
    Manage reusable prompts with the promptctl CLI: template-based prompt engineering, prompt generation, and scoring a prompt before it ships. Use when the user wants to "write a reusable prompt", "score this prompt", "turn this into a prompt template", "share prompts across…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.