prompt-engineering-patterns

prompt-engineering-patterns is a skill for Claude Code from HermeticOrmus/claude-code-game-development. It costs 41 tokens per session (1,431 once invoked), scanned A, a copy of prompt-engineering-patterns, MIT.

A collection of patterns for writing and organising instructions for AI language models, including examples, reusable templates, and step-by-step reasoning methods.

In plain words
What is it for?
Use it to design prompts, select examples, create templates, and refine inconsistent AI outputs.
Why use it?
It helps improve the consistency and controllability of model responses when simple instructions are not enough.

Skill for Claude Code

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

Part of the llm-application-dev plugin — 4 skills shipped together

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.

agentmods
npx agentmods add skills/hermeticormus/claude-code-game-development/prompt-engineering-patterns
Any agent
npx skills add HermeticOrmus/claude-code-game-development --skill prompt-engineering-patterns
Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/claude-code-game-development

Made for: Claude Code.

Or install llm-application-dev, the plugin that ships this one along with the rest of its 4 skills.

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 prompt-engineering-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/hermeticormus/claude-code-game-development/prompt-engineering-patterns.svg)](https://agentmods.dev/skills/hermeticormus/claude-code-game-development/prompt-engineering-patterns)
Your own site
<a href="https://agentmods.dev/skills/hermeticormus/claude-code-game-development/prompt-engineering-patterns"><img src="https://agentmods.dev/badge/skills/hermeticormus/claude-code-game-development/prompt-engineering-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,431 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00041 $0.01431
Opus 5 $0.00020 $0.00715
Sonnet 5 $0.00008 $0.00286
Haiku 4.5 $0.00004 $0.00143

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

Security

Grade A, and why

prompt-engineering-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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/optimize-prompt.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

This is a copy

100% identical to prompt-engineering-patterns — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/llm-application-dev/skills/prompt-engineering-patterns/SKILL.md · 202 lines

How it starts

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

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

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

  • Step-by-step reasoning elicitation
  • Zero-shot CoT with "Let's think step by step"
  • Few-shot CoT with reasoning traces
  • Self-consistency techniques (sampling multiple reasoning paths)
  • Verification and validation steps

3. Prompt Optimization

  • Iterative refinement workflows
  • A/B testing prompt variations
  • Measuring prompt performance metrics (accuracy, consistency, latency)
  • Reducing token usage while maintaining quality
  • Handling edge cases and failure modes

4. Template Systems

  • Variable interpolation and formatting
  • Conditional prompt sections
  • Multi-turn conversation templates
  • Role-based prompt composition
  • Modular prompt components

5. System Prompt Design

  • Setting model behavior and constraints
  • Defining output formats and structure
  • Establishing role and expertise
  • Safety guidelines and content policies
  • Context setting and background information

Quick Start

from prompt_optimizer import PromptTemplate, FewShotSelector

# Define a structured prompt template
template = PromptTemplate(
    system="You are an expert SQL developer. Generate efficient, secure SQL queries.",
    instruction="Convert the following natural language query to SQL:\n{query}",
    few_shot_examples=True,
    output_format="SQL code block with explanatory comments"
)

# Configure few-shot learning
selector = FewShotSelector(
    examples_db="sql_examples.jsonl",
    selection_strategy="semantic_similarity",
    max_examples=3
)

# Generate optimized prompt
prompt = template.render(
    query="Find all users who registered in the last 30 days",
    examples=selector.select(query="user registration date filter")
)

Read the full file on GitHub · 202 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 202 lines · 41 tokens per session scan A ed340d91570e

Subscribe to this mod's changes

prompt-engineering-patterns is a skill published in the GitHub repository HermeticOrmus/claude-code-game-development (60 stars, last pushed 3mo ago), licensed MIT. It adds 41 tokens to every session and 1,431 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to prompt-engineering-patterns, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

omh-model-setup

This is a Hermes-native model-setup workflow skill.

rlaope/oh-my-hermes · 75 tokens

omh-llm-app-dev

This is a Hermes-native llm-app-dev workflow skill.

rlaope/oh-my-hermes · 102 tokens

omh-model-optimization

This is a Hermes-native model-optimization workflow skill.

rlaope/oh-my-hermes · 82 tokens

model-onboarding

Onboard a new model generation or sibling into oh-my-hermes: probe router recognition, research the official contract, write trait-to-counter calibration, place routing in both lanes, price from documented list only, gate machine config on a served route, prove with the gates, close with a benchmark pair. Use when a…

rlaope/oh-my-hermes · 107 tokens

lijigang-skill

李继刚(Prompt布道师/Prompt之神)的AI提示词创作思维——Lisp压缩美学+哲学底色+结构化写作+极简主义。 触发词:「李继刚视角」「像李继刚那样写」「Prompt之神」「汉语新解」「压缩美学」「ljg-skills」「Lisp提示词」。 擅长:Lisp伪代码风格提示词编写(公文笔杆子/汉语新解/七把武器系列)、哲学级Prompt思考框架(从工具论到道)、结构化写作方法论、认知工作流设计(13+1 Skills)、技术大会演讲、深度播客对话。.

momozi1996/awesome-ai-persona-skills · 169 tokens

promptscript

PromptScript language expert for reading, writing, modifying, and troubleshooting .prs files. Use when working with PromptScript syntax, creating or editing .prs files, adding blocks like @identity, @standards, @restrictions, @shortcuts, @skills, or @agents, configuring promptscript.yaml, resolving compilation errors…

mrwogu/promptscript · 135 tokens