mcpField
P
prompt-engineer

prompt-engineer

github.com/curiositechAgent workflows257208 installsUpdated 1d ago
Repository

About prompt-engineer

prompt-engineer is a skill for designing, improving, and testing prompts for large language models. It helps chatbot and agent builders address ambiguity, inconsistent output, and prompt-related failures through structured workflows and testing techniques.

Key features

  1. 01System and user prompt design
  2. 02Context and multi-turn structure optimization
  3. 03Few-shot and constraint techniques
  4. 04Adversarial and regression testing
  5. 05A/B comparison and iteration

Use cases

  1. 01Improving consistency in chatbot policy answers
  2. 02Creating system prompts for agents
  3. 03Diagnosing hallucinations or format violations

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/curiositech/some_claude_skills --skill prompt-engineer

After installing, type/prompt-engineerin Claude Code to confirm it loaded.

Bundled files.claude-plugin/plugin.json

Details

From the project README

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
TechniqueWhen to UseExpected Improvement
Chain-of-ThoughtComplex reasoning20-40% accuracy
Few-Shot ExamplesFormat consistency30-50% reliability
Constraint EngineeringEdge case handling50%+ consistency
Role PromptingDomain expertise15-25% quality
Self-ConsistencyCritical decisions10-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
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
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

PhaseActivitiesTools
AnalyzeReview current prompts, identify issuesRead, pattern analysis
HypothesizeForm improvement hypothesesSequential thinking
ImplementApply prompt engineering techniquesWrite, Edit
TestValidate with diverse inputsManual testing
MeasureQuantify improvementA/B comparison
IterateRefine based on resultsRepeat 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

MetricHow to MeasureTarget
ConsistencySame input, same output quality>90%
AccuracyCorrect information>95%
Format ComplianceFollows specified format>98%
LatencyTime to first token<2s
Token EfficiencyOutput 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)

Comments

Markdown supported