prompt-engineering
Skill2 starsChanged 29 days agoMITView on GitHub
Prompt engineering knowledge base distilled and audited from the DAIR.AI Prompt Engineering Guide (promptingguide.ai). Use when writing, debugging, or improving prompts for LLMs; choosing a prompting technique (few-shot, chain-of-thought, self-consistency, ReAct, RAG, prompt chaining, PAL, ToT, Reflexion, meta-prompting); designing agents, tool/function calling, or context engineering; prompting reasoning models; defending against prompt injection, leaking, and jailbreaks; or looking up example prompts, LLM settings (temperature, top-p), and model notes.
85 other projects use a version of this.
Adopted by
Most recently taken up by
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- kazemcodes/skill-treetheir own version, first seen Nov 8, 2026
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- Hoerire/Azurtheir own version, first seen Nov 8, 2026
- Bruno-Cunha-Souza/ValarMindSkillstheir own version, first seen Nov 8, 2026
- LuisSambrano/antigravity-configtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use security-checklist, multi-agent-orchestration and 10 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
javalenciacaiSkillmulti-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 4 projects that use this
xfstudioSkillllm-evaluation
Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.
Also in 3 projects that use this
GoogleSkillcoding-principles
Enforces engineering, architecture, public API, and code quality standards distilled from human reviewer feedback across A2UI pull requests. Use when authoring new code, refactoring, addressing review feedback, or reviewing PR diffs. Don't use for release publishing or spec blueprint generation without code or PR changes.
Also in 3 projects that use this
pproencaSkillrefactoring
Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.
Also in 6 projects that use this
mjunaidcaSkilltool-design
Design tools that agents can use effectively. Use when creating new tools for agents, debugging tool-related failures, or optimizing existing tool sets.
Also in 3 projects that use this
Other versions85 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 85
- trycompai/comp★ 2.1ksame name
- niki914/zafiro★ 346same name
- CodeAlive-AI/ai-driven-development★ 169same name
- grandamenium/cortextos★ 106same name
- nahid-sparktales/agent-dispatcher★ 59same name
- geekatron/jerry★ 37same name
- Bbar0n234/learnflow-ai★ 35same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- sabahattink/antigravity-fullstack-hq★ 30same name
- VoDaiLocz/kilo-kit-mcp★ 28same name
75 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 repository7 other files it gives its agents.
- llms.txtllms.txt
- skills/ai-engineering-from-scratch/llms.txtllms.txt
- skills/arctic-shift/llms.txtllms.txt
- skills/prompt-engineering/llms.txtllms.txt
- ai-engineering-from-scratchSkill
- arctic-shiftSkill
- my-skillSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 75 edited versions we read keep these.
5
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 16
Start with the simplest prompt that could work: clear instruction, specific context, delimiters, explicit output format.
- Distinctive: line 17
If output is wrong, escalate one step at a time: add few-shot examples (format and label space matter more than label correctness) -> …
- Distinctive: line 19
Test against adversarial and edge inputs, including prompt injection if the prompt handles untrusted text.
- Distinctive: line 51
Search or planning puzzles -> Tree of Thoughts.
- Distinctive: line 57
Treat repo example outputs as illustrations, not benchmarks.
- Very specific: line 59
Never exec() model output outside a sandbox (the PAL notebook does).
“Common” is measured: kept by at least 6 in 10 of the 75 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
Source: dair-ai/Prompt-Engineering-Guide at commit 5767372 (2026-03-11), English pages, notebooks, and lecture slides. Everything below was read in full and audited. Reference files carry templates, examples, caveats, and per-file "Audit notes".
Read first: the guide is mostly a 2022 to early-2024 snapshot (GPT-3.5, text-davinci-003, GPT-4, Mixtral era). Technique concepts hold up. Model-specific claims, prices, benchmarks, and code samples do not. See references/audit-summary.md before trusting any date-bound claim.
Workflow for writing or fixing a prompt
- Define the task, the output format, and how you will judge success. Without a check, you can't tell if a rewrite helped.
- Start with the simplest prompt that could work: clear instruction, specific context, delimiters, explicit output format. Say what to do rather than what to avoid. Specificity beats length.
- If output is wrong, escalate one step at a time: add few-shot examples (format and label space matter more than label correctness) -> reasoning (CoT, or a reasoning model) -> decomposition (prompt chaining) -> tools or retrieval (PAL, ReAct, RAG) -> fine-tuning.
- Set parameters deliberately: low temperature/top-p for factual or extraction tasks, higher for creative tasks. Change one of temperature or top-p, not both.
- Test against adversarial and edge inputs, including prompt injection if the prompt handles untrusted text.
- Iterate on a fixed test set. A single lucky run proves nothing. The repo's own bias and exemplar-order examples are single-run, so don't copy that.
Where to look
| Need | File |
| Prompt elements, settings, tips, basic examples | references/fundamentals.md |
| Pick or apply a technique (decision table + templates for 18 techniques) | references/techniques.md |
| Ready-made prompts by task (classification, QA, coding, extraction, summarization, math, reasoning, creativity, image gen) | references/prompt-library.md |
| Agents, workflows vs agents, function calling, deep agents, context engineering | references/agents-and-context-engineering.md |
| Reasoning-model prompting, prompt optimization, deep research, 4o image gen | references/guides-modern.md |
| Prompt injection, leaking, jailbreaks, defenses, biases, factuality | references/risks-and-safety.md |
| Real-world applications and case studies (code gen, synthetic data, fine-tuning, caching, job classification) | references/applications.md |
| Per-model notes (Llama, Mistral, Gemini, GPT-4, Claude 3, Gemma, ...) and chat templates | references/models.md |
| Research digests (RAG surveys, faithfulness, reasoning, tokenization, long context) and paper index | references/research-notes.md |
| Runnable patterns (function calling, PAL, RAG, ReAct, LangChain, caching) with staleness notes | references/notebooks-and-code-recipes.md |
| Lecture slide summary | references/lecture-summary.md |
| Tools, services, datasets, courses, readings | references/resources-catalog.md |
Repo layout and what's in legacy guides/ | references/repo-map.md, references/legacy-guides-diff.md |
| Cross-cutting audit findings (errors, stale items, gaps) | references/audit-summary.md |
Load only the file the task needs. Each starts with a table of contents.
Quick technique picker
- Simple known task -> zero-shot with an explicit format.
- Format or labels wrong -> few-shot.
- Multi-step reasoning on a non-reasoning model -> CoT ("Let's think step by step" or worked exemplars); unstable answers -> self-consistency (sample N, majority vote).
- Exact arithmetic or dates -> PAL (generate code, execute in a sandbox).
- Fresh, private, or hallucination-prone facts -> RAG, or ReAct with search.
- Too complex for one prompt -> prompt chaining.
- Search or planning puzzles -> Tree of Thoughts.
- Agent repeats mistakes with a feedback signal -> Reflexion.
- Reasoning models (o-series style): give a clear goal and constraints and skip manual CoT. The repo says so, though other pages recommend CoT generally. Treat CoT as for non-reasoning models.
Cautions
- Treat repo example outputs as illustrations, not benchmarks. Many came from retired models at temperature 1.
- Known bugs in repo examples: the PAL date exemplar returns
today.strftimeinstead oflater.strftime; the self-consistency bagels exemplar lacks its "The answer is" line; the function-calling notebook double-encodes tool arguments. The reference files carry corrected notes. - Never
exec()model output outside a sandbox (the PAL notebook does). - Several technique pages (DSP, GraphPrompts, Active-Prompt, ART, multimodal CoT, meta-prompting) are stubs. The reference sketches for them are tagged "(not in repo)".
- Gaps in the guide: indirect prompt injection via tool output, MCP, structured outputs, evals, least-to-most, self-refine, chain-of-verification, chunking and reranking for RAG. Use current provider documentation for these.
- Agent and context-engineering pages are one course's opinion and carry promo callouts. Their prompt examples contradict each other (subtask counts, schema types).
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.

