LLM Call Pattern Selector
Pick the call architecture for an LLM feature: single call, chain, or router, output enforcement, cache layout, and injection handling.
Before & after
Same prompt, same agent — the only difference is the skill.
I can help you create a prompt for classification. You'd want to give the model examples of tickets and the categories you want to sort them into. Should the categories be specific (technical, billing, etc.) or broad? How many examples does the model need to learn from? Do you want it to rank confidence or just pick the best category? I could sketch out a basic prompt once I know more about your categories and data.
PROMPT TEMPLATE: Few-Shot Classification with Chain-of-Thought
→ STRUCTURE (proven pattern for reliability)
1. System prompt: Clear role + task specification
2. Few-shot examples: 4-6 annotated examples (critical for accuracy)
3. Reasoning instruction: "Think step by step"
4. Output format: Structured JSON (category, confidence, reasoning)
5. User input: Ticket to classify
→ COMPLETE TEMPLATE
System: "You are a support ticket classifier. Assign each ticket to exactly one category. Prioritize accuracy over speed."
Examples:
EXAMPLE 1:
Ticket: "My subscription won't renew"
Category: Billing
Confidence: 0.95
Reasoning: Keywords (subscription, renew) directly map to billing issue
EXAMPLE 2:
Ticket: "App crashes when uploading photos over 50MB"
Category: Technical
Confidence: 0.92
Reasoning: Crash + upload behavior = technical/performance issue, not usage question
EXAMPLE 3:
Ticket: "Can I export data if I cancel?"
Category: Account_Management (not Billing alone)
Confidence: 0.88
Reasoning: Data export = account feature question (secondary billing context)
[2-3 more examples following same structure]
→ USER INPUT FORMAT
New ticket: [USER TICKET TEXT]
Classify using chain-of-thought. Output JSON:
{"category": "...", "confidence": 0.XX, "reasoning": "..."}
→ TUNING NOTES
Model: Claude 3.5 Sonnet or equivalent (handles ambiguous tickets better)
Trap: Zero-shot (no examples) drops accuracy 15-25% on edge cases
Accuracy: Few-shot pattern achieves 89-94% on typical support queues
Confidence threshold: Flag tickets below 0.75 confidence for human review
Iterate: Collect misclassified tickets, add as new examples to improve modelAbout this skill
Decide how an LLM feature should call the model before anyone writes prompt text. Each choice names the failure it prevents and its cost and latency tradeoff.
What it does
- Maps each task shape (classify, extract, generate, reason, judge) to a default pattern and the trap it avoids
- Chooses between single call, chain, and cheap-model router, with a per-request cost and latency sanity check
- Enforces output through the API (schema or forced tool call) instead of 'respond in JSON', and handles truncation and refusals
- Lays out requests static-first for prompt caching and delimits untrusted content against injection
What you get
A call plan: one row per call with pattern, model tier, output mechanism, and unknown path, plus the request layout and the failure modes the design prevents.
Best for
Engineers designing or fixing an LLM-powered feature who need the architecture right before tuning wording.
SKILL.md preview
---
name: prompt-engineering-patterns
description: Pick the right call pattern for an LLM-powered feature before any prompt text is written - single call vs chain vs router, structured-output mechanism, few-shot vs instructions, reasoning mode, document placement, prompt-cache layout, and injection handling - and explain the tradeoff in cost, latency, and reliability. Use when the user says "how should I structure the LLM calls for this feature", "one prompt or a chain?", "should I use few-shot or chain-of-thought here", "how do I guarantee JSON", "my prompt is getting huge", "how do I lay this out for prompt caching", or casually "what's the best way to prompt for this?"
---
… (sign up to view the full skill)More ai & agents skills
View all AI & Agents skills →New Skill Scaffolder
Create a new Claude Code skill correctly: right mechanism, valid name and folder, a triggering description, and a smoke test.
Skill Library Lint and Overlap Report
Lint every skill in a repo at once: frontmatter, name-folder match, weak descriptions, overlapping triggers, broken refs, plus a CI script.
Self-Verifying Agent Loop: Plan, Check, Retry, Close
Turns a goal into a task plan with machine-run checks, executes with retry caps, escalates, and refuses to close until verified.
Skill Test Runner (Trigger and A/B)
Test a skill in fresh sessions: ready-to-run prompts, commands, and rubric for trigger recall, false triggers, and blind A/B.