prompt-engineer
Skill106 starsChanged 3 months agoMITView on GitHub
Use when the user asks to improve, optimize, rewrite, debug, or shorten a prompt, or asks why a prompt is producing bad output. Do NOT use for writing a Claude Code SKILL.md — that needs skill structure rules, not prompt techniques.
74 other projects use a version of this, 2 of them edited.
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
- jaskirat1616/grok-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use debugger, technical-writer and 7 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.
JohnJBorenSkilldebugger
Systematic debugging workflows, root cause analysis, and troubleshooting patterns
Also in 3 projects that use this
VercelSkilltechnical-writer
Write, review, and edit developer documentation for SDKs, libraries, and frameworks, including sites such as ai-sdk.dev and chat-sdk.dev. Use for getting-started guides, tutorials, API references, conceptual explanations, integration guides, migration guides, troubleshooting, and code examples.
Also in 3 projects that use this
JetBrainsSkillwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Also in 4 projects that use this
JetBrainsSkilldoc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
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 · 0
None found.
Edited · 2
- yevhens-hue/claude-skills-starter-kit★ 418% same
- jaredhhawk/claude-skills★ 018% same
Wrote their own version · 72
- Jeffallan/claude-skills★ 12ksame name
- elithrar/dotfiles★ 222same name
- chrispangg/deepagentsdk★ 128same 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
- felvieira/claude-skills-fv★ 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 repository4 other files it gives its agents.
- idea-validatorSkill
- linkedin-post-writerSkill
- product-designerSkill
- status-update-writerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 14 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 65 edited versions we read keep these.
14
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 19
If the user pasted a prompt but no failing output, ask for one example of what it produced.
- Distinctive: line 25
Always show before and after.
- Distinctive: line 29
Never add chain-of-thought to a simple generative task like "write a tweet."
- Distinctive: line 30
Never write "be thorough and comprehensive." Name exactly what to cover.
- Distinctive: line 31
Never add a role that does not match the task.
- Distinctive: line 32
Never add a few-shot example below the quality bar you expect back.
- Distinctive: line 33
If the prompt is longer than its expected output on an analytical task, it is too long.
- Distinctive: line 43
If two of three are missing, do not rewrite.
- Distinctive: line 61
If the user provided failing output, use this table instead of guessing.
- Distinctive: line 73
If the prompt is trying to do 3+ distinct things, do not rewrite it — split it into a chain and say so.
- Distinctive: line 117
Diagnosis: No role, no structure, no audience, no scope, no output format.
- Distinctive: line 154
How to test it: Run both versions. The original will open with "Notion is an all-in-one workspace." The rewrite will open with a named …
- Very specific: line 171
Not complete until every box is checked.
- Very specific: line 187
If the prompt turned out to need 3+ chained steps → recommend building it as a skill instead, using templates/SKILL-TEMPLATE.md.
- Distinctive: line 188
If the prompt is one the user runs weekly → recommend turning it into a skill so it stops living in a scratch file.
- Distinctive: line 189
If the underlying task is writing a status update, a LinkedIn post, or a design review → recommend the matching skill rather than a custom …
“Common” is measured: kept by at least 6 in 10 of the 65 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
Diagnose a prompt, rewrite it, and show exactly what changed and why.
Step 0 — Read first
| Source | Path | What to extract |
| The prompt | whatever the user pasted | Actual wording — never paraphrase before diagnosing |
| Failing output | the output they got, if provided | The failure mode; this determines the fix |
| Project context | CLAUDE.md | Audience, product, banned words, output preferences |
| Technique reference | references/techniques.md | Full before/after examples for each technique |
If the user pasted a prompt but no failing output, ask for one example of what it produced. Diagnosing from the prompt alone guesses at the failure mode.
Constraints
Mandatory.
- Always show before and after. The user must see the diff, not just the result.
- Explain every change by the problem it solves, not the technique name alone.
- Preserve the user's intent. Improve how they ask, never what they are asking for.
- Right-size the fix. A 10-line prompt that works beats a 50-line prompt that confuses.
- Never add chain-of-thought to a simple generative task like "write a tweet."
- Never write "be thorough and comprehensive." Name exactly what to cover.
- Never add a role that does not match the task.
- Never add a few-shot example below the quality bar you expect back. Bad examples teach bad patterns.
- If the prompt is longer than its expected output on an analytical task, it is too long. Cut it.
Existence check
Before rewriting, verify:
- The prompt itself — the literal text, not a description of it.
- The goal — what the user wants the output to do or be used for.
- The failure — what the current output gets wrong, ideally with a sample.
If two of three are missing, do not rewrite. Ask for exactly those. Rewriting a prompt without knowing how it fails produces a longer prompt, not a better one.
Step 1 — Diagnose
Score the prompt across these dimensions. Name which ones fail.
| Dimension | What to check |
| Role | Is there a specific persona? Generic "you are an expert" does not count. |
| Context | Does the model have enough background to do the task well? |
| Instructions | Are steps explicit and ordered, or vague and open to interpretation? |
| Output format | Is structure defined — headers, fields, length, tone? |
| Examples | Are there input/output pairs showing what good looks like? |
| Constraints | Are there explicit DO/DON'T rules? Edge cases handled? |
| Evaluation | Can the model self-check its output against clear criteria? |
Step 2 — Match the failure to the fix
If the user provided failing output, use this table instead of guessing.
| Symptom | Cause | Fix |
| Generic, "could be anyone" | Missing role or weak context | Add a specific persona with domain details |
| Misses the point entirely | Ambiguous — model chose a valid but wrong reading | Add a "Your goal is..." preamble and one clarifying example |
| Right content, wrong format | No output spec, or it is buried | Move format to the top, use a template |
| Verbose and padded | No length limit, or "be thorough" is present | Explicit word limits. Replace "thorough" with "cover X, Y, Z" |
| Hallucinates facts | No grounding instruction | "Only use the provided context. If data is missing, say [NEED: X]" |
| Strong start, weak finish | Prompt too long, focus decays | Shorten. Move examples before instructions. Cut redundancy. |
| Ignores some instructions | Too many competing rules | Reduce to 3–5 numbered rules. Add "These rules are mandatory." |
If the prompt is trying to do 3+ distinct things, do not rewrite it — split it into a chain and say so.
Step 3 — Apply techniques
Match technique to the diagnosed problem. Not every prompt needs every technique. Full before/after examples for each are in references/techniques.md.
- Role priming — specific identity with relevant experience
- Structured output — exact fields, order, and length
- Chain of thought — only for multi-step reasoning
- Few-shot examples — 1–3 pairs including one edge case
- Constraints — explicit DO / DON'T
- Evaluation criteria — self-check before responding
- Delimiter separation — separate instructions from input data
Output template
Exact sections, exact order.
## Diagnosis
[2-3 sentences. Which dimensions fail and what that causes in the output.]
## Improved prompt
```
[The full rewritten prompt, copy-pasteable, nothing else in the block]
```
## What changed and why
- [Technique] → [the specific problem it fixes]
- [Technique] → [the specific problem it fixes]
- [Technique] → [the specific problem it fixes]
## How to test it
Run it with [specific input]. You should see [specific difference].
If it still fails, try [fallback].Example
Before:
Write a competitive analysis of Notion.Diagnosis: No role, no structure, no audience, no scope, no output format. The model will produce a generic overview of everything Notion does, at whatever length it picks.
After:
You are a senior product strategist at a B2B knowledge management company competing with Notion.
Analyze Notion's AI features specifically. Structure your analysis as:
1. WHAT THEY BUILT
- Core AI features (list each with one-line description)
- Target user for each feature
- Pricing model for AI features
2. WHAT'S SMART (3 product decisions)
- For each: what they did, why it works, evidence
3. WHAT'S WEAK (3 gaps or friction points)
- For each: the issue, who it affects, opportunity for us
4. IMPLICATIONS
- 2 things we should copy and why
- 2 things we should avoid and why
- 1 opportunity they're missing that we could own
Rules:
- Be specific. "Good UX" is not analysis. Name the interaction and explain why it works.
- If you don't have data, say "[NEED: data on X]" instead of guessing.
- Keep total output under 800 words.What changed and why:
- Role priming → output comes from a strategic angle instead of an encyclopedia entry
- Structured output → every run returns the same four sections, so runs are comparable
- Scope narrowing ("AI features specifically") → prevents a shallow survey of the whole product
- Grounding rule → replaces invented statistics with a visible gap marker
- Length cap → forces selection instead of padding
How to test it: Run both versions. The original will open with "Notion is an all-in-one workspace." The rewrite will open with a named feature and a pricing tier.
Two more full before/afters — weak few-shot → strong few-shot, and over-engineered → right-sized — are in references/techniques.md.
Shortcuts Claude takes
| What Claude might think | Why it's wrong |
| "I'll make it more detailed" | Length is not quality. Most broken prompts get better by cutting. |
| "Add a role to be safe" | An irrelevant role ("world-class neurosurgeon" on a marketing brief) adds noise. |
| "The user knows what changed, skip the diff" | The diff is the teaching. Without it they cannot improve the next prompt themselves. |
| "I'll improve the task while I'm here" | Never change what they are asking for. Only how they ask it. |
| "One example is enough, I'll write it quickly" | A sloppy example teaches sloppiness. The example is the quality bar. |
| "This prompt does five things, I'll just tighten it" | Five things needs a chain, not a tighter paragraph. Say so. |
Exit checklist
Not complete until every box is checked. Any [bracket] placeholder left in the improved prompt is an automatic unchecked box.
- Existence check passed, or missing inputs requested
- Diagnosis names the specific failing dimensions
- Improved prompt is in one clean code block, copy-pasteable
- Every change is listed with the problem it fixes
- The improved prompt preserves the user's original intent
- Length is proportionate to the task — no bloat added
- No banned filler ("be thorough and comprehensive")
- Any few-shot example meets the quality bar expected back
- A concrete test input and expected difference are given
- A fallback is named for if it still fails
- No placeholders remain
Next
- If the prompt turned out to need 3+ chained steps → recommend building it as a skill instead, using
templates/SKILL-TEMPLATE.md. - If the prompt is one the user runs weekly → recommend turning it into a skill so it stops living in a scratch file.
- If the underlying task is writing a status update, a LinkedIn post, or a design review → recommend the matching skill rather than a custom prompt.
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.

