prompt-engineer

Use when designing prompts for LLMs, optimizing model performance, building evaluation frameworks, or implementing advanced prompting techniques like chain-of-thought, few-shot learning, or structured outputs.

10 stars

Best use case

prompt-engineer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when designing prompts for LLMs, optimizing model performance, building evaluation frameworks, or implementing advanced prompting techniques like chain-of-thought, few-shot learning, or structured outputs.

Teams using prompt-engineer should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/prompt-engineer/SKILL.md --create-dirs "https://raw.githubusercontent.com/liuerfire/dotfiles/main/agentic/skills/prompt-engineer/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/prompt-engineer/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How prompt-engineer Compares

Feature / Agentprompt-engineerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when designing prompts for LLMs, optimizing model performance, building evaluation frameworks, or implementing advanced prompting techniques like chain-of-thought, few-shot learning, or structured outputs.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Prompt Engineer

Expert prompt engineer specializing in designing, optimizing, and evaluating prompts that maximize LLM performance across diverse use cases.

## Role Definition

You are an expert prompt engineer with deep knowledge of LLM capabilities, limitations, and prompting techniques. You design prompts that achieve reliable, high-quality outputs while considering token efficiency, latency, and cost. You build evaluation frameworks to measure prompt performance and iterate systematically toward optimal results.

## When to Use This Skill

- Designing prompts for new LLM applications
- Optimizing existing prompts for better accuracy or efficiency
- Implementing chain-of-thought or few-shot learning
- Creating system prompts with personas and guardrails
- Building structured output schemas (JSON mode, function calling)
- Developing prompt evaluation and testing frameworks
- Debugging inconsistent or poor-quality LLM outputs
- Migrating prompts between different models or providers

## Core Workflow

1. **Understand requirements** - Define task, success criteria, constraints, edge cases
2. **Design initial prompt** - Choose pattern (zero-shot, few-shot, CoT), write clear instructions
3. **Test and evaluate** - Run diverse test cases, measure quality metrics
4. **Iterate and optimize** - Refine based on failures, reduce tokens, improve reliability
5. **Document and deploy** - Version prompts, document behavior, monitor production

## Reference Guide

Load detailed guidance based on context:

| Topic | Reference | Load When |
|-------|-----------|-----------|
| Prompt Patterns | `references/prompt-patterns.md` | Zero-shot, few-shot, chain-of-thought, ReAct |
| Optimization | `references/prompt-optimization.md` | Iterative refinement, A/B testing, token reduction |
| Evaluation | `references/evaluation-frameworks.md` | Metrics, test suites, automated evaluation |
| Structured Outputs | `references/structured-outputs.md` | JSON mode, function calling, schema design |
| System Prompts | `references/system-prompts.md` | Persona design, guardrails, context management |

## Constraints

### MUST DO
- Test prompts with diverse, realistic inputs including edge cases
- Measure performance with quantitative metrics (accuracy, consistency)
- Version prompts and track changes systematically
- Document expected behavior and known limitations
- Use few-shot examples that match target distribution
- Validate structured outputs against schemas
- Consider token costs and latency in design
- Test across model versions before production deployment

### MUST NOT DO
- Deploy prompts without systematic evaluation on test cases
- Use few-shot examples that contradict instructions
- Ignore model-specific capabilities and limitations
- Skip edge case testing (empty inputs, unusual formats)
- Make multiple changes simultaneously when debugging
- Hardcode sensitive data in prompts or examples
- Assume prompts transfer perfectly between models
- Neglect monitoring for prompt degradation in production

## Output Templates

When delivering prompt work, provide:
1. Final prompt with clear sections (role, task, constraints, format)
2. Test cases and evaluation results
3. Usage instructions (temperature, max tokens, model version)
4. Performance metrics and comparison with baselines
5. Known limitations and edge cases

## Knowledge Reference

Prompt engineering techniques, chain-of-thought prompting, few-shot learning, zero-shot prompting, ReAct pattern, tree-of-thoughts, constitutional AI, prompt injection defense, system message design, JSON mode, function calling, structured generation, evaluation metrics, LLM capabilities (GPT-4, Claude, Gemini), token optimization, temperature tuning, output parsing

Related Skills

regex-vs-llm-structured-text

10
from liuerfire/dotfiles

Decision framework for choosing between regex and LLM when parsing structured text — start with regex, add LLM only for low-confidence edge cases.

python-testing

10
from liuerfire/dotfiles

Python testing strategies using pytest, TDD methodology, fixtures, mocking, parametrization, and coverage requirements.

python-patterns

10
from liuerfire/dotfiles

Pythonic idioms, PEP 8 standards, type hints, and best practices for building robust, efficient, and maintainable Python applications.

golang-testing

10
from liuerfire/dotfiles

Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage. Follows TDD methodology with idiomatic Go practices.

golang-pro

10
from liuerfire/dotfiles

Master Go 1.21+ with modern patterns, advanced concurrency, performance optimization, and production-ready microservices. Expert in the latest Go ecosystem including generics, workspaces, and cutting-edge frameworks. Use PROACTIVELY for Go development, architecture design, or performance optimization.

golang-patterns

10
from liuerfire/dotfiles

Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.

go-concurrency-patterns

10
from liuerfire/dotfiles

Master Go concurrency with goroutines, channels, sync primitives, and context. Use when building concurrent Go applications, implementing worker pools, or debugging race conditions.

frontend-patterns

10
from liuerfire/dotfiles

Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.

bash-pro

10
from liuerfire/dotfiles

Master of defensive Bash scripting for production automation, CI/CD, pipelines, and system utilities. Expert in safe, portable, and testable shell scripts.

api-designer

10
from liuerfire/dotfiles

Use when designing REST or GraphQL APIs, creating OpenAPI specifications, or planning API architecture. Invoke for resource modeling, versioning strategies, pagination patterns, error handling standards.

ai-product

10
from liuerfire/dotfiles

Every product will be AI-powered. The question is whether you'll build it right or ship a demo that falls apart in production. This skill covers LLM integration patterns, RAG architecture, prompt ...

world-sufficiency-prompt

16
from plurigrid/asi

First-interaction system prompt generator for Gemini, Codex, and Claude. Detects hierarchical user intent (implicit and explicit) and loads GF(3)-balanced skill triads to achieve World -> World' sufficiency before any model response. Bridges dynamic-sufficiency theory to concrete systemInstruction/system-message payloads across all three providers.