Agent skill

Prompt Engineer

by Jeffallan in Jeffallan/claude-skills

Designs, tests and refines LLM prompts: zero-shot, few-shot and chain-of-thought patterns, system prompts, structured output schemas and evaluation test suites.

MITAuto-check passedAI & LLM Engineering

Install Prompt Engineer

skills CLI
$ npx skills add Jeffallan/claude-skills --skill prompt-engineer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Jeffallan/claude-skills prompt-engineer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/prompt-engineer .claude/skills/prompt-engineer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
prompt-engineer
GitHub stars
12k
Token cost
~1.5k tokens
SKILL.md length
457 words
Files
7 (incl. references)
Skills in repo
58
Repo updated
First seen
Licence
MIT

At a glance

Designs, tests and refines LLM prompts: zero-shot, few-shot and chain-of-thought patterns, system prompts, structured output schemas and evaluation test suites.

  • Works in 5 steps: Understand requirements — Define task,… → Design initial prompt — Choose pattern… → Test and evaluate — Run diverse test… → …
  • Designing prompts for a new LLM application
  • SKILL.md covers When to Use This Skill, Core Workflow, Reference Guide and Prompt Examples, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The agent defines the task, success criteria, constraints and edge cases, picks a pattern such as zero-shot, few-shot or chain-of-thought, and writes clear instructions. It then runs diverse test cases and measures quality. If accuracy on the test set falls below 80%, it looks for failure patterns such as ambiguous instructions, missing examples or edge-case gaps before iterating. Changes are made one at a time, and finished prompts are versioned, documented and monitored in production.

Reference files cover prompt patterns including ReAct, optimization through iterative refinement, A/B testing and token reduction, evaluation metrics and automated test suites, structured outputs with JSON mode and function calling, system prompts with personas, guardrails and injection defense, and context management. The examples contrast a zero-shot and a few-shot sentiment classification prompt.

When your agent uses it

  • Designing prompts for a new LLM application
  • Improving an existing prompt's accuracy or cutting its token use
  • Writing a system prompt with a persona and guardrails
  • Creating JSON schemas for function calling or JSON mode
  • Building a test set and metrics to compare prompt versions

Example prompts

  • “Rewrite our support-ticket classifier prompt with few-shot examples and test it against the labeled tickets in tickets.csv.”
  • “Write a system prompt for a billing assistant with a friendly persona and clear guardrails.”
  • “Cut the token count of this extraction prompt without lowering accuracy.”
  • “Design a JSON schema for a function call that returns invoice line items.”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Understand requirements — Define task, success criteria, constraints, and 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 — Make one change at a time; refine based on failures, reduce tokens, improve reliability
  5. Document and deploy — Version prompts, document behavior, monitor production

What it can do on your machine

Read from SKILL.md and the folder at commit 1be15d8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • synergetic.solutions
    • jeffallan.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Prompt Engineer loads about 1.5k tokens when it runs, and up to ~27k if it reads all its reference files. Until then it costs about 131 tokens; SKILL.md has 457 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~131
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~27k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Jeffallan/claude-skills at commit 1be15d8, republished under its MIT licence (© Jeffallan). 457 words, ~1,509 tokens.

Download SKILL.mdSave it as .claude/skills/prompt-engineer/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
prompt-engineer
description
Writes, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot learning, creating system prompts with personas and guardrails, building JSON/function-calling schemas, or developing prompt evaluation frameworks to measure and improve model performance.
license
MIT
metadata.author
https://github.com/Jeffallan
metadata.company
https://synergetic.solutions
metadata.version
1.2.0
metadata.domain
data-ml
metadata.triggers
prompt engineering, prompt optimization, chain-of-thought, few-shot learning, prompt testing, LLM prompts, prompt evaluation, system prompts, structured…
metadata.role
expert
metadata.scope
design
metadata.output-format
document
metadata.related-skills
test-master, rag-architect, debugging-wizard

Prompt Engineer

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

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, and 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
    • Validation checkpoint: If accuracy < 80% on the test set, identify failure patterns before iterating (e.g., ambiguous instructions, missing examples, edge case gaps)
  4. Iterate and optimize — Make one change at a time; 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:

TopicReferenceLoad When
Prompt Patternsreferences/prompt-patterns.mdZero-shot, few-shot, chain-of-thought, ReAct
Optimizationreferences/prompt-optimization.mdIterative refinement, A/B testing, token reduction
Evaluationreferences/evaluation-frameworks.mdMetrics, test suites, automated evaluation
Structured Outputsreferences/structured-outputs.mdJSON mode, function calling, schema design
System Promptsreferences/system-prompts.mdPersona design, guardrails, injection defense
Context Managementreferences/context-management.mdAttention budget, degradation patterns, context optimization

Prompt Examples

Zero-shot vs. Few-shot

Zero-shot (baseline):

Classify the sentiment of the following review as Positive, Negative, or Neutral.

Review: {{review}}
Sentiment:

Few-shot (improved reliability):

Classify the sentiment of the following review as Positive, Negative, or Neutral.

Review: "The battery life is incredible, lasts all day."
Sentiment: Positive

Review: "Stopped working after two weeks. Very disappointed."
Sentiment: Negative

Review: "It arrived on time and matches the description."
Sentiment: Neutral

Review: {{review}}
Sentiment:
Before/After Optimization

Before (vague, inconsistent outputs):

Summarize this document.

{{document}}

After (structured, token-efficient):

Summarize the document below in exactly 3 bullet points. Each bullet must be one sentence and start with an action verb. Do not include opinions or information not present in the document.

Document:
{{document}}

Summary:

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
Show full SKILL.md (157 more words)Show less
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

Coverage Note

Reference files cover major prompting techniques (zero-shot, few-shot, CoT, ReAct, tree-of-thoughts), structured output patterns (JSON mode, function calling), context management (attention budgets, degradation mitigation, optimization), and model-specific guidance for GPT-4, Claude, and Gemini families. Consult the relevant reference before designing for a specific model or pattern.

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

© Jeffallan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in skills/prompt-engineer of Jeffallan/claude-skills.

  • SKILL.md
  • references/context-management.md
  • references/evaluation-frameworks.md
  • references/prompt-optimization.md
  • references/prompt-patterns.md
  • references/structured-outputs.md
  • references/system-prompts.md

Open the folder on GitHubat commit 1be15d8

Compare with similar skills

Prompt Engineer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Prompt Engineer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Prompt Engineer this skillJeffallan/claude-skills12k—~1.5kAutomated safety check: PassMIT
Building Agent Systemstelagod/code-abyss243—~691Automated safety check: PassMIT
Agents Best PracticesDenisSergeevitch/agents-best-practices2.4k—~7.4kAutomated safety check: PassMIT
Dt Obs GenaiDynatrace/dynatrace-for-ai162—~4.5kAutomated safety check: PassApache-2.0
Context Auditundefined-ui/second-brain-os1k—~802Automated safety check: PassMIT
Senior Prompt Engineeralirezarezvani/claude-skills28k1 repos~2.5kAutomated safety check: PassMIT

Similar skills

  • Building Agent Systems

    telagod/code-abyss

    AI agent and LLM system engineering reference covering single-agent dev (ReAct, tool calling, plan-execute), multi-agent coordination (swarm, role decomposition, file locking), LLM security (prompt…

    243 GitHub stars~691 tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Agents Best Practices

    DenisSergeevitch/agents-best-practices

    A skill your agent uses when designing, generating an MVP blueprint for, auditing, troubleshooting, refactoring, or explaining an agentic harness for any domain.

    2.4k GitHub stars~7.4k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Dt Obs Genai

    Dynatrace/dynatrace-for-ai

    Analyze & debug GenAI/LLM apps: token cost & caching by prompt, model & provider; latency/errors; agent & tool loops/failures; conversations; guardrails; evaluations; OpenTelemetry/dt-evals setup.

    162 GitHub stars~4.5k tokensUpdated 8 days ago
    AI & LLM EngineeringAuto-check passed
  • Context Audit

    undefined-ui/second-brain-os

    Audit an agent's context layout against the four places: system prompt, tools, history, tail.

    1k GitHub stars~802 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Senior Prompt Engineer

    alirezarezvani/claude-skills

    A skill your agent uses when the user asks to optimize prompts, design prompt templates, evaluate LLM outputs with an eval set, measure RAG retrieval quality, validate agent/tool configurations…

    28k GitHub starsUsed in 1 repo~2.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Context Engineering Review

    mohitagw15856/pm-claude-skills

    Review what an LLM feature or agent actually puts in its context window — and find what's bloating, missing, or fighting itself.

    1.4k GitHub stars~1.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed

More from Jeffallan/claude-skills

All 58 skills in this repo
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • CLI Developer

    Jeffallan/claude-skills

    Walks through designing, building and polishing a command-line tool: user workflow and command hierarchy, implementation in commander, click, typer or cobra, completions and cross-platform testing.

    12k GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Kubernetes Specialist

    Jeffallan/claude-skills

    Creates and checks Kubernetes manifests, Helm charts, RBAC and network policies, and helps debug pod problems, with kubectl checks and rollback steps.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Laravel Specialist

    Jeffallan/claude-skills

    Builds Laravel 10+ applications with Eloquent models, Sanctum authentication, Horizon queues, API resources and Livewire components, tested with Pest or PHPUnit.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Pandas Pro

    Jeffallan/claude-skills

    Handles pandas DataFrame work: cleaning, merging, groupby aggregation, pivots, time-series resampling and memory tuning, with checks on dtypes, shapes and nulls.

    12k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Apache Spark Engineer

    Jeffallan/claude-skills

    Guides writing and tuning Apache Spark jobs: DataFrame and RDD code, Spark SQL, partitioning, caching, shuffle tuning and structured streaming.

    12k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed

Questions about Prompt Engineer

What does Prompt Engineer do?

Designs, tests and refines LLM prompts: zero-shot, few-shot and chain-of-thought patterns, system prompts, structured output schemas and evaluation test suites. The agent defines the task, success criteria, constraints and edge cases, picks a pattern such as zero-shot, few-shot or chain-of-thought, and writes clear instructions. It then runs diverse test cases and measures quality.

When should I use Prompt Engineer?

Prompt Engineer fits situations like: designing prompts for a new LLM application; improving an existing prompt's accuracy or cutting its token use; writing a system prompt with a persona and guardrails; creating JSON schemas for function calling or JSON mode.

How do I install Prompt Engineer in Claude Code?

Run `npx skills add Jeffallan/claude-skills --skill prompt-engineer -a claude-code`. Or copy the skill folder (skills/prompt-engineer in Jeffallan/claude-skills) into .claude/skills/prompt-engineer in your project. Claude Code loads it when a task matches its description.

How do I install Prompt Engineer in Codex?

Run `npx skills add Jeffallan/claude-skills --skill prompt-engineer -a codex`. Or copy the skill folder (skills/prompt-engineer in Jeffallan/claude-skills) into .agents/skills/prompt-engineer in your project. Codex loads it when a task matches its description.

Can I use Prompt Engineer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Jeffallan/claude-skills --skill prompt-engineer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/prompt-engineer, .gemini/skills/prompt-engineer, .github/skills/prompt-engineer and .opencode/skills/prompt-engineer in your project.

What does Prompt Engineer need to run?

SKILL.md names no scripts, command-line tools or credentials: Prompt Engineer is instructions for the agent only.

Does Prompt Engineer access the network?

SKILL.md names 3 domains. As links in the text: github.com, synergetic.solutions and jeffallan.github.io. This is read from the text; nothing was executed.

Is Prompt Engineer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Prompt Engineer use?

Prompt Engineer is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Prompt Engineer use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 26k tokens, read only when the agent opens those files.

What are the alternatives to Prompt Engineer?

Skills that share tags, products or a category with Prompt Engineer: Building Agent Systems (telagod/code-abyss, 243 stars), Agents Best Practices (DenisSergeevitch/agents-best-practices, 2.4k stars), Dt Obs Genai (Dynatrace/dynatrace-for-ai, 162 stars) and Context Audit (undefined-ui/second-brain-os, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Prompt Engineer?

Jeffallan (a GitHub user) maintains it in Jeffallan/claude-skills, which has 11,788 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 3, 2026.

Source: Jeffallan/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.