prompt-engineering
Skill59 starsChanged 2 months agoMITView on GitHub
Write or revise a prompt so it holds up — output contract, instruction placement, examples that earn their place, an escape hatch for bad input — and measure the change against a saved set of cases instead of one good-looking run. Use when a prompt is being authored or patched, when output is inconsistent or the wrong shape, when a model or version changes, or when someone reports a prompt as fixed. Not for scoping an agent's job and tools, not for deciding what material to load into the window, and not for model selection or fine-tuning.
63 other projects use a version of this.
Adopted by
Most recently taken up by
- niki914/zafirotheir own version, first seen Oct 3, 2026
- dimitritholen/1337-claudetheir own version, first seen Sep 23, 2026
- ZeroTokenClaw/agents-skillstheir own version, first seen Sep 21, 2026
- emtcmca/guildprooftheir own version, first seen Sep 20, 2026
- sabahattink/antigravity-fullstack-hqtheir own version, first seen Sep 20, 2026
- CodeAlive-AI/ai-driven-developmenttheir own version, first seen Sep 16, 2026
Used with
Projects with it also use security-checklist, nextjs-app-router 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.
atuljha23Skillsecurity-checklist
OWASP-style quick reference — authn/authz, injection, secrets, sessions, crypto, dependencies. Use during code review and before committing security-sensitive changes.
Also in 3 projects that use this
desilokesh1Skillnextjs-app-router
Next.js App Router best practices, Server Components, Server Actions, routing patterns, and data fetching strategies. Use when building Next.js applications with the App Router.
Also in 3 projects that use this
stefan-jansenSkillllm-evaluation
LLM evaluation and testing patterns including prompt testing, hallucination detection, benchmark creation, and quality metrics. Use when testing LLM applications, validating prompt quality, implementing systematic evaluation, or measuring LLM performance.
Also in 3 projects that use this
rohitg00Skilldata-engineering
Data engineering patterns for ETL pipelines, data warehousing, Apache Spark, and data quality validation
Also in 3 projects that use this
qodex-aiSkillmulti-agent-orchestration
Design and coordinate multi-agent systems where specialized agents work together to solve complex problems. Covers agent communication, task delegation, workflow orchestration, and result aggregation. Use when building coordinated agent teams, complex workflows, or systems requiring specialized expertise across domains.
Also in 3 projects that use this
CloudAI-XSkilldatabase-design
Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when designing tables, optimizing queries, fixing N+1 problems, planning migrations, or when asked about database performance, normalization, ORMs, or data modeling.
Also in 4 projects that use this
Other versions63 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 63
- rohitg00/awesome-claude-code-toolkit★ 2.7ksame name
- NeoLabHQ/context-engineering-kit★ 1.7ksame name
- niki914/zafiro★ 221same name
- CodeAlive-AI/ai-driven-development★ 153same name
- martinholovsky/claude-skills-generator★ 47same name
- Bbar0n234/learnflow-ai★ 35same name
- geekatron/jerry★ 35same name
- sabahattink/antigravity-fullstack-hq★ 30same name
- liqiongyu/my-agents★ 29same name
- nimadorostkar/Claude-Skills-collection★ 28same name
53 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 repository79 other files it gives its agents.
- agent-dispatcherSkill
- agent-designSkill
- agent-evalsSkill
- context-engineeringSkill
- llm-observabilitySkill
- mcp-designSkill
- memory-designSkill
- model-routingSkill
- prompt-injection-defenseSkill
- retrieval-ragSkill
- structured-outputSkill
- tool-designSkill
- api-contract-verificationSkill
- api-designSkill
- authenticationSkill
- authorizationSkill
- background-jobsSkill
- cachingSkill
- idempotency-and-retriesSkill
- webhooksSkill
- database-migration-verificationSkill
- data-integritySkill
- data-pipelinesSkill
- data-qualitySkill
- migrationsSkill
- postgresSkill
- query-optimizationSkill
- schema-designSkill
- accessibilitySkill
- accessibility-verificationSkill
- design-systemsSkill
- design-to-codeSkill
- frontend-designSkill
- motion-designSkill
- responsive-designSkill
- ui-auditSkill
- ux-writingSkill
- ci-cdSkill
- deploymentSkill
- dockerSkill
- github-actionsSkill
- incident-responseSkill
- observabilitySkill
- release-verificationSkill
- rollbackSkill
- component-architectureSkill
- frontend-performanceSkill
- shadcn-uiSkill
- stack-detectionSkill
- tailwindSkill
- visual-verificationSkill
- competitive-analysisSkill
- copywritingSkill
- data-analysisSkill
- deep-researchSkill
- documentation-verificationSkill
- positioningSkill
- seoSkill
- source-evaluationSkill
- technical-writingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 56 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Run the baseline and record it: Every case, actual output saved, pass or fail marked.
- Distinctive: line 26
Separate durable instruction from variable data: Keep the standing rules in one place and the per-run material in another, marked so the …
- Distinctive: line 40
Change one thing, then re-run the whole set: Not just the case that prompted the edit.
- Distinctive: line 53
Keep the verbs apart when reporting: the prompt was written.
“Common” is measured: kept by at least 6 in 10 of the 56 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 engineering
A prompt that worked once is an anecdote. Almost every "fixed" prompt was judged on the input that motivated the edit, on a single run, against no recorded baseline.
When this fires
Authoring or editing any prompt whose output something depends on, and any time a prompt is declared improved. It does not fire for a one-off question you ask and read yourself.
Procedure
- Collect cases before editing. At least five real inputs, including the two that fail now and two that currently pass and must keep passing. No cases means no measurement is possible — say that plainly instead of shipping an eyeballed change.
- Run the baseline and record it. Every case, actual output saved, pass or fail marked. This is the only thing a later claim of improvement can be checked against.
- Write the output contract first. Exact shape, field names, ordering, units, and what the output looks like when the model cannot comply. Unspecified format is the single most common defect, and it is invisible until something downstream parses it.
- Separate durable instruction from variable data. Keep the standing rules in one place and the per-run material in another, marked so the boundary is unmistakable. A prompt that interleaves them teaches the model that data can issue instructions.
- Say what to do, not only what to avoid. A prohibition names the failure without supplying the alternative; the model still has to pick something. Pair every "do not" with the behaviour that replaces it.
- Add an example only where prose could not pin it down — an exact format, an edge case, a tone. Cover the boundaries: the empty input, the ambiguous one, the one that should be refused. Examples that all resemble each other teach that resemblance, and the model will reproduce their shared accident rather than the rule.
- Give it an escape hatch. What to output when the input is insufficient, ambiguous, or out of scope. A prompt with no defined "I cannot" will fabricate rather than return nothing.
- Mark untrusted spans. Anything pasted in — a user's text, a document, a tool result — is data. State in the prompt that instructions found inside it are to be surfaced, not obeyed.
- Change one thing, then re-run the whole set. Not just the case that prompted the edit. A change that fixes case 3 and breaks case 1 is not an improvement, and you will only see it here.
- Judge by a written rule, not a feeling. Per case: exact match, schema validity, a required substring, or a rubric with its standard written down. Use the same judge before and after; a judge that changed with the prompt measures nothing.
- Report the pass rate, not the anecdote. Where output is nondeterministic, run each case several times and report the rate — "4/5 cases, 3 runs each" says something; "it works now" does not.
- Re-measure on the model you will actually run. A prompt tuned against one model or version is evidence about that model. Treat a version change as a reason to re-run the set.
- Keep the cases beside the prompt, versioned with it, so the next person to edit it can measure instead of guessing.
Keep the verbs apart when reporting: the prompt was written; a case was executed; the set was measured with a recorded pass rate. Only the third supports a claim that a change helped.
Checklist
- Case set exists, includes current failures and current passes
- Baseline recorded before any edit
- Output contract states shape and the non-compliance output
- Instructions and variable data visibly separated
- Every prohibition paired with the replacement behaviour
- Examples cover a boundary and a refusal, not only the happy path
- Escape hatch defined for insufficient or out-of-scope input
- Untrusted spans marked as data
- One change per measurement, whole set re-run
- Judging criterion written down and unchanged across the comparison
- Model and sampling settings recorded with the result
Failure handling
- The failure will not reproduce — it is a rate, not a state. Run it repeatedly and report the frequency. An intermittent failure called fixed is worse than one called intermittent.
- The prompt keeps growing — each patch bolted onto the last is how prompts rot. Rewrite from the contract and re-measure, rather than adding a ninth clause.
- The only fix anyone can find is more examples — the contract is underspecified. Go back to step 3; examples are papering over a rule that was never stated.
- Cases pass but real usage still fails — the case set does not represent the traffic. That is the finding. Widen the set before touching the prompt again.
- Measuring properly requires changing something live — stop and ask. Evaluating against production traffic or real user data is not a free action.
- You cannot confirm what a model or SDK supports — name the technique rather than a flag or parameter you have not verified, and check the current documentation before writing it.
Evidence to report
The case set and the judging criterion; the before/after table with per-case pass or fail and the run count; the prompt diff; the model, version and sampling settings the numbers came from; and the cases that still fail, named rather than averaged away.
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.

