few-shot-patterns

few-shot-patterns is a skill for Claude Code from Owl-Listener/ai-design-skills. It costs 14 tokens per session (580 once invoked), scanned A, original, MIT.

Guidance for using example input-and-output pairs to teach an AI the pattern you want it to follow.

In plain words
What is it for?
Creating varied, clear examples that guide an AI's format, style, reasoning pattern, and handling of easy or difficult inputs.
Why use it?
Examples can clarify ambiguous instructions, set expectations for output quality and length, and show how to handle unusual cases.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the prompt-architecture plugin — 7 skills, 3 commands shipped together

Good fit Creating varied, clear examples that guide an AI's format, style, reasoning pattern, and handling of easy or difficult inputs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/owl-listener/ai-design-skills/few-shot-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Owl-Listener/ai-design-skills --skill few-shot-patterns
Clone the repo
git clone --depth 1 https://github.com/Owl-Listener/ai-design-skills

Made for: Claude Code.

Or install prompt-architecture, the plugin that ships this one along with the rest of its 7 skills, 3 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for few-shot-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/owl-listener/ai-design-skills/few-shot-patterns/github.svg)](https://agentmods.dev/skills/owl-listener/ai-design-skills/few-shot-patterns)
Your own site
<a href="https://agentmods.dev/skills/owl-listener/ai-design-skills/few-shot-patterns"><img src="https://agentmods.dev/badge/skills/owl-listener/ai-design-skills/few-shot-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for few-shot-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/owl-listener/ai-design-skills/few-shot-patterns"><img src="https://agentmods.dev/badge/skills/owl-listener/ai-design-skills/few-shot-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 580 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.00580
Opus 5 $0.00007 $0.00290
Sonnet 5 $0.00003 $0.00116
Haiku 4.5 $0.00001 $0.00058

Measured 11d ago against content hash 623e9b92bfe0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

few-shot-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude-plugin/prompt-architecture/skills/few-shot-patterns/SKILL.md · 48 lines

How it starts

The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Few-Shot Patterns

Few-shot prompting provides examples of input-output pairs that demonstrate the desired behavior. The AI learns the pattern from the examples and applies it to new inputs. The quality of examples directly determines the quality of outputs.

Why Examples Work

Examples communicate what instructions alone cannot:

  • Implicit patterns: The AI picks up on format, style, and reasoning patterns from examples without being told explicitly
  • Ambiguity resolution: When instructions could be interpreted multiple ways, examples show which interpretation you want
  • Quality calibration: Examples set the bar for output quality, length, and depth
  • Edge case handling: Examples of tricky cases teach the AI how to handle similar situations

Example Design Principles

Diversity: Examples should cover different scenarios, not repeat the same type

  • Include easy cases, hard cases, and edge cases
  • Vary the input format and content
  • Show different valid output formats if applicable Clarity: Each example should demonstrate one clear pattern
  • Avoid examples that could be interpreted multiple ways
  • Make the mapping from input to output obvious
  • Remove irrelevant variation between examples Quality: Examples set the ceiling for output quality
  • Every example should be one you'd be happy to ship
  • If the example has a flaw, the AI will replicate that flaw
  • Invest time in crafting examples — they're worth more than instructions Ordering: The position of examples matters
  • Put the most representative example first
  • Put edge cases after common cases
  • End with an example closest to the expected input type

How Many Examples

  • Zero-shot: No examples. Relies entirely on instructions. Good for simple, well-understood tasks.
  • One-shot: Single example. Enough when the pattern is straightforward.
  • Few-shot (3-5): Multiple examples. Best for complex patterns or nuanced quality requirements.
  • Many-shot (5+): Diminishing returns but useful for highly variable tasks or when consistency is critical. Balance example count against context window cost. More examples means less room for other context.

Read the full file on GitHub · 48 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 48 lines · 14 tokens per session scan A 623e9b92bfe0

Subscribe to this mod's changes

few-shot-patterns is a skill published in the GitHub repository Owl-Listener/ai-design-skills (172 stars, last pushed 3mo ago), licensed MIT. It adds 14 tokens to every session and 580 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

prompt-optimization

Improve a prompt on the evaluations workbench through a measured loop. Score the baseline first, then duplicate the target column, form a hypothesis from failing rows, edit the copy's prompt draft, run, compare pass rate and cost, and repeat until the numbers hold. Use when the user asks to optimize or improve a…

langwatch/langwatch · 105 tokens

enhance-prompt

Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.

google-labs-code/stitch-skills · 41 tokens

prompt-engineer

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…

Jeffallan/claude-skills · 93 tokens

seedance-vocab-en

This skill should be used when an English Seedance 2.0 prompt needs clearer production wording, less generic prose, or precise vocabulary for camera, lighting, motion, VFX, audio, and constraints. Route blocked prompts through seedance-filter for context and boundary review.

Emily2040/seedance-2.0 · 61 tokens

ideogram4

Prompting patterns for Ideogram 4 text-to-image — best-in-class in-image text rendering and exact color/layout control via structured JSON captions. Use when generating images that need legible on-image text (title cards, thumbnails, logos, signage, CTAs), precise brand colors, or controlled spatial layout. Triggers…

digitalsamba/claude-code-video-toolkit · 99 tokens