prompt-engineer · curiositech — скилл для Claude Code: оптимизация промптов для LLM
Скилл prompt-engineer для проектирования и отладки промптов. Помогает избавиться от галлюцинаций, улучшить консистентность ответов и упорядочить работу агентов через систематическую оптимизацию.
MIT 217 установок ★ 274 обновлён 2026-09-06
npx skills add curiositech/some_claude_skills --skill prompt-engineer -a claude-codeЧто делает prompt-engineer
Анализирует текущие промпты, находит в них расплывчатость и противоречия, затем применяет проверенные техники: chain-of-thought, few-shot примеры, constraint engineering, role prompting. Каждая техника решает конкретную проблему — например, few-shot примеры дают 30–50% надёжности в форматировании, а constraint engineering справляется с граничными случаями на 50%+ лучше.
Внутри работает с инструментами чтения файлов, редактирования промптов и последовательного анализа через mcp__SequentialThinking__sequentialthinking. Предлагает CLEAR-фреймворк: контекст, ограничения, примеры, действие, проверка. Помогает отловить антипаттерны — забивание промпта сотней правил, отсутствие примеров, чрезмерное ограничение, которое создаёт внутренние противоречия.
Хорош для системных промптов чатботов, инструкций агентов, шаблонов, которые должны работать одинаково на разных входах. Не заменяет разработку LLM-приложений (для этого есть ai-engineer) и автоматическую оптимизацию (для этого есть automatic-stateful-prompt-improver).
Какие задачи решает
- избавить модель от галлюцинаций и выдумок
- сделать ответы по одному вопросу более консистентными
- привести вывод к нужному формату без ошибок
- упорядочить инструкции для агента или чатбота
- отловить и исправить неясности в текущих промптах
Примеры запросов агенту
- Наш чатбот по возвратам даёт противоречивые ответы. Проанализируй текущий промпт и предложи улучшения.
- Напиши system prompt для агента, который парсит счета. Используй CLEAR-фреймворк и добавь примеры.
- Мой вывод не совпадает с требуемым JSON. Переработай инструкцию с few-shot примерами и constraint engineering.
Как установить prompt-engineer
1Через Skills CLI (Vercel)
npx skills add curiositech/some_claude_skills --skill prompt-engineer -a claude-code2Вручную: положить файлы
~/.claude/skills/prompt-engineer/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/prompt-engineer/
1Через Skills CLI (Vercel)
npx skills add curiositech/some_claude_skills --skill prompt-engineer -a codex2Вручную: положить файлы
.agents/skills/prompt-engineer/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add curiositech/some_claude_skills --skill prompt-engineer -a cursor2Вручную: положить файлы
.cursor/skills/prompt-engineer/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install curiositech/some_claude_skills .claude/skills/prompt-engineer2Вручную: положить файлы
.github/skills/prompt-engineer/SKILL.md1Через Skills CLI (Vercel)
npx skills add curiositech/some_claude_skills --skill prompt-engineer -a gemini-cli2Командой платформы
gemini skills install https://github.com/curiositech/some_claude_skills --path .claude/skills/prompt-engineerВручную: положить файлы
.devin/skills/prompt-engineer/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add curiositech/some_claude_skills --skill prompt-engineer -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о prompt-engineer
Как установить prompt-engineer в Claude Code?
Выполни команду npx skills add curiositech/some_claude_skills --skill prompt-engineer -a claude-code, затем открой файл ~/.claude/skills/prompt-engineer/SKILL.md для проверки.
Что делает prompt-engineer?
Проектирует, оптимизирует и отлаживает промпты для LLM. Анализирует текущие инструкции, применяет техники вроде chain-of-thought и few-shot примеров, тестирует на противоречивых входах и предлагает метрики улучшения.
Когда использовать prompt-engineer, а когда ai-engineer?
prompt-engineer — для уточнения и оптимизации промптов, системных инструкций, шаблонов. ai-engineer — для построения полного LLM-приложения в production. Часто они работают вместе: сначала инженер промптов создаёт инструкции, затем ai-engineer встраивает их в приложение.
Исходный текст
SKILL.md · MIT
---
name: prompt-engineer
description: Expert prompt optimization for LLMs and AI systems. Use PROACTIVELY when building AI features, improving agent performance, or crafting system prompts. Masters prompt patterns and techniques.
allowed-tools: Read,Write,Edit,Glob,Grep,mcp__SequentialThinking__sequentialthinking
metadata:
category: AI & Machine Learning
pairs-with:
- skill: ai-engineer
reason: Apply optimized prompts in production LLM applications
- skill: automatic-stateful-prompt-improver
reason: Automated prompt optimization with learning
tags:
- prompts
- llm
- optimization
- ai
- system-design
---
# Prompt Engineer
Expert in crafting, optimizing, and debugging prompts for large language models. Transform vague requirements into precise, effective prompts that produce consistent, high-quality outputs.
## Quick Start
```
User: "My chatbot gives inconsistent answers about our refund policy"
Prompt Engineer:
1. Analyze current prompt structure
2. Identify ambiguity and edge cases
3. Apply constraint engineering
4. Add few-shot examples
5. Test with adversarial inputs
6. Measure improvement
```
**Result**: 40-60% improvement in response consistency
## Core Competencies
### 1. Prompt Architecture
- System prompt design for persona and constraints
- User prompt structure for clarity
- Context window optimization
- Multi-turn conversation design
### 2. Optimization Techniques
| Technique | When to Use | Expected Improvement |
|-----------|-------------|---------------------|
| **Chain-of-Thought** | Complex reasoning | 20-40% accuracy |
| **Few-Shot Examples** | Format consistency | 30-50% reliability |
| **Constraint Engineering** | Edge case handling | 50%+ consistency |
| **Role Prompting** | Domain expertise | 15-25% quality |
| **Self-Consistency** | Critical decisions | 10-20% accuracy |
### 3. Debugging & Testing
- Prompt ablation studies
- Adversarial input testing
- A/B testing frameworks
- Regression detection
## Prompt Patterns
### The CLEAR Framework
```
C - Context: What background does the model need?
L - Limits: What constraints apply?
E - Examples: What does good output look like?
A - Action: What specific task to perform?
R - Review: How to verify correctness?
```
### System Prompt Template
```markdown
You are [ROLE] with expertise in [DOMAIN].
## Your Task
[CLEAR, SPECIFIC INSTRUCTION]
## Constraints
- [CONSTRAINT 1]
- [CONSTRAINT 2]
## Output Format
[EXACT FORMAT SPECIFICATION]
## Examples
Input: [EXAMPLE INPUT]
Output: [EXAMPLE OUTPUT]
```
### Chain-of-Thought Pattern
```markdown
Think through this step-by-step:
1. First, identify [ASPECT 1]
2. Then, analyze [ASPECT 2]
3. Consider [EDGE CASES]
4. Finally, synthesize into [OUTPUT]
Show your reasoning before the final answer.
```
## Optimization Workflow
| Phase | Activities | Tools |
|-------|------------|-------|
| **Analyze** | Review current prompts, identify issues | Read, pattern analysis |
| **Hypothesize** | Form improvement hypotheses | Sequential thinking |
| **Implement** | Apply prompt engineering techniques | Write, Edit |
| **Test** | Validate with diverse inputs | Manual testing |
| **Measure** | Quantify improvement | A/B comparison |
| **Iterate** | Refine based on results | Repeat cycle |
## Common Issues & Fixes
### Issue: Hallucinations
```
Problem: Model fabricates information
Fix: Add "Only use information provided. Say 'I don't know' if uncertain."
```
### Issue: Verbose Output
```
Problem: Model produces too much text
Fix: Add "Be concise. Maximum 3 sentences." + format constraints
```
### Issue: Format Violations
```
Problem: Output doesn't match required format
Fix: Add explicit examples + "Follow this exact format:"
```
### Issue: Context Confusion
```
Problem: Model loses track in long conversations
Fix: Add periodic context summaries + clear role reminders
```
## Anti-Patterns
### Anti-Pattern: Prompt Stuffing
**What it looks like**: Cramming every possible instruction into one prompt
**Why wrong**: Dilutes important instructions, confuses model
**Instead**: Prioritize 3-5 key constraints, use progressive disclosure
### Anti-Pattern: Vague Instructions
**What it looks like**: "Write something good about our product"
**Why wrong**: No measurable criteria, inconsistent outputs
**Instead**: Specific requirements with examples
### Anti-Pattern: Over-Constraining
**What it looks like**: 50+ rules the model must follow
**Why wrong**: Model can't prioritize, contradictions emerge
**Instead**: Essential constraints only, test for necessity
### Anti-Pattern: No Examples
**What it looks like**: Complex format with no concrete examples
**Why wrong**: Model interprets instructions differently
**Instead**: Always include 2-3 representative examples
## Quality Metrics
| Metric | How to Measure | Target |
|--------|----------------|--------|
| **Consistency** | Same input, same output quality | >90% |
| **Accuracy** | Correct information | >95% |
| **Format Compliance** | Follows specified format | >98% |
| **Latency** | Time to first token | <2s |
| **Token Efficiency** | Output tokens per task | -20% waste |
## When to Use
**Use for:**
- Designing system prompts for chatbots
- Optimizing agent instructions
- Reducing hallucinations
- Improving output consistency
- Creating prompt templates
**Do NOT use for:**
- Building LLM applications (use ai-engineer)
- Automated optimization (use automatic-stateful-prompt-improver)
- General coding tasks (use language-specific skills)
- Infrastructure setup (use deployment skills)
---
**Core insight**: Great prompts are like great specifications—specific enough to eliminate ambiguity, flexible enough to handle variation, and tested against adversarial inputs.
**Use with**: ai-engineer (production apps) | automatic-stateful-prompt-improver (automation) | agent-creator (new agents)
© curiositech · MIT · curiositech/some_claude_skills
Похожие скиллы
Все скиллы по теме «ИИ и ML» →Сначала — prompt-engineer от других авторов.