meta-prompt-optimizer

meta-prompt-optimizer is a skill for Claude Code from theagenticguy/erpaval. It costs 230 tokens per session (2,264 once invoked), scanned A, original, MIT.

A method for reviewing and rewriting prompts for Claude Opus 4.7. It produces a scored review and a revised version based on documented instruction-following guidance.

In plain words
What is it for?
Use it to improve system prompts, repository instruction files, agent definitions, commands, templates, and structured prompt code.
Why use it?
It helps find unclear, conflicting, or overly forceful instructions that can make an AI follow a prompt inconsistently. The rewrite turns the review into a more precise prompt.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions Claude Code.

Part of the erpaval plugin — 11 skills, 1 agent, 3 hooks, 5 MCP servers shipped together

Good fit Use it to improve system prompts, repository instruction files, agent definitions, commands, templates, and structured prompt code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/theagenticguy/erpaval/meta-prompt-optimizer
Install

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.

Any agent
npx skills add theagenticguy/erpaval --skill meta-prompt-optimizer
Clone the repo
git clone --depth 1 https://github.com/theagenticguy/erpaval

Made for: Claude Code.

Or install erpaval, the plugin that ships this one along with the rest of its 11 skills, 1 agent, 3 hooks, 5 MCP servers.

Wrote 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.

agentmods badge for meta-prompt-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/theagenticguy/erpaval/meta-prompt-optimizer.svg)](https://agentmods.dev/skills/theagenticguy/erpaval/meta-prompt-optimizer)
Your own site
<a href="https://agentmods.dev/skills/theagenticguy/erpaval/meta-prompt-optimizer"><img src="https://agentmods.dev/badge/skills/theagenticguy/erpaval/meta-prompt-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 230 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,264 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00230 $0.02264
Opus 5 $0.00115 $0.01132
Sonnet 5 $0.00046 $0.00453
Haiku 4.5 $0.00023 $0.00226

Measured 8d ago against content hash 6bb2e596813b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

meta-prompt-optimizer 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 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (evals/fixtures/bad-zod-tools.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/meta-prompt-optimizer/SKILL.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Contents

File When to load
references/opus-4-7-principles.md Core prompting principles and the 4.7-specific behavior shifts
references/rubric.md Scoring rubric — shared with the prompt-critic agent
references/rewriting-patterns.md Before/after transformation patterns with worked examples
references/target-types.md Type-specific guidance (CLAUDE.md, agents, commands, Jinja2, Pydantic/Zod)

The prompt-critic agent in this plugin shares the same rubric and is the right tool when the user wants a scored assessment without a rewrite.

Meta-prompt optimizer

Audit and rewrite prompts so they work well on Claude Opus 4.7. Every run produces two deliverables: a scored audit (what's wrong and why) and a rewritten prompt that applies the fixes.

The guidance is grounded in Anthropic's official prompting best-practices doc for the Claude 4.x family, with emphasis on the Opus 4.7-specific behavior shifts (literal instruction following, adaptive thinking, effort-driven calibration, dialed-back emphasis language, positive framing).

The three modes

The user's request determines which mode to run.

Mode Trigger Output
Audit only "review this prompt", "critique this", "is this any good?", "score this" Structured audit report (pass/fail per rubric item + notes)
Audit + rewrite "improve this", "rewrite for 4.7", "optimize this", "fix this prompt" Audit report + revised prompt + changelog
Draft from intent "write a system prompt that…", "draft an agent for…", "give me a CLAUDE.md for…" New prompt written against the rubric from the start

Read the full file on GitHub · 185 lines

Changes

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.

  1. 8d ago First seen · 185 lines · 230 tokens per session scan A 6bb2e596813b

Subscribe to this mod's changes

meta-prompt-optimizer is a skill published in the GitHub repository theagenticguy/erpaval (28 stars, last pushed 3mo ago), licensed MIT. It adds 230 tokens to every session and 2,264 once invoked, about $0.0011 per session on Opus 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-30.

Related

Other skills, from other repositories

langchain-context

Answers questions about the LangChain Python ecosystem — the langchain-ai/langchain monorepo (langchain-core, v1 agents, langchain-classic, in-tree partners, text-splitters) plus companion repos LangGraph, LangSmith SDK, Deep Agents, out-of-tree partner monorepos langchain-google and langchain-aws, and the…

nick-railsback/skill-engine · 101 tokens

ai-integration

Guidelines for building AI-powered features into applications. Covers tool-use agent patterns, Anthropic API integration, prompt engineering for app-internal agents, and best practices. Referenced by planner and generators. Not directly user-invocable.

superduke/ganvil · 51 tokens

agent-platform-prompt-management

Manages and orchestrates prompts in Agent Platform. Use when you need to create, list, retrieve, version, or delete managed prompts in Agent Platform. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform prompts.

google/skills · 55 tokens

ai-engineering-toolkit

6 production-ready AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, and product sense coaching.

sickn33/agentic-awesome-skills · 47 tokens

gemini-api-dev

Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses, background research tasks, function calling, structured output, or migrating from the old generateContent API. Covers SDK usage and best…

google-gemini/gemini-skills · 73 tokens

skill-meta-prompt

Craft better prompts using proven optimization techniques — use when your prompt needs refinement.

nyldn/claude-octopus · 19 tokens