prompt-engineer
Skill128 starsChanged 10 months agoMITView on GitHub
Use this skill when creating, improving, or optimizing prompts for Claude. Applies Anthropic's best practices for prompt engineering including clarity, structure, consistency, hallucination reduction, and security. Useful when users request help with writing prompts, improving existing prompts, reducing errors, increasing consistency, or implementing specific techniques like chain-of-thought, multishot prompting, or XML structuring.
We split this skill into the rules it gives an agent
11 rules. 0 are common, 11 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 61 edited versions we read keep these.
11
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 29
Ask clarifying questions to understand:
- Distinctive: line 42
Use XML tags for structure
- Distinctive: line 57
Read the appropriate reference file(s) based on techniques needed:
- Distinctive: line 111
Structure: Use XML tags to organize
- Distinctive: line 149
Run prompt multiple times with varied inputs
- Distinctive: line 150
Check consistency across runs
- Distinctive: line 151
Verify outputs match expected format
- Distinctive: line 161
Test and measure improvement
- Distinctive: line 178
Start with core techniques and add advanced patterns only when needed.
- Distinctive: line 181
When delivering prompts, explain which techniques were used and why.
- Distinctive: line 184
Always validate critical outputs, especially for high-stakes applications.
“Common” is measured: kept by at least 6 in 10 of the 61 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 Skill
This skill provides comprehensive guidance for creating effective prompts for Claude based on Anthropic's official best practices. Use this skill whenever working on prompt design, optimization, or troubleshooting.
Overview
Apply proven prompt engineering techniques to create high-quality, reliable prompts that produce consistent, accurate outputs while minimizing hallucinations and implementing appropriate security measures.
When to Use This Skill
Trigger this skill when users request:
- Help writing a prompt for a specific task
- Improving an existing prompt that isn't performing well
- Making Claude more consistent, accurate, or secure
- Creating system prompts for specialized roles
- Implementing specific techniques (chain-of-thought, multishot, XML tags)
- Reducing hallucinations or errors in outputs
- Debugging prompt performance issues
Workflow
Step 1: Understand Requirements
Ask clarifying questions to understand:
- Task goal: What should the prompt accomplish?
- Use case: One-time use, API integration, or production system?
- Constraints: Output format, length, style, tone requirements
- Quality needs: Consistency, accuracy, security priorities
- Complexity: Simple task or multi-step workflow?
Step 2: Identify Applicable Techniques
Based on requirements, determine which techniques to apply:
Core techniques (for all prompts):
- Be clear and direct
- Use XML tags for structure
Specialized techniques:
- Role-specific expertise → System prompts
- Complex reasoning → Chain of thought
- Format consistency → Multishot prompting
- Multi-step tasks → Prompt chaining
- Long documents → Long context tips
- Deep analysis → Extended thinking
- Factual accuracy → Hallucination reduction
- Output consistency → Consistency techniques
- Security concerns → Jailbreak mitigation
Step 3: Load Relevant References
Read the appropriate reference file(s) based on techniques needed:
For basic prompt improvement:
Read references/core_prompting.mdCovers: clarity, system prompts, XML tags
For complex tasks:
Read references/advanced_patterns.mdCovers: chain of thought, multishot, chaining, long context, extended thinking
For specific quality issues:
Read references/quality_improvement.mdCovers: hallucinations, consistency, security
Step 4: Design the Prompt
Apply techniques from references to create the prompt structure:
Basic Template:
[System prompt - optional, for role assignment]
<context>
Relevant background information
</context>
<instructions>
Clear, specific task instructions
Use numbered steps for multi-step tasks
</instructions>
<examples>
<example>
<input>Sample input</input>
<output>Expected output</output>
</example>
[2-4 more examples if using multishot]
</examples>
<output_format>
Specify exact format (JSON, XML, markdown, etc.)
</output_format>
[Actual task/question]Key Design Principles:
- Clarity: Be explicit and specific
- Structure: Use XML tags to organize
- Examples: Provide 3-5 concrete examples for complex formats
- Context: Give relevant background
- Constraints: Specify output requirements clearly
Step 5: Add Quality Controls
Based on quality needs, add appropriate safeguards:
For factual accuracy:
- Grant permission to say "I don't know"
- Request quote extraction before analysis
- Require citations for claims
- Limit to provided information sources
For consistency:
- Provide explicit format specifications
- Use response prefilling
- Include diverse examples
- Consider prompt chaining
For security:
- Add harmlessness screening
- Establish clear ethical boundaries
- Implement input validation
- Use layered protection
Step 6: Optimize and Test
Optimization checklist:
- Could someone with minimal context follow the instructions?
- Are all terms and requirements clearly defined?
- Is the desired output format explicitly specified?
- Are examples diverse and relevant?
- Are XML tags used consistently?
- Is the prompt as concise as possible while remaining clear?
Testing approach:
- Run prompt multiple times with varied inputs
- Check consistency across runs
- Verify outputs match expected format
- Test edge cases
- Validate quality controls work
Step 7: Iterate Based on Results
Debugging process:
- Identify failure points
- Review relevant reference material
- Apply appropriate techniques
- Test and measure improvement
- Repeat until satisfactory
Common Issues and Solutions:
| Issue | Solution | Reference |
| Inconsistent format | Add examples, use prefilling | quality_improvement.md |
| Hallucinations | Add uncertainty permission, quote grounding | quality_improvement.md |
| Missing steps | Break into subtasks, use chaining | advanced_patterns.md |
| Wrong tone | Add role to system prompt | core_prompting.md |
| Misunderstands task | Add clarity, provide context | core_prompting.md |
| Complex reasoning fails | Add chain of thought | advanced_patterns.md |
Important Principles
Progressive Disclosure Start with core techniques and add advanced patterns only when needed. Don't over-engineer simple prompts.
Documentation When delivering prompts, explain which techniques were used and why. This helps users understand and maintain them.
Validation Always validate critical outputs, especially for high-stakes applications. No prompting technique eliminates all errors.
Experimentation Prompt engineering is iterative. Small changes can have significant impacts. Test variations and measure results.
Quick Reference Guide
Technique Selection Matrix
| User Need | Primary Technique | Reference File |
| Better clarity | Be clear and direct | core_prompting.md |
| Domain expertise | System prompts | core_prompting.md |
| Organized structure | XML tags | core_prompting.md |
| Complex reasoning | Chain of thought | advanced_patterns.md |
| Format consistency | Multishot prompting | advanced_patterns.md |
| Multi-step process | Prompt chaining | advanced_patterns.md |
| Long documents (100K+ tokens) | Long context tips | advanced_patterns.md |
| Deep analysis | Extended thinking | advanced_patterns.md |
| Reduce false information | Hallucination reduction | quality_improvement.md |
| Consistent outputs | Consistency techniques | quality_improvement.md |
| Security/safety | Jailbreak mitigation | quality_improvement.md |
When to Combine Techniques
- Structured analysis: XML tags + Chain of thought
- Consistent formatting: Multishot + Response prefilling
- Complex workflows: Prompt chaining + XML tags
- Factual reports: Quote grounding + Citation verification
- Production systems: System prompts + Input validation + Consistency techniques
Resources
This skill includes three comprehensive reference files:
references/core_prompting.md
Essential techniques for all prompts:
- Being clear and direct
- System prompts and role assignment
- Using XML tags effectively
references/advanced_patterns.md
Sophisticated techniques for complex tasks:
- Chain of thought prompting
- Multishot prompting
- Prompt chaining
- Long context handling
- Extended thinking
references/quality_improvement.md
Techniques for specific quality issues:
- Reducing hallucinations
- Increasing consistency
- Mitigating jailbreaks and prompt injections
Load these files as needed based on the workflow steps above.
Other versions69 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 69
- Jeffallan/claude-skills★ 12ksame name
- elithrar/dotfiles★ 206same name
- aakashg/pm-claude-skills★ 106same name
- thedesignproject/agent-skills★ 88same name
- OpenCoven/coven★ 75same name
- monaccode/astromesh★ 38same name
- jshsakura/awesome-opencode-skills★ 30same name
- Fandry96/k3-agentic-skills★ 27same name
- felvieira/claude-skills-fv★ 27same name
- jaskirat1616/grok-skills★ 22same name
59 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 idea-validator, debugger and 6 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.
dipaulavsSkillidea-validator
Validates app ideas before building. Analyzes market saturation, competitors, real demand vs stated interest, solo builder feasibility (2-4 weeks timeline), and monetization potential. Use when user asks to validate an idea, evaluate a concept, check if idea is worth building, or before starting a new project.
Also in 3 projects that use this
JohnJBorenSkilldebugger
Systematic debugging workflows, root cause analysis, and troubleshooting patterns
Also in 3 projects that use this
VercelSkilltechnical-writer
Write, review, and edit developer documentation for SDKs, libraries, and frameworks, including sites such as ai-sdk.dev and chat-sdk.dev. Use for getting-started guides, tutorials, API references, conceptual explanations, integration guides, migration guides, troubleshooting, and code examples.
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
JetBrainsSkillwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Also in 3 projects that use this
BlockSkillfrontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Also in 6 projects that use this
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- content-writerSkill
- custom-frontend-designSkill
- prompt-engineerSkill
- skill-creatorSkill
- testing-anti-patternsSkill
- content-writerSkill
- custom-frontend-designSkill
- skill-creatorSkill
- testing-anti-patternsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

