Prompt Engineering Mastery
БесплатноБез исполняемых скриптовНе проверенComplete methodology for writing, testing, and optimizing prompts that reliably produce high-quality outputs from any LLM. From first draft to…
от modbender★ 21 звезда на GitHubОб этом скилле
Prompt Engineering Mastery
Complete methodology for writing, testing, and optimizing prompts that reliably produce high-quality outputs from any LLM. From first draft to production-grade prompt systems.
Quick Health Check: /8
Run this diagnostic on any prompt:
| # | Check | Pass? |
|---|---|---|
| 1 | Clear task statement in first 2 sentences | |
| 2 | Output format explicitly specified | |
| 3 | At least one concrete example included | |
| 4 | Edge cases addressed | |
| 5 | Evaluation criteria defined | |
| 6 | No ambiguous pronouns or references | |
| 7 | Tested on 3+ diverse inputs | |
| 8 | Failure modes documented |
Score: X/8. Below 6 = high risk of inconsistent outputs.
Phase 1: Prompt Architecture
The CRAFT Framework
Every effective prompt has five layers:
C — Context: What does the model need to know?
- Domain background, constraints, audience
- "You are reviewing legal contracts for a mid-market SaaS company"
- NOT "You are a helpful assistant" (too vague)
R — Role: Who should the model be?
- Specific expertise, experience level, perspective
- "You are a senior tax attorney with 15 years of cross-border M&A experience"
- Role selection guide:
| Task Type | Best Role | Why |
|---|---|---|
| Technical writing | Senior technical writer at a developer tools company | Audience awareness |
| Code review | Staff engineer who's seen 10,000 PRs | Pattern recognition |
| Sales copy | Direct response copywriter (not "marketer") | Conversion focus |
| Analysis | Industry analyst at a top-3 consulting firm | Structured thinking |
| Creative | Genre-specific author (not "creative writer") | Voice consistency |
A — Action: What specifically should be done?
- Use imperative verbs: "Analyze", "Generate", "Compare", "Extract"
- One primary action per prompt (chain for multi-step)
- "Analyze this contract clause and identify: (1) risks to the buyer, (2) missing protections, (3) suggested redlines with rationale"
F — Format: What should the output look like?
- Specify structure explicitly:
## Output Format
- **Summary**: 2-3 sentence overview
- **Findings**: Numbered list, each with:
- Finding title
- Severity: Critical / High / Medium / Low
- Evidence: exact quote from input
- Recommendation: specific action
- **Score**: X/100 with dimension breakdown
T — Tests: How do we know it worked?
- Define success criteria BEFORE running
- "A good response will: (1) identify the indemnification gap, (2) flag the unlimited liability clause, (3) suggest specific alternative language"
Prompt Structure Template
# [ROLE]
## Context
[Background the model needs. Domain, constraints, audience.]
## Task
[Clear, specific instruction. One primary action.]
## Input
[What the user will provide. Format description.]
## Output Format
[Exact structure required. Use examples.]
## Rules
[Hard constraints. What to always/never do.]
## Examples
[At least one input→output pair showing ideal behavior.]
## Edge Cases
[What to do when input is ambiguous, missing, or unusual.]
Phase 2: Core Techniques
2.1 Chain-of-Thought (CoT)
When to use: Complex reasoning, math, multi-step logic, analysis
Basic CoT:
Think through this step-by-step before giving your final answer.
Structured CoT (more reliable):
Before answering, work through these steps:
1. Identify the key variables in the problem
2. List the constraints and requirements
3. Consider 2-3 possible approaches
4. Evaluate each approach against the constraints
5. Select the best approach and explain why
6. Generate the solution
7. Verify the solution against the original requirements
When NOT to use CoT:
- Simple factual lookups
- Format conversion tasks
- When speed matters more than accuracy
- Tasks under 50 tokens of output
2.2 Few-Shot Examples
Golden rule: Examples teach format AND quality simultaneously.
Example design checklist:
- Shows the exact input format users will provide
- Shows the exact output format you want
- Demonstrates the reasoning depth expected
- Includes at least one edge case example
- Examples are diverse (not all the same pattern)
Few-shot template:
## Examples
### Example 1: [Simple case]
**Input**: [representative input]
**Output**: [ideal output showing format + quality]
### Example 2: [Edge case]
**Input**: [tricky or ambiguous input]
**Output**: [how to handle gracefully]
### Example 3: [Complex case]
**Input**: [challenging real-world input]
**Output**: [thorough, high-quality response]
How many examples?
| Task Complexity | Examples Needed | Notes |
|---|---|---|
| Format conversion | 1-2 | Format is the lesson |
| Classification | 3-5 |
Установить Prompt Engineering Mastery в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл Prompt Engineering Mastery?
Complete methodology for writing, testing, and optimizing prompts that reliably produce high-quality outputs from any LLM. From first draft to production-grade prompt systems.
Как установить скилл Prompt Engineering Mastery?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Prompt Engineering Mastery запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic