prompt-engineering
Skill2 starsChanged 6 months agoMITView on GitHub
Write effective prompts for LLMs — structure, few-shot examples, chain-of-thought, system prompts, and output parsing. Use when the user says "/prompt-engineering", "prompt engineering", or asks about prompt engineering.
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 70 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 9
Write prompts that get reliable, high-quality output from LLMs.
- Distinctive: line 61
Ask the model to reason step by step:
- Distinctive: line 135
Test prompts with edge cases, not just the happy path
- Distinctive: line 137
Use structured output (JSON) when parsing the response programmatically
“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
Write prompts that get reliable, high-quality output from LLMs.
Core Principles
- Be specific — vague prompts get vague results
- Show, don't tell — examples beat instructions
- Structure the output — tell the model exactly what format you want
- Iterate — prompts are code; test and refine them
Techniques
System Prompts
Set the model's role and constraints:
You are a senior code reviewer. Review the provided code for:
1. Security vulnerabilities
2. Performance issues
3. Readability problems
For each issue found, provide:
- Severity (critical/warning/info)
- Line number
- Description
- Suggested fix
If no issues are found, respond with "No issues found."Few-Shot Examples
Provide 2-3 examples of input → output:
Convert the user's natural language query to a SQL query.
Example 1:
Input: "How many users signed up last month?"
Output: SELECT COUNT(*) FROM users WHERE created_at >= DATE_TRUNC('month', NOW() - INTERVAL '1 month') AND created_at < DATE_TRUNC('month', NOW());
Example 2:
Input: "Show me the top 5 products by revenue"
Output: SELECT p.name, SUM(o.amount) as revenue FROM products p JOIN orders o ON o.product_id = p.id GROUP BY p.name ORDER BY revenue DESC LIMIT 5;
Now convert this query:
Input: "{user_query}"
Output:Chain-of-Thought
Ask the model to reason step by step:
Analyze this error and suggest a fix. Think step by step:
1. What does the error message mean?
2. What could cause this error?
3. What is the most likely root cause given the code context?
4. What is the fix?Structured Output
Request JSON or a specific format:
Respond with a JSON object matching this schema:
{
"summary": "string - one sentence summary",
"sentiment": "positive | negative | neutral",
"key_topics": ["string"],
"confidence": 0.0-1.0
}Constraints and Guardrails
Rules:
- Only use information from the provided context
- If you don't know the answer, say "I don't know" — do not guess
- Keep responses under 200 words
- Do not include any PII in your responsePatterns for Code
Code generation:
Write a TypeScript function that {description}.
Requirements:
- {requirement 1}
- {requirement 2}
Use these libraries: {libraries}
Follow this pattern from the codebase: {example}Code transformation:
Refactor this code to {goal}. Keep the same behavior.
Do not change the public API (function signatures, exports).Bug fixing:
This code has a bug: {description of bug}
Error: {error message}
Fix the bug. Explain what caused it in a comment.Anti-Patterns
- Too vague: "Make this better" → Be specific about what "better" means
- Too long: Giant prompts with everything → Split into focused prompts
- Contradictory: "Be concise but thorough" → Pick one or define the tradeoff
- No examples: Complex formatting without showing what you want → Add 1-2 examples
- Prompt injection risk: Including raw user input without delimiting → Use clear delimiters like
<user_input>...</user_input>
Tips
- Temperature 0 for deterministic tasks (code, classification), 0.7+ for creative tasks
- Test prompts with edge cases, not just the happy path
- Version control your prompts — they're as important as code
- Use structured output (JSON) when parsing the response programmatically
- Shorter prompts often outperform longer ones if they're precise enough
Other versions79 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- ZeroTokenClaw/agents-skills★ 199% same
- matarpeles/skills-registry-demo★ 099% same
Wrote their own version · 77
- trycompai/comp★ 2ksame 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
67 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 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
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
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 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
MicrosoftSkillerror-handling
统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。
Also in 4 projects that use this
In this repository85 other files it gives its agents.
- accessibility-auditingSkill
- adding-analyticsSkill
- adding-api-docsSkill
- adding-authSkill
- adding-dockerSkill
- adding-e2e-testsSkill
- adding-error-trackingSkill
- adding-feature-flagsSkill
- adding-stripeSkill
- api-smoke-testingSkill
- architecture-decision-recordsSkill
- auditing-performanceSkill
- auditing-securitySkill
- auto-type-checkingSkill
- babysitting-prSkill
- best-of-n-solvingSkill
- building-skills-from-patternsSkill
- cavemanSkill
- codebase-onboardingSkill
- comparing-branches-visuallySkill
- converting-css-modules-to-tailwindSkill
- converting-css-to-tailwindSkill
- creating-prSkill
- dark-mode-testingSkill
- database-designSkill
- design-an-interfaceSkill
- detecting-port-conflictsSkill
- domain-modelSkill
- edit-articleSkill
- exporting-to-pngSkill
- finding-dev-server-urlSkill
- fixing-broken-linksSkill
- form-testingSkill
- generating-imagesSkill
- git-guardrails-claude-codeSkill
- github-triageSkill
- grill-meSkill
- grinding-until-passSkill
- improve-codebase-architectureSkill
- incident-responseSkill
- kubernetes-deployingSkill
- migrate-to-shoehornSkill
- monitoring-terminal-errorsSkill
- network-request-auditingSkill
- obsidian-vaultSkill
- parallel-ci-triageSkill
- parallel-code-reviewSkill
- parallel-exploringSkill
- parallel-test-fixingSkill
- profiling-performanceSkill
- python-tdd-with-uvSkill
- qaSkill
- react-native-patternsSkill
- recording-browser-flow-as-testSkill
- request-refactor-planSkill
- responsive-testingSkill
- reviewing-codeSkill
- saving-workspace-contextSkill
- scaffold-exercisesSkill
- screenshotting-changelogSkill
- The first 60 shown.
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.

