prompt-engineering
Skill1 starsChanged 17 days agoMITView on GitHub
Design and improve prompts for LLM applications, including instruction hierarchy, examples, structured outputs, injection resistance, and measurable prompt iteration.
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 70 edited versions we read keep these.
5
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 9
Create prompts that reliably produce the required behavior across realistic inputs and model variations.
- Distinctive: line 14
Use the smallest sufficient prompt: Remove duplicated rules, vague adjectives, irrelevant context, and instructions the model cannot follow.
- Distinctive: line 15
Specify output: Prefer a schema, field definitions, allowed values, and a clear missing-information policy over vague formatting requests.
- Distinctive: line 16
Add examples selectively: Use representative positive, negative, boundary, and ambiguous examples.
- Distinctive: line 34
Keep a prompt change only when evidence shows a net improvement and no unacceptable regression.
“Common” is measured: kept by at least 6 in 10 of the 70 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
Goal
Create prompts that reliably produce the required behavior across realistic inputs and model variations. Treat prompts as versioned application components, not magic wording.
Workflow
- Define the task contract. Specify audience, input shape, desired output schema, constraints, prohibited behavior, and what success means.
- Separate instructions from data. Delimit user content, retrieved documents, tool output, and examples. Explicitly state that untrusted content is data, not instructions.
- Use the smallest sufficient prompt. Remove duplicated rules, vague adjectives, irrelevant context, and instructions the model cannot follow.
- Specify output. Prefer a schema, field definitions, allowed values, and a clear missing-information policy over vague formatting requests.
- Add examples selectively. Use representative positive, negative, boundary, and ambiguous examples. Ensure examples do not accidentally teach unwanted shortcuts.
- Design abstention. Define when to ask a question, return an explicit unknown, escalate, or decline an unsupported claim.
- Evaluate changes. Compare the candidate prompt with a baseline on a fixed, representative dataset. Change one major variable at a time where possible.
- Version and document. Store prompt templates, model settings, dataset version, evaluation results, and known failure modes together.
Quality checklist
- Are instructions concrete, non-contradictory, and ordered by importance?
- Are factual claims grounded in supplied evidence or an explicitly permitted source?
- Are output fields, types, limits, and error cases defined?
- Are examples diverse and free of sensitive or production data?
- Are prompt injection and instruction-conflict cases tested?
- Is the prompt robust to empty, long, malformed, multilingual, and adversarial inputs?
Iteration protocol
- Establish a baseline before editing.
- Build a small evaluation set from real task patterns, edge cases, and known failures.
- Score task success, format validity, factuality, safety, latency, and cost as relevant.
- Inspect failures individually; aggregate scores can hide catastrophic cases.
- Keep a prompt change only when evidence shows a net improvement and no unacceptable regression.
Avoid
- Repeatedly adding prose without testing.
- Treating chain-of-thought disclosure as a requirement; ask for concise rationale or evidence instead.
- Relying on prompt wording as the only security boundary.
- Embedding secrets, credentials, or personal data in prompts.
- Claiming a prompt is robust based on one successful example.
Deliverable
Return the final prompt, its expected input/output contract, key assumptions, evaluation method, measured results if actually run, and unresolved limitations.
References
- OpenAI prompting guide: https://platform.openai.com/docs/guides/prompt-engineering
- Anthropic prompt engineering: https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview
- OWASP LLM risks: https://genai.owasp.org/llm-top-10/
Other versions79 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 79
- trycompai/comp★ 2.1ksame name
- niki914/zafiro★ 319same name
- CodeAlive-AI/ai-driven-development★ 167same name
- grandamenium/cortextos★ 101same 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
69 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.
Used alongsideProjects with it also use security-checklist, coding-principles 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
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 5 projects that use this
LangChainSkillweb-research
Use this skill for requests related to web research; it provides a structured approach to conducting comprehensive web research
Also in 4 projects that use this
austintgriffithSkillorchestration
Use when a Scaffold-ETH 2 build leaves localhost: planning the launch order, deploying and verifying contracts on a live network, standing up a fork of a real chain to rehearse a deploy, or fixing a contract bug that is already onchain. Not for running the app or a demo against that fork (`/frontend-playbook`).
Also in 3 projects that use this
MicrosoftSkillerror-handling
统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。
Also in 4 projects that use this
In this repository28 other files it gives its agents.
- agent-architecture-designSkill
- agent-evaluationSkill
- agent-harness-engineeringSkill
- agentic-workflow-testingSkill
- agent-memory-designSkill
- browser-computer-useSkill
- durable-agent-workflowsSkill
- human-in-the-loopSkill
- mcp-developmentSkill
- mcp-server-developmentSkill
- multi-agent-orchestrationSkill
- tool-calling-designSkill
- advanced-retrieval-rerankingSkill
- context-engineeringSkill
- embedding-model-engineeringSkill
- llm-evaluationSkill
- llm-observabilitySkill
- model-serving-inferenceSkill
- multimodal-ai-pipelinesSkill
- rag-engineeringSkill
- rag-pipeline-engineeringSkill
- structured-outputsSkill
- agentic-securitySkill
- security-reviewSkill
- code-reviewSkill
- debuggingSkill
- test-engineeringSkill
- example-skillSkill
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.

