Skip to main content
skill CX Codex

prompt-engineer · curiositech — Claude Code skill: LLM prompt design and optimization

prompt-engineer — a skill for crafting and debugging prompts. Eliminates hallucinations, improves response consistency, and strengthens agent instructions through systematic optimization techniques.

MIT 217 installs ★ 274 updated 2026-09-06

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add curiositech/some_claude_skills --skill prompt-engineer -a claude-code
Open on GitHub

What prompt-engineer does

Audits existing prompts to surface ambiguity and contradictions, then applies proven methods: chain-of-thought reasoning, few-shot examples, constraint engineering, role prompting. Each technique addresses a specific failure mode—few-shot examples lift format reliability by 30–50%, while constraint engineering handles edge cases at 50%+ improvement rate.

Works with file reading, prompt editing, and sequential reasoning via mcp__SequentialThinking__sequentialthinking. Introduces the CLEAR framework: context, limits, examples, action, review. Flags anti-patterns—instruction bloat, missing examples, over-constraining that creates contradictions.

Fits chatbot system prompts, agent instructions, and reusable templates that must behave consistently. Separate from end-to-end LLM application development (use ai-engineer) and automated iterative optimization (use automatic-stateful-prompt-improver).

What it helps with

  • stop the model from fabricating information or hallucinating details
  • make answers to the same question produce consistent output quality
  • enforce strict formatting without parsing errors
  • clarify and structure instructions for agents or multi-step workflows
  • diagnose gaps and contradictions in existing prompts

Example prompts for the agent

  • Our refund policy chatbot gives conflicting answers. Analyze the current prompt and suggest improvements.
  • Write a system prompt for an invoice parser. Use the CLEAR framework and add examples.
  • Output doesn't match the required JSON schema. Rework the instructions with few-shot examples and tighter constraints.

How to install prompt-engineer

1Skills CLI (Vercel)

npx skills add curiositech/some_claude_skills --skill prompt-engineer -a claude-code

2Manually: put the files in place

~/.claude/skills/prompt-engineer/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/prompt-engineer/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about prompt-engineer

How do I install prompt-engineer in Claude Code?

Run npx skills add curiositech/some_claude_skills --skill prompt-engineer -a claude-code, then verify by opening ~/.claude/skills/prompt-engineer/SKILL.md.

What does prompt-engineer do?

Designs, optimizes, and debugs prompts for large language models. Audits existing instructions, applies techniques like chain-of-thought and few-shot examples, tests against adversarial inputs, and quantifies improvements.

When should I use prompt-engineer instead of ai-engineer?

Use prompt-engineer to refine and test prompts, system instructions, and reusable templates. Use ai-engineer for building complete LLM applications in production. Often they work together: prompt-engineer develops solid instructions, then ai-engineer integrates them into a live system.

Source text

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

Similar skills

All skills for AI and ML →

prompt-engineer by other authors comes first.

prompt-engineer https://github.com/Jeffallan prompt-engineer is a Claude Code skill that designs, refactors, and tests prompts for language models. It builds few-shot patterns, chain-of-thought flows, and JSON output schemas. CX Codex +1 6,100installs prompt-engineer sickn33 prompt-engineer transforms unstructured prompts into structured prompts using frameworks like RTF, RISEN, and Chain of Thought. Helpful when a task needs clearer instructions. CX Codex +1 1,600installs prompt-engineer davila7 prompt-engineer designs structured system prompts, few-shot examples, and reasoning chains for LLM apps. Helpful when prompts need rigorous instructions and strict output formats. CX Codex +1 591installs ai-engineer sickn33 ai-engineer — a skill that puts the agent in the role of an LLM engineer, then works from success metrics to RAG pipelines, agent orchestration and the production plumbing around them. CX Codex +1 1,300installs anthropic-prompt-engineer jamesrochabrun Builds new prompts from scratch and refines existing templates for Claude models using official Anthropic prompt engineering guidelines. CX Codex +1 233installs dspy-better-together OmidZamani dspy-better-together — a skill that walks you through chaining DSPy prompt and weight optimizers, scoring intermediate programs and keeping the best one. CX Codex +1 ★ 125repo stars tao-run-automl NVIDIA Corporation The tao-run-automl skill runs AutoML and hyperparameter search for NVIDIA TAO models. Use it to tune training or another supported model action on a selected platform. CX Codex +1 1,600installs ml-training-recipes dailycafi ml-training-recipes is a Claude Code skill for setting up PyTorch neural-network training, with recipes for training loops, Muon and AdamW, mixed precision, and scaling laws. CX Codex +1 1,100installs cost-latency-optimizer patricio0312rev The cost-latency-optimizer skill for Claude Code manages LLM costs and response times. It integrates caching, batching, and model selection into development workflows. CX Codex +1 336installs

From the same set180

The whole set →
technical-writer technical-writer structures developer docs, API references, ADRs, and runbooks using the Diátaxis framework with working code examples. CX Codex +1 221installs reactive-dashboard-performance reactive-dashboard-performance sets up React dashboard performance patterns and speeds up async test suites. Helps replace spinners with skeletons and resolve test runner timeouts. CX Codex +1 220installs devops-automator devops-automator — a skill that turns your AI coder into a DevOps engineer: designs pipelines, writes Terraform and Kubernetes configs, sets up GitOps. Use it when building infrastructure or automating deployments. CX Codex +1 219installs bot-developer The bot-developer skill guides bot development for Discord, Telegram, and Slack, covering conversation state, API limits, and moderation. Use it when a bot needs multi-step interactions or automated rules. CX Codex +1 218installs team-builder team-builder designs team structures using organizational psychology. When a required role is missing from the skill library, it writes a new skill right away. CX Codex +1 216installs react-performance-optimizer react-performance-optimizer diagnoses React render bottlenecks to hit 60fps. It tackles sluggish lists, unnecessary component updates, and oversized bundles. CX Codex +1 215installs digital-estate-planner digital-estate-planner — a skill for organizing digital life ahead of death, incapacity, or emergencies. It inventories accounts, documents passwords and crypto, and writes instructions for a digital executor. CX Codex +1 215installs data-pipeline-engineer data-pipeline-engineer guides data pipeline design, Medallion storage layers, Airflow DAG orchestration, and dbt models. Activates for batch processing and streaming workloads. CX Codex +1 215installs

Project sponsors

Companies that keep this analytics open