Back to Skills Library
Prompt EngineeringLLMContextAI Agent Skill

prompt-engineering-patterns

Battle-tested prompt engineering patterns including few-shot demonstrations, role calibration, and schema constraints.

wshobson/agents
20.2k stars
20.2k installs
Updated: 2026-07-19

Install Options

Install into Claude Code, Cursor, Codex, or Antigravity with:

$ npx skills add wshobson/agents@prompt-engineering-patterns

Real Work Situation Solved

Decide between Prompting, RAG, or Fine-tuning for your AI feature

The model lacks domain knowledge - do you fix the prompt, build RAG, or fine-tune?

5-Step Action Framework

  1. 1Ask: Is the issue missing knowledge or wrong format/style? New knowledge → Prompt/RAG; Format/tone → Few-shot or Fine-tuning.
  2. 2Ask: Does the data change frequently? If yes → RAG is required; fine-tuning will go stale immediately.
  3. 3Check document size: If under 10 pages, inject directly into the context window before engineering a RAG pipeline.
  4. 4Evaluate engineering cost: Prompting (1 day) → RAG (1-2 weeks) → Fine-tuning (1-2 months + continuous retraining).
  5. 5Always prototype cheapest-first: Optimize system prompt → Build RAG when exceeding context → Fine-tune only if RAG fails on specialized formatting.
Before

"Let's just collect all data and fine-tune a model for maximum accuracy."

After

"Docs change weekly → Use RAG with hybrid search. Injected 3 few-shot examples into the system prompt to hit 80% quality without expensive fine-tuning."

Related Course Lesson

AI Product ManagementLesson 6

Go to Lesson

SKILL.md Source Instructions

SKILL.md • Read-only preview
# Prompt Engineering Patterns

Apply systematic prompt patterns to maximize reasoning reliability without expensive model retraining.