prompt-engineer
Skill22 starsChanged 3 months agoMITView on GitHub
Designs, refines, and systematically evaluates LLM prompts using structure, role framing, few-shot examples, explicit output contracts, and reasoning scaffolds. Use this skill when the user wants to write or improve a prompt, build a system prompt, craft few-shot examples, reduce hallucination or refusals, enforce a JSON/structured output, design an LLM-as-judge or eval rubric, debug inconsistent or low-quality model outputs, or compare prompt variants ("optimize this prompt", "why is the model ignoring my instructions", "make it return valid JSON", "write a prompt that...", "evaluate these prompts").
74 other projects use a version of this.
Adopted by
Most recently taken up by
- santiago-migoni/claude-skillstheir own version, first seen Nov 8, 2026
- wanghongN/SkillsRepotheir own version, first seen Nov 8, 2026
- AxlZero21/Skillstheir own version, first seen Nov 8, 2026
- joe-qai/qa-skillstheir own version, first seen Nov 8, 2026
- lsyamsiar/claude-skillstheir own version, first seen Nov 1, 2026
- tjmustard/eta-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use idea-validator, debugger and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
dipaulavsSkillidea-validator
Validates app ideas before building. Analyzes market saturation, competitors, real demand vs stated interest, solo builder feasibility (2-4 weeks timeline), and monetization potential. Use when user asks to validate an idea, evaluate a concept, check if idea is worth building, or before starting a new project.
Also in 3 projects that use this
JohnJBorenSkilldebugger
Systematic debugging workflows, root cause analysis, and troubleshooting patterns
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
StrayDragonSkillui-ux-pro-max
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.
Also in 4 projects that use this
Other versions74 projects use a version of this.
Word for word · 2
- JayRHa/agent-skills★ 12100% same
- JayRHa/AgentSkills★ 12100% same
Edited · 0
None found.
Wrote their own version · 72
- Jeffallan/claude-skills★ 12ksame name
- elithrar/dotfiles★ 222same name
- chrispangg/deepagentsdk★ 128same name
- aakashg/pm-claude-skills★ 106same name
- thedesignproject/agent-skills★ 88same name
- OpenCoven/coven★ 75same name
- monaccode/astromesh★ 39same name
- joe-qai/qa-skills★ 30same name
- jshsakura/awesome-opencode-skills★ 30same name
- Fandry96/k3-agentic-skills★ 27same name
62 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository194 other files it gives its agents.
- 0-templateSkill
- ab-test-analyzerSkill
- academy-guideSkill
- add-to-my-skillsSkill
- adr-authorSkill
- ai-tools-setupSkill
- algorithmic-artSkill
- api-and-interface-designSkill
- api-designerSkill
- api-docs-writerSkill
- apple-store-submitSkill
- aws-cost-optimizerSkill
- bash-script-hardeningSkill
- blog-post-writerSkill
- book-summarizerSkill
- branch-cleanupSkill
- brand-copy-landingSkill
- brand-copySkill
- brand-designSkill
- brand-guidelinesSkill
- browser-testing-with-devtoolsSkill
- canvas-designSkill
- changelog-generatorSkill
- changelog-keeperSkill
- chart-chooserSkill
- ci-cd-and-automationSkill
- ci-fix-loopSkill
- claude-apiSkill
- cloudflare-block-countriesSkill
- coderabbitloopSkill
- code-review-and-qualitySkill
- code-reviewerSkill
- code-simplificationSkill
- codexloopSkill
- comms-notionSkill
- comms-slackSkill
- comms-whatsappSkill
- competitive-analysisSkill
- concept-explainerSkill
- constraint-driven-developmentSkill
- context-engineeringSkill
- context-repoSkill
- cover-letter-writerSkill
- crash-courseSkill
- cron-schedulerSkill
- data-digestSkill
- data-pipeline-architectSkill
- debug-detectiveSkill
- debugging-and-error-recoverySkill
- decision-matrixSkill
- dependabot-triageSkill
- dependency-upgraderSkill
- deprecation-and-migrationSkill
- dev-instantdbSkill
- discernment-nudgeSkill
- doc-coauthoringSkill
- dockerfile-proSkill
- docs-index-keeperSkill
- documentation-and-adrsSkill
- docxSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 9 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 63 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Use this skill whenever the user is authoring, debugging, or comparing prompts — not when they need a finished answer to the underlying …
- Distinctive: line 17
USE: "Write/improve a prompt", "make output reliably JSON", "model ignores instructions", "build an eval for my prompt", "pick few-shot …
- Distinctive: line 18
DON'T USE: the user just wants the task done once (answer the question directly).
- Distinctive: line 21
Follow these steps in order.
- Very specific: line 26
Add an output contract: If a machine reads the output, specify an exact schema, give a filled example, and instruct "output only the JSON, …
- Distinctive: line 27
Add reasoning scaffold only if needed: Use step-by-step / decomposition for multi-step reasoning.
- Very specific: line 30
Build an eval: Create a small golden set (10-50 cases) and a scoring method (exact match, rubric, or pairwise LLM-judge).
- Distinctive: line 34
Put these in roughly this order.
- Distinctive: line 50
Give an out: Always tell the model what to do when it can't comply, or it will hallucinate.
- Distinctive: line 55
Keep stable instructions in the system prompt.
- Distinctive: line 56
Prefer machine-checkable output (JSON, enum labels) so evals can be automated.
“Common” is measured: kept by at least 6 in 10 of the 63 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Prompt Engineer
Overview
This skill turns vague intent into a precise, testable prompt and provides a repeatable loop for measuring and improving prompt quality. It covers prompt anatomy, role/system framing, few-shot example selection, output contracts (JSON/schema), reasoning scaffolds (chain-of-thought, decomposition), and rigorous evaluation (golden sets, rubrics, LLM-as-judge, pairwise comparison).
Keywords: prompt engineering, system prompt, few-shot, chain-of-thought, output format, JSON mode, structured output, hallucination, refusal, LLM-as-judge, eval rubric, prompt optimization, A/B prompt, temperature, prompt template.
Use this skill whenever the user is authoring, debugging, or comparing prompts — not when they need a finished answer to the underlying question itself.
When to use vs. not
- USE: "Write/improve a prompt", "make output reliably JSON", "model ignores instructions", "build an eval for my prompt", "pick few-shot examples", "reduce hallucinations".
- DON'T USE: the user just wants the task done once (answer the question directly). Only invoke prompt engineering when the prompt artifact is the deliverable or the problem.
Process
Follow these steps in order. Skip a step only with a stated reason.
- Clarify the job. Pin down: the task, the consumer of the output (human vs. parser/code), success criteria, hard constraints (length, format, forbidden content), and failure modes seen so far. If two or more of these are unknown and the prompt is non-trivial, ask before writing.
- Choose the prompt pattern. Match the task to a pattern using the table in
references/patterns.md(extraction, classification, generation, transformation, agentic/tool-use, judge). The pattern dictates structure and which scaffolds matter. - Draft with the anatomy. Assemble the prompt from the canonical sections below. Put durable instructions in the system prompt; put per-request data in the user message.
- Add an output contract. If a machine reads the output, specify an exact schema, give a filled example, and instruct "output only the JSON, no prose". See
references/output-contracts.md. - Add reasoning scaffold only if needed. Use step-by-step / decomposition for multi-step reasoning. Keep reasoning OUT of structured output (use a separate field or a scratchpad you discard).
- Select few-shot examples (2-5) that cover edge cases and the exact target format. Order matters; cover the hard cases. See
references/few-shot.md. - Set decoding params. Recommend temperature/top-p for the task (deterministic extraction → low temp; creative → higher). See the params table in
references/patterns.md. - Build an eval. Create a small golden set (10-50 cases) and a scoring method (exact match, rubric, or pairwise LLM-judge). Use
scripts/eval_prompts.pyto run variants and compute pass rates. Seereferences/evaluation.md. - Iterate. Change ONE variable at a time, re-run the eval, keep what wins. Record results in the table from
templates/prompt-spec.md.
Prompt anatomy (canonical section order)
Put these in roughly this order; omit sections that don't apply.
- Role / persona — who the model is and its expertise ("You are a senior tax accountant...").
- Task — one imperative sentence of what to do.
- Context / inputs — background, the data to operate on, delimited clearly (XML-style tags or fenced blocks).
- Instructions / rules — numbered constraints, do's and don'ts, edge-case handling.
- Reasoning directive — e.g., "Think step by step in a
<scratchpad>before answering" (only if needed). - Output format — exact schema/shape + a concrete example.
- Examples (few-shot) — input→output pairs demonstrating format and edge cases.
- Guardrails — what to do when uncertain, missing data, or out of scope ("If the document lacks a date, return null — do not guess").
Quick heuristics
- Be specific over polite. Replace "please try to" with direct imperatives.
- Show, don't tell the format: one example beats a paragraph of description.
- Delimit inputs with tags like
<document>...</document>so data can't be confused with instructions (also reduces prompt-injection surface). - Positive instructions ("respond in formal English") work better than negative ("don't be informal"); when you must forbid, also state the desired behavior.
- Give an out. Always tell the model what to do when it can't comply, or it will hallucinate.
- Constrain reasoning location. Let it think, but in a place you can strip, so structured output stays clean.
- One variable per iteration so eval deltas are attributable.
Best Practices
- Keep stable instructions in the system prompt; keep variable data in the user turn (enables prompt caching and cleaner evals).
- Prefer machine-checkable output (JSON, enum labels) so evals can be automated.
- Cover the hardest 20% of cases in few-shot examples; easy cases rarely need demonstration.
- Version every prompt and store eval scores beside it (
templates/prompt-spec.md). - For judges, score on a rubric with a fixed scale and require a short justification field; calibrate the judge against human labels on a few cases.
- Lower temperature for anything parsed downstream; reserve higher temperature for ideation/variety.
Common Pitfalls
- Vague success criteria → unmeasurable prompt; you can't optimize what you don't score.
- Reasoning inside JSON → invalid/parse-failing output; move reasoning to a separate field or scratchpad.
- Conflicting instructions ("be concise" + "be thorough") → unpredictable behavior; rank or reconcile them.
- Overfitting to demo cases → great on examples, poor in production; keep a held-out eval set.
- No uncertainty path → confident hallucinations; always define the "I don't know / null" behavior.
- Changing many things at once → can't tell what helped; isolate variables.
- Eyeballing instead of measuring → confirmation bias; run
scripts/eval_prompts.pyon a golden set.
Bundled resources
references/patterns.md— task→pattern mapping, per-pattern templates, decoding params, anti-injection notes.references/output-contracts.md— enforcing JSON/schema, common failure fixes, validation strategy.references/few-shot.md— how many examples, selection, ordering, formatting.references/evaluation.md— building golden sets, scoring methods, LLM-as-judge, statistical sanity.templates/prompt-spec.md— fill-in spec capturing the prompt, params, and eval results.examples/email-classifier.md— full worked example from vague request to evaluated prompt.scripts/eval_prompts.py— runnable harness that scores prompt variants against a golden set (exact-match and pluggable scorers).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

