prompt-engineering
Skill4 starsChanged 3 months agoMITView on GitHub
Prompt engineering workflow for designing, rewriting, debugging, evaluating, and optimizing LLM prompts, system prompts, developer prompts, few-shot examples, structured-output instructions, tool-use prompts, and prompt eval cases. Use when prompt behavior, reliability, safety, cost, latency, or model fit is the main task. Do not use for generic prose editing, model selection alone, or ordinary documentation work with no prompt artifact.
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
- nahid-sparktales/agent-dispatchertheir 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
Used with
Projects with it also use security-checklist, nextjs-app-router and 9 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
- nahid-sparktales/agent-dispatcher★ 59same 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
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 repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agentic-sdlc-improvementSkill
- agentic-sdlcSkill
- agent-skill-generatorSkill
- agents-md-generatorSkill
- backend-guidanceSkill
- backend-systems-guidanceSkill
- chrome-devtools-axiSkill
- coding-guidance-bashSkill
- coding-guidance-cppSkill
- coding-guidance-goSkill
- coding-guidance-go-tuiSkill
- coding-guidance-pythonSkill
- coding-guidance-qtSkill
- context-engineeringSkill
- deepseek-harnessSkill
- design-md-authorSkill
- development-contract-processSkill
- development-contract-repo-overlay-templateSkill
- development-contract-systemSkill
- documenter-coauthoringSkill
- documenterSkill
- dream-thinkingSkill
- fuse-skillsSkill
- go-testing-with-testifySkill
- jekyllSkill
- lighthouseSkill
- playwright-testingSkill
- project-config-and-testsSkill
- project-core-devSkill
- project-platform-diagnoseSkill
- project-release-maintainerSkill
- project-vendor-boundarySkill
- recursive-thinkingSkill
- security-identity-accessSkill
- securitySkill
- setup-playwrightSkill
- story-clarifierSkill
- story-implementation-plannerSkill
- story-repo-scoutSkill
- story-to-plan-orchestratorSkill
- tester-mindsetSkill
- thinkingSkill
- ui-design-guidanceSkill
- ui-guidanceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 17 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 56 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Treat prompts as small behavioral specs.
- Distinctive: line 19
Use the smallest useful output.
- Distinctive: line 36
Use direct instructions for simple tasks, structured sections for context control, few-shot examples for format or judgment calibration, …
- Distinctive: line 41
Put task, context, constraints, examples, tools, and output format in separate labeled sections.
- Distinctive: line 46
Test representative, edge, adversarial, and regression cases.
- Distinctive: line 63
create or revise a system prompt, developer prompt, tool-use prompt, few-shot examples, structured-output instruction, grader prompt, or …
- Distinctive: line 79
When the session provides an OpenAI docs skill or official-doc tool, use it for OpenAI-specific current model, API, structured-output, …
- Distinctive: line 84
Add a testing workflow when the main job is test strategy, evidence quality, grading design, or acceptance criteria rather than prompt …
- Very specific: line 86
Use security first when prompt injection, hidden-instruction leakage, unsafe tool use, data exposure, or trust boundaries dominate the risk.
- Distinctive: line 96
Put the user's real task first.
- Distinctive: line 98
Prefer explicit success criteria over broad "be better" instructions.
- Distinctive: line 109
Use examples that demonstrate decisions, not examples that merely repeat the instruction.
- Distinctive: line 113
Keep prompts short enough to maintain.
- Distinctive: line 115
Verify current official provider guidance before making model- or API-specific claims.
- Distinctive: line 117
Treat provider guidance as conditional.
- Distinctive: line 128
Examples that contradict instructions: when a few-shot demo violates a rule, the prompt supplies conflicting signals.
- Distinctive: line 135
Put explanations in schema fields or a separate supported output channel when the consumer needs both.
- Distinctive: line 140
When a prompt fails, classify the failure before rewriting:
“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
Treat prompts as small behavioral specs. Improve them by naming the job, testing the behavior, changing one important thing at a time, and preserving the prompt's operating context.
Activity And Authority
- For review, return findings and evidence without rewriting files or changing a deployed prompt. A proposed revision may accompany findings when requested.
- For drafting or implementation, change the requested prompt artifact within existing authority. Separate local evaluation from deployments, live tool actions, sensitive-data use, and metered runs that need additional authority.
- Use the smallest useful output. A short rewrite need not produce a formal experiment report; a consequential behavior change needs explicit cases and honest evidence.
Core Workflow
- Scope the prompt job. Identify the target model or provider, audience, runtime surface, inputs, tools, output contract, constraints, and where the prompt will live. If the prompt belongs to a repo, inspect existing prompts, schemas, examples, tool definitions, evals, logs, and docs before asking avoidable questions.
- Define success before rewriting. State the desired behavior, hard requirements, acceptable variation, known failure modes, and evidence that would prove the prompt improved. If success is vague, establish representative cases and meaningful failure criteria before editing. Preserve baseline cases and explain changed expectations.
- Choose the lightest pattern that fits. Use direct instructions for simple tasks, structured sections for context control, few-shot examples for format or judgment calibration, schemas for machine-readable output, tool-use instructions for action boundaries, and repetition only when the model repeatedly drops critical constraints.
- Draft with clean boundaries. Put task, context, constraints, examples, tools, and output format in separate labeled sections. Delimit user-controlled or retrieved content clearly. Keep stable instructions before variable content when prompt caching, reuse, or maintainability matters.
- Evaluate against reality. Test representative, edge, adversarial, and regression cases. Compare outputs against explicit criteria instead of intuition. Record which failures changed and which remained. If execution is unavailable, label the assessment as static and name the material untested behavior; do not invent run results.
- Iterate deliberately. Change one major variable at a time: instruction wording, context ordering, examples, output schema, tool contract, reasoning guidance, or model settings. Preserve the previous prompt and test cases until the new version wins on the target criteria.
- Ship the prompt with evidence. Return the final prompt, assumptions, changed behavior, eval cases, expected outputs or grading criteria, remaining risks, and any provider-specific settings the caller must preserve.
When To Use
- design, rewrite, debug, or review an LLM prompt
- create or revise a system prompt, developer prompt, tool-use prompt, few-shot examples, structured-output instruction, grader prompt, or prompt eval set
- investigate why a prompt is unreliable, unsafe, too costly, too slow, or mismatched to a target model
- optimize an existing prompt while preserving behavior and evidence
Not For
- model selection alone
- generic prose editing, README writing, marketing copy, or voice matching
- ordinary LLM integration code when the prompt behavior is not the main issue
- security review where data exposure, authorization, tenant isolation, or tool abuse is the central risk
Compose With
- When the session provides an OpenAI docs skill or official-doc tool, use it for OpenAI-specific current model, API, structured-output, tool-calling, reasoning, caching, or pricing behavior; otherwise verify official OpenAI docs directly. For other providers, verify current official provider docs when those details affect the prompt.
- Add a testing workflow when the main job is test strategy, evidence quality, grading design, or acceptance criteria rather than prompt wording.
- Use
securityfirst when prompt injection, hidden-instruction leakage, unsafe tool use, data exposure, or trust boundaries dominate the risk; retain this skill for prompt-behavior mechanics. - Ownership rule with
context-engineering: picking which facts, files, or examples to load iscontext-engineering; deciding how to word the prompt, schema, or example is this skill. When work spans both, draft the context packet first, then own the prompt artifact here.
Prompt Design Rules
- Put the user's real task first; do not optimize a prompt before the objective and failure mode are clear.
- Prefer explicit success criteria over broad "be better" instructions.
- Separate stable policy from per-request data and untrusted content. When the
prompt embeds retrieved or user-supplied material, fence it with explicit
delimiters (e.g.
<<untrusted:source>> ... <</untrusted>>, matching thecontext-engineeringconvention) and tag fact provenance with[src:code|user|tool|docs|memory|inferred]when provenance affects judgment. These conventions aid inspection; they do not enforce trust or authorization. Grade permitted extraction or quotation separately from obeying embedded instructions, disclosing protected content, or taking unauthorized actions. - Specify output shape with examples or schemas when downstream code depends on structure.
- Use examples that demonstrate decisions, not examples that merely repeat the instruction.
- Include negative and boundary cases when failure would be costly, silent, or hard to notice.
- Keep prompts short enough to maintain; move large context to retrieval, tools, files, or references when possible.
- Verify current official provider guidance before making model- or API-specific claims. Do not rely on memory for rapidly changing model behavior.
- Treat provider guidance as conditional. Load provider notes only when the target model, API, or runtime surface makes them relevant.
Anti-Patterns
Prompts that look polished but fail in practice:
- Over-explanation: redundant instructions increase context cost and can obscure priorities; verify the effect rather than assuming how a model works.
- Role stacking: layering "you are an expert X, careful Y, helpful Z" before the task without evidence that the roles improve the target behavior.
- Examples that contradict instructions: when a few-shot demo violates a rule, the prompt supplies conflicting signals; repair the conflict and test.
- Repetition without structure: restating constraints in prose instead of putting them in a labeled section or schema.
- Vague quality bars: "be helpful", "be thorough", "use best practices" without observable criteria.
- Schema mixed with freeform: requesting prose outside a JSON-only contract. Put explanations in schema fields or a separate supported output channel when the consumer needs both.
Failure Diagnosis
When a prompt fails, classify the failure before rewriting:
- missing context: the model did not receive facts it needed
- ambiguous instruction: multiple reasonable outputs satisfy the prompt
- weak output contract: format, fields, or refusal behavior are underspecified
- bad examples: examples teach the wrong pattern or conflict with rules
- context collision: retrieved, user, or tool content overrides intent
- tool boundary drift: the model calls tools too early, too late, or with bad arguments
- model mismatch: the prompt assumes capabilities, settings, or reasoning behavior the model does not provide
- evaluation gap: the prompt looks better on anecdotes but fails representative cases
Output Shapes
Omit Original Prompt Or Version and Run Metadata for tiny rewrites when
they are unavailable or not material.
For a prompt rewrite:
## Original Prompt Or Version
...
## Final Prompt
...
## What Changed
...
## Eval Cases
...
## Run Metadata
...
## Assumptions And Risks
...For prompt debugging:
## Diagnosis
Failure category and evidence.
## Original Prompt Or Version
...
## Revision
Changed prompt section or full prompt.
## Validation
Cases that should pass, fail, or remain uncertain.
## Run Metadata
...Reference Map
- patterns-and-provider-notes.md - prompt patterns, primary references, and provider-specific notes.
- evaluation-flywheel.md - lightweight prompt eval design, iteration, and grading workflow.
- trigger-evals.md - positive and negative trigger checks for this skill.
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.

