prompt-engineering-expert

prompt-engineering-expert is a skill for Claude Code from Miaoge-Ge/coding-agent-skills. It costs 77 tokens per session (969 once invoked), scanned A, original, MIT.

A guide to designing prompts and instructions for AI systems, including structured outputs, examples, and iteration. It focuses on making model behavior more consistent and reducing made-up information.

In plain words
What is it for?
Use it to write or improve system prompts, user prompts, extraction instructions, JSON outputs, and agent behavior. It is also for diagnosing prompt-related failures and refining instructions against test cases.
Why use it?
It helps when an AI response is too vague, too long, inconsistent, or in the wrong format. Clear structure and fixed examples make the intended result easier for the model to follow.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the prompt-engineering-expert plugin — 1 skill shipped together

Good fit Use it to write or improve system prompts, user prompts, extraction instructions, JSON outputs, and agent behavior. It is also for diagnosing prompt-related failures and refining instructions against test cases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/miaoge-ge/coding-agent-skills/prompt-engineering-expert
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 Miaoge-Ge/coding-agent-skills --skill prompt-engineering-expert
Clone the repo
git clone --depth 1 https://github.com/Miaoge-Ge/coding-agent-skills

Made for: Claude Code.

Or install prompt-engineering-expert, the plugin that ships this one along with the rest of its 1 skill.

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 prompt-engineering-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/prompt-engineering-expert/github.svg)](https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/prompt-engineering-expert)
Your own site
<a href="https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/prompt-engineering-expert"><img src="https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/prompt-engineering-expert/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.

agentmods 80×15 button for prompt-engineering-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/prompt-engineering-expert"><img src="https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/prompt-engineering-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 969 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.00077 $0.00969
Opus 5 $0.00039 $0.00485
Sonnet 5 $0.00015 $0.00194
Haiku 4.5 $0.00008 $0.00097

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

Security

Grade A, and why

prompt-engineering-expert 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 10d 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.

plugins/prompt-engineering-expert/skills/prompt-engineering-expert/SKILL.md · 79 lines

How it starts

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

Prompt Engineering Expert

Examples beat adjectives; structure beats length. Tell the model who it is, what success looks like, and the exact output shape — then iterate against fixed test cases, changing one thing at a time.

When to Use

  • Writing or improving a system/user prompt.
  • Inconsistent, off-format, verbose, or low-quality model output.
  • Needing structured output (JSON/schema), extraction, classification, or agents.
  • Reducing hallucination or steering tone/length/reasoning.

When NOT to Use

  • Retrieval/context assembly → rag-expert.
  • Quantitative eval/regression harness → llm-testing-expert.
  • Model training/fine-tuning → deep-learning-expert.
  • Anthropic SDK wiring + caching → claude-api (built-in).

Core Principles

1. Structure the prompt

  • State role, task, and success criteria explicitly. Durable rules → system prompt; the variable task/data → user turn.
  • Separate sections with clear delimiters (markdown headings or XML-like tags <context>…</context>) so instructions, data, and examples don't blur.
  • Be specific about constraints: length, tone, audience, and what to do on ambiguity or missing info. Prefer positive instructions ("respond in valid JSON") over a pile of "don't".

2. Steer with examples & reasoning

  • Few-shot: 2–5 representative, diverse examples that demonstrate the exact format and tricky edge cases. Examples teach format faster than descriptions.
  • For reasoning-heavy tasks, let the model think before answering (chain-of-thought / a scratchpad), but keep the final output concise — or separate reasoning from the user-visible answer.
  • Put the most important instruction near the start or end; long middles get "lost".

3. Reliable structured output

  • For machine consumption, define a strict schema and use the provider's structured-output/JSON mode or tool-calling. Show one example of the exact shape.
  • Provide a fallback so the model doesn't invent values: "if a field is unknown, use null; do not guess."

Read the full file on GitHub · 79 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. 10d ago First seen · 79 lines · 77 tokens per session scan A c7e32f1afd17

Subscribe to this mod's changes

prompt-engineering-expert is a skill published in the GitHub repository Miaoge-Ge/coding-agent-skills (5 stars, last pushed 3mo ago), licensed MIT. It adds 77 tokens to every session and 969 once invoked, about $0.0004 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-31.