wshobson avatar

Prompt Engineering Patterns

If you're building production LLM apps and tired of inconsistent outputs, this handles the advanced prompt engineering patterns that actually matter. It covers structured outputs with Pydantic schemas, chain-of-thought reasoning with self-verification, and dynamic few-shot example selection using semantic similarity. The JSON mode examples alone will save you hours of parsing headaches. What I like most is the progressive disclosure approach, starting simple and adding complexity only when needed. It includes concrete patterns for A/B testing prompts, handling malformed responses, and building reusable template systems with proper variable interpolation.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
10
skills.sh installs
24.3K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill prompt-engineering-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Prompt Engineering Patterns

Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability.

When to Use This Skill

  • Designing complex prompts for production LLM applications
  • Optimizing prompt performance and consistency
  • Implementing structured reasoning patterns (chain-of-thought, tree-of-thought)
  • Building few-shot learning systems with dynamic example selection
  • Creating reusable prompt templates with variable interpolation
  • Debugging and refining prompts that produce inconsistent outputs
  • Implementing system prompts for specialized AI assistants
  • Using structured outputs (JSON mode) for reliable parsing

Core Capabilities

1. Few-Shot Learning

  • Example selection strategies (semantic similarity, diversity sampling)
  • Balancing example count with context window constraints
  • Constructing effective demonstrations with input-output pairs
  • Dynamic example retrieval from knowledge bases
  • Handling edge cases through strategic example selection

2. Chain-of-Thought Prompting

Sponsors

Details

Repository
github.com/wshobson/agents
Categories
AI & Agent Building, Debugging, Design & UI/UX

More from wshobson/agents

All 174
1langchain-ai avatarlangchain-fundamentalslangchain-ai/langchain-skillsCreate LangChain agents with create_agent, define tools, and use middleware for human-in-the-loop and error handling.18.2Kskills.sh installs
2google avataragent-platform-eval-flywheelgoogle/skillsMeasures and improves the quality of AI models and agents on Google Cloud using the Eval Quality Flywheel methodology. Use when evaluating an agent or model, bu9.3Kskills.sh installs
3google avataragent-platform-inferencegoogle/skillsConnects to and performs inference with Google Cloud Agent Platform GenAI models, including First-Party Gemini models and Third-Party OpenMaaS models (Llama, De9.1Kskills.sh installs
4google avatarbigquery-ai-mlgoogle/skillsLeverages BigQuery's built-in machine learning and GenAI capabilities for advanced data analytics. Use when you need to write SQL queries that perform time-seri8Kskills.sh installs
5starchild-ai-agent avatarorderly-onboardingstarchild-ai-agent/official-skillsOrderly Network onboarding: omnichain perps infra, MCP server, SDK and CLI quickstart. Also indexes executed Orderly fills into Starchild trade analytics. Use w7.1Kskills.sh installs
6github avatarsuggest-awesome-github-copilot-promptsgithub/awesome-copilotSuggest relevant GitHub Copilot prompt files from the awesome-copilot repository based on current repository context and chat history, avoiding duplicates with 6.8Kskills.sh installs