mcpField
P
prompt-engineer

prompt-engineer

github.com/htlin222Agent workflows7846 installsUpdated 3w ago
Repository

About prompt-engineer

A prompt-engineering skill for people building LLM applications and agents. It covers prompt design patterns, templates, and testing practices for shaping output and managing token use.

Key features

  1. 01Role and task definition
  2. 02Chain-of-thought prompts
  3. 03Few-shot examples
  4. 04Structured output formats
  5. 05Prompt testing and token tracking

Use cases

  1. 01Writing system prompts
  2. 02Improving output consistency
  3. 03Creating agent prompt templates
  4. 04Reducing token usage

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/htlin222/dotfiles --skill prompt-engineer

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

Details

From the project README

Prompt Engineering

Craft effective prompts for LLM applications.

When to Use

  • Creating system prompts
  • Improving AI output quality
  • Building AI agents
  • Optimizing token usage
  • Designing prompt templates

Core Techniques

Role Setting
You are an expert [role] with [X] years of experience in [domain].
Your task is to [specific goal].
Chain of Thought
Think through this step by step:
1. First, analyze [aspect 1]
2. Then, consider [aspect 2]
3. Finally, determine [conclusion]

Show your reasoning before giving the final answer.
Few-Shot Examples
Here are examples of the expected format:

Input: [example 1 input]
Output: [example 1 output]

Input: [example 2 input]
Output: [example 2 output]

Now process this input:
Input: {user_input}
Output:
Structured Output
Respond in the following JSON format:
{
  "analysis": "your analysis here",
  "confidence": 0.0-1.0,
  "recommendations": ["item1", "item2"]
}

Return valid JSON only, no additional text.

Prompt Templates

Code Review
You are a senior code reviewer. Review the code for:
1. Security vulnerabilities
2. Performance issues
3. Code quality and readability
4. Best practices violations

For each issue:
- Severity: Critical/High/Medium/Low
- Location: file:line
- Issue: description
- Fix: suggested solution

Code to review:
{code}
Data Extraction
Extract the following information from the text:
- Name: person's full name
- Email: email address
- Company: organization name
- Role: job title

If information is not found, use "NOT_FOUND".
Return as JSON.

Text:
{text}
Classification
Classify the following text into one of these categories:
- POSITIVE
- NEGATIVE
- NEUTRAL

Consider tone, sentiment, and overall message.
Respond with only the category name.

Text: {text}
Category:

Best Practices

PracticeDoDon't
InstructionsBe specific and explicitBe vague
FormatSpecify output formatAssume format
ExamplesInclude 2-3 examplesZero-shot for complex
ConstraintsSet clear boundariesLeave open-ended
LengthSet max length if neededAllow unlimited

Testing Prompts

  1. Test with edge cases
  2. Try adversarial inputs
  3. Check consistency across runs
  4. Measure output quality
  5. Track token usage

Examples

Input: "Create a prompt for summarization" Action: Design prompt with length constraint, key points extraction, format spec

Input: "Improve this prompt's output" Action: Add examples, clarify instructions, specify format, test iterations

Comments

Markdown supported