Agent skill

Prompt Engineering

by diegosouzapw in diegosouzapw/awesome-omni-skills

Prompt Engineering Patterns workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

MITAuto-check passedAI & LLM Engineering

Install Prompt Engineering

skills CLI
$ npx skills add diegosouzapw/awesome-omni-skills --skill prompt-engineering -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install diegosouzapw/awesome-omni-skills prompt-engineering --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/diegosouzapw/awesome-omni-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills_omni/prompt-engineering .claude/skills/prompt-engineering && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
prompt-engineering
GitHub stars
159
Token cost
~3.4k tokens
SKILL.md length
1,582 words
Files
17 (incl. scripts, references, assets)
Skills in repo
39
Repo updated
First seen
Licence
MIT

At a glance

Prompt Engineering Patterns workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

  • Works in 6 steps: The model ignores instructions → JSON or structured output breaks → Hallucinations increase after adding… → …
  • The user needs an expert guide to prompt engineering patterns
  • SKILL.md covers Overview, When to Use This Skill, Operating Table and Workflow, plus 7 more sections
  • Runs Python scripts from its folder

What it does

Prompt Engineering is an agent skill from diegosouzapw/awesome-omni-skills. Prompt Engineering Patterns workflow skill. Use this skill when the user needs an expert guide to prompt engineering patterns, prompt debugging, and prompt optimization. Use when the user wants to improve prompts, choose prompting strategies, increase output reliability, or diagnose agent behavior.

Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 21 other files, including scripts, reference files and assets (for example `ATTRIBUTION.md`, `OMNI_ENHANCED.json` and `ORIGIN.md`).

It sits in AI & LLM Engineering, covering Prompt engineering. The repository describes itself as: Public repository of AI coding skills, curated improved best-practice skills, and runtime surfaces for CLI, API, MCP, and A2A. The licence is MIT.

When your agent uses it

  • The user needs an expert guide to prompt engineering patterns
  • Prompt debugging
  • Prompt optimization
  • The user wants to improve prompts

Example prompts

  • “/prompt-engineering”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. The model ignores instructions
  2. JSON or structured output breaks
  3. Hallucinations increase after adding context
  4. Few-shot examples make outputs too narrow
  5. Tool-use prompts produce invented arguments or pretend actions happened
  6. The prompt became long but not better

What it can do on your machine

Read from SKILL.md and the folder at commit c3af004. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python, from the files we listed), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Prompt Engineering loads about 3.4k tokens when it runs, and up to ~5.3k if it reads all its reference files. Until then it costs about 80 tokens; SKILL.md has 1,582 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~80
When it runs · the whole SKILL.md, loaded when a task matches
~3.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from diegosouzapw/awesome-omni-skills at commit c3af004, republished under its MIT licence (© diegosouzapw). 1,582 words, ~3,424 tokens.

Download SKILL.mdSave it as .claude/skills/prompt-engineering/SKILL.md (or your agent's skills folder). This skill also uses 16 other files; get the full folder from GitHub.
name
prompt-engineering
description
Prompt Engineering Patterns workflow skill. Use this skill when the user needs an expert guide to prompt engineering patterns, prompt debugging, and prompt optimization. Use when the user wants to improve prompts, choose prompting strategies, increase output reliability, or diagnose agent behavior.
version
0.0.1
category
ai-agents
tags
prompt-engineering, prompt-design, few-shot, structured-outputs, tool-calling, debugging, omni-enhanced
complexity
advanced
risk
caution
tools
codex-cli, claude-code, cursor, gemini-cli, opencode
source
omni-team
author
Omni Skills Team
date_added
2026-04-15
date_updated
2026-04-19

Prompt Engineering Patterns

Overview

Use this skill to design, review, and debug prompts with an execution-focused workflow.

This skill is not only about wording. Good prompt engineering also includes:

  • choosing the right task pattern
  • separating stable instructions from task data
  • defining an output contract before generation
  • deciding when examples are necessary
  • using structured outputs or tool/function calling when reliability matters
  • evaluating prompt behavior with a small test set instead of guessing

The upstream intent is preserved: this is an expert guide for prompt engineering patterns, best practices, and optimization techniques. The enhanced version makes those patterns operational so an agent can select, apply, and troubleshoot them safely.

Open these support files when needed:

  • references/prompt-patterns-reference.md for the decision matrix, anti-patterns, and prompt review checklist
  • examples/prompt-patterns-example-pack.md for before/after prompt rewrites and expected outcomes across common task types

When to Use This Skill

Use this skill when the user asks to:

  • improve a weak or inconsistent prompt
  • choose between zero-shot, few-shot, decomposition, tool use, or schema-constrained output
  • debug why an agent ignores instructions, produces malformed output, or hallucinates
  • make outputs easier to parse, compare, or automate downstream
  • design prompt templates for repeated tasks
  • review prompt quality before shipping an agent workflow

Do not rely on prompt engineering alone when the real problem is:

  • missing or stale knowledge that should come from retrieval or attached context
  • a need to perform actions in external systems, which should use tools/function calling
  • missing evaluation coverage, where the right fix is a test set rather than more prompt text
  • policy or role conflicts caused by system/developer instructions outside the prompt under review

Operating Table

Task shapeRecommended starting patternOutput contractUse examples?Common failure signalEscalation path
ClassificationDirect instruction with explicit labelsSingle label or short JSON objectOptional; useful for ambiguous classesModel invents labels or mixes categoriesAdd label definitions and 3-5 examples
ExtractionDelimited source text plus field listStructured output or schemaYes for edge casesMissing fields, guessed values, malformed JSONUse schema-constrained output and null rules
SummarizationInstruction + audience + length + must-include pointsBullets, template, or short proseSometimesSummary omits critical facts or becomes too verboseAdd coverage criteria and one good example
TransformationInput/output format definitionTemplate or strict schemaUsuallyStyle drift, field drift, inconsistent formattingProvide exact before/after examples
PlanningRequest ordered steps, assumptions, and constraintsNumbered plan or tableOptionalVague plans, hidden assumptionsAsk for constraints and verification checklist
Tool useDescribe tool purpose, inputs, and boundariesTool/function callRarelyInvented arguments or simulated actionsTighten tool descriptions and argument schema
Machine-readable generationSchema-first designStructured outputs or function/tool callOptionalInvalid JSON or extra commentaryPrefer schema/tool calling over “respond in JSON”
Long-context reasoningDelimit sources and ask for grounded synthesisSummary, table, or cited answerOptionalHallucinations increase after adding contextReduce noise, label sources, require evidence mapping

For more detailed routing, open references/prompt-patterns-reference.md.

Workflow

  1. Classify the task

    • Determine whether the job is classification, extraction, summarization, transformation, planning, tool use, or constrained generation.
    • Do not start by tweaking phrasing blindly.
  2. Define success criteria

    • Write down what a good answer must contain.
    • Include format, correctness constraints, required fields, and unacceptable behaviors.
    • If a downstream system must parse the output, decide that now.
  3. Separate instruction layers

    • Keep stable rules in higher-priority instructions.
    • Keep user content, examples, and source material clearly delimited.
    • Avoid mixing quoted user text with actual instructions.
  4. Draft the smallest prompt that can work

    • State the task clearly.
    • Provide only the context needed.
    • Specify the expected output shape.
    • Use delimiters for inputs, source text, and examples.
  5. Choose the output contract

    • Use free text for open-ended writing.
    • Use a template for human-readable consistency.
    • Use structured outputs or function/tool calling when parseability and automation matter.
    • Do not treat free-form “respond in JSON” as the reliability default.
  6. Add examples only when they improve behavior

    • Prefer 2-5 compact, representative examples.
    • Cover edge cases that the model is currently missing.
    • Remove examples that anchor the model too narrowly.
  7. Run a small evaluation set

    • Test 3-5 representative cases, including one edge case.
    • Check instruction adherence, factual grounding, format validity, and unnecessary verbosity.
    • Keep one baseline and one revised variant so the delta is visible.
  8. Debug one variable at a time

    • Change only one of: instruction order, delimiters, examples, context length, schema strictness, or tool description.
    • Record what changed and whether behavior improved.

Few-Shot Learning

Use few-shot prompting when the model understands the task class but performs inconsistently on format, edge cases, or style.

Best practices:

  • Keep examples short and representative.
  • Match the real distribution of inputs.
  • Show the exact output format you want.
  • Include borderline cases when labels or extraction rules are subtle.
  • Prefer a few high-quality examples over many noisy ones.

Use few-shot sparingly when:

  • the task is already simple and explicit instructions are enough
  • examples may bias the model toward a narrow pattern
  • long examples crowd out the actual source material

See examples/prompt-patterns-example-pack.md for concrete before/after rewrites.

Chain-of-Thought Prompting

Use this section carefully.

Do not treat best practice as “ask for hidden chain-of-thought verbatim.” A safer and more durable pattern is to ask for the observable artifact you actually need, such as:

  • a short numbered plan
  • key assumptions
  • a brief justification
  • a checklist-based verification pass
  • structured intermediate fields

Good uses:

  • planning a sequence of actions
  • surfacing assumptions before a recommendation
  • checking whether all required constraints were applied
  • requiring evidence mapping from provided context

Bad uses:

  • requesting long unrestricted reasoning for simple tasks
  • forcing verbose rationale when only a label or structured extraction is needed
  • assuming more reasoning text always improves correctness

If accuracy improves only when the task is decomposed, ask for explicit sub-steps or intermediate outputs rather than unrestricted internal reasoning.

Show full SKILL.md (629 more words)Show less

Prompt Optimization

Optimize prompts in this order:

  1. task clarity
  2. instruction hierarchy
  3. output contract
  4. context quality
  5. examples
  6. evaluation coverage

Common effective optimizations:

  • move the most important instruction earlier
  • replace vague goals with testable constraints
  • delimit context and label each section
  • ask for grounded answers from provided material only
  • swap brittle format instructions for structured outputs
  • simplify prompts that accumulated conflicting requirements

Avoid “optimization” patterns that only make prompts longer without increasing control.

Template Systems

Use templates for repeated tasks with stable rules and changing inputs.

A good prompt template has distinct sections such as:

  • Role or operating mode: stable behavior rules
  • Task: what to do now
  • Constraints: must include, must avoid, policy or style limits
  • Context: source material or retrieved content
  • Output contract: exact schema, template, or format
  • Optional examples: only when needed

Template guidance:

  • keep placeholders explicit, such as {source_text} or {customer_question}
  • label each section clearly
  • avoid embedding instructions inside example data
  • version templates when production workflows depend on them
  • keep a small eval set with each reusable template

Troubleshooting

Use the diagnostic pattern: symptom -> likely cause -> confirming test -> corrective rewrite.

1. The model ignores instructions
  • Likely causes: critical constraints are buried late, mixed with context, or contradicted by higher-priority instructions.
  • Confirming test: move the key instruction to the top and remove nonessential context.
  • Corrective rewrite: separate rules, context, and input into labeled sections; make the required behavior concrete.
2. JSON or structured output breaks
  • Likely causes: free-form prompting, weak format instructions, or too many prose requirements mixed with formatting constraints.
  • Confirming test: compare a plain “respond in JSON” prompt against a schema-constrained or tool-based version.
  • Corrective rewrite: use structured outputs or function/tool calling when available; define null handling and required fields.
3. Hallucinations increase after adding context
  • Likely causes: context is noisy, unlabeled, contradictory, or too large relative to the task.
  • Confirming test: run the same prompt with a smaller, cleaner excerpt.
  • Corrective rewrite: label sources, remove irrelevant text, require answers to be grounded in provided context, and ask for uncertainty when evidence is missing.
4. Few-shot examples make outputs too narrow
  • Likely causes: examples are overly similar or accidentally teach content instead of pattern.
  • Confirming test: replace the examples with more varied inputs while keeping the same output contract.
  • Corrective rewrite: shorten examples, diversify them, and state the general rule explicitly.
5. Tool-use prompts produce invented arguments or pretend actions happened
  • Likely causes: tool boundaries are vague, argument requirements are underspecified, or the prompt encourages simulation.
  • Confirming test: tighten the tool description and add explicit “do not invent missing arguments” guidance.
  • Corrective rewrite: define tool purpose, argument schema, missing-input behavior, and when the model must ask for clarification.
6. The prompt became long but not better
  • Likely causes: accumulated patches, redundant examples, and conflicting instructions.
  • Confirming test: compare against a minimal baseline that preserves only task, constraints, and output contract.
  • Corrective rewrite: remove repeated guidance and rebuild from the workflow in this skill.

For a denser review checklist and anti-pattern matrix, use references/prompt-patterns-reference.md.

Additional Resources

Primary references used to shape this skill:

  • OpenAI Prompt Engineering Guide
  • OpenAI Structured Outputs Guide
  • OpenAI Function Calling Guide
  • OpenAI Model Spec
  • OpenAI Best Practices for Prompting
  • Anthropic prompt engineering guidance
  • Google Cloud prompt design guidance

Use references/prompt-patterns-reference.md for a compact operator-facing summary rather than reopening all primary docs during routine execution.

Hand off or pair with a different skill when the task is primarily about:

  • retrieval or grounding against external documents
  • tool/function integration and action execution
  • evaluation design and regression testing
  • output schema design for downstream systems
  • agent policy, role precedence, or system prompt governance

If the user request expands beyond prompt quality into data access, orchestration, or production controls, prompt engineering should remain one part of the solution, not the whole solution.

© diegosouzapw, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 16 other files (scripts, references, assets) in skills_omni/prompt-engineering of diegosouzapw/awesome-omni-skills.

  • SKILL.md
  • ATTRIBUTION.md
  • OMNI_ENHANCED.json
  • ORIGIN.md
  • agents/omni-import-router.md
  • assets/omni-import-source-manifest.json
  • examples/omni-import-operator-packet.md
  • examples/omni-import-prompt-template.md
  • examples/prompt-patterns-example-pack.md
  • metadata.json
  • references/omni-import-checklist.md
  • references/omni-import-playbook.md
  • references/omni-import-rubric.md
  • references/omni-import-source-summary.md
  • references/prompt-patterns-reference.md
  • scripts/omni_import_list_support_pack.py
  • … and 1 more

Open the folder on GitHubat commit c3af004

Compare with similar skills

Prompt Engineering next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Prompt Engineering compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Prompt Engineering this skilldiegosouzapw/awesome-omni-skills159—~3.4kAutomated safety check: PassMIT
Prompt Improverseverity1/claude-code-prompt-improver1.9k2 repos~1.7kAutomated safety check: PassMIT
Prompt Engineering Patternsynulihao/AgentSkillOS61715 repos~1.7kAutomated safety check: PassNone
Patch CreationPiebald-AI/tweakcc2.5k—~1.6kAutomated safety check: PassMIT
LLM Application DevMoizIbnYousaf/ai-agent-skills1.1k2 repos~1.3kAutomated safety check: PassMIT
Senior Prompt Engineermaslennikov-ig/claude-code-orchestrator-kit2604 repos~1.4kAutomated safety check: PassCustom licence

Similar skills

  • Prompt Improver

    severity1/claude-code-prompt-improver

    This skill enriches vague prompts with targeted research and clarification before execution.

    1.9k GitHub starsUsed in 2 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Prompt Engineering Patterns

    ynulihao/AgentSkillOS

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

    617 GitHub starsUsed in 15 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Patch Creation

    Piebald-AI/tweakcc

    Create and register new patches for tweakcc. An agent skill from Piebald-AI/tweakcc.

    2.5k GitHub stars~1.6k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • LLM Application Dev

    MoizIbnYousaf/ai-agent-skills

    Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration.

    1.1k GitHub starsUsed in 2 repos~1.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Senior Prompt Engineer

    maslennikov-ig/claude-code-orchestrator-kit

    Provides reference guides and Python scripts for prompt optimization, RAG evaluation, and agent orchestration when building or tuning LLM systems.

    260 GitHub starsUsed in 4 repos~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Codex Fable5

    baskduf/FableCodex

    Apply a Claude Fable 5 inspired operating style inside Codex.

    437 GitHub stars~1.6k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed

More from diegosouzapw/awesome-omni-skills

All 39 skills in this repo
  • Content Creator

    diegosouzapw/awesome-omni-skills

    Content Creator workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~4k tokensUpdated 3 mo ago
    Auto-check passed
  • Helm Chart Scaffolding

    diegosouzapw/awesome-omni-skills

    Helm Chart Scaffolding workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~2.4k tokensUpdated 3 mo ago
    Auto-check passed
  • Prompt Engineering Patterns

    diegosouzapw/awesome-omni-skills

    Prompt Engineering Patterns workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~4k tokensUpdated 3 mo ago
    Auto-check passed
  • Prompt Library

    diegosouzapw/awesome-omni-skills

    📝 Prompt Library workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~3.1k tokensUpdated 3 mo ago
    Auto-check passed
  • Protocol Reverse Engineering

    diegosouzapw/awesome-omni-skills

    Protocol Reverse Engineering workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~3.8k tokensUpdated 3 mo ago
    Auto-check passed
  • Puzzle Activity Planner

    diegosouzapw/awesome-omni-skills

    Puzzle Activity Planner workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~3.9k tokensUpdated 3 mo ago
    Auto-check passed

Questions about Prompt Engineering

What does Prompt Engineering do?

Prompt Engineering Patterns workflow skill. An agent skill from diegosouzapw/awesome-omni-skills. Prompt Engineering is an agent skill from diegosouzapw/awesome-omni-skills. Prompt Engineering Patterns workflow skill.

When should I use Prompt Engineering?

Prompt Engineering fits situations like: the user needs an expert guide to prompt engineering patterns; prompt debugging; prompt optimization; the user wants to improve prompts.

How do I install Prompt Engineering in Claude Code?

Run `npx skills add diegosouzapw/awesome-omni-skills --skill prompt-engineering -a claude-code`. Or copy the skill folder (skills_omni/prompt-engineering in diegosouzapw/awesome-omni-skills) into .claude/skills/prompt-engineering in your project. Claude Code loads it when a task matches its description.

How do I install Prompt Engineering in Codex?

Run `npx skills add diegosouzapw/awesome-omni-skills --skill prompt-engineering -a codex`. Or copy the skill folder (skills_omni/prompt-engineering in diegosouzapw/awesome-omni-skills) into .agents/skills/prompt-engineering in your project. Codex loads it when a task matches its description.

Can I use Prompt Engineering in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add diegosouzapw/awesome-omni-skills --skill prompt-engineering -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/prompt-engineering, .gemini/skills/prompt-engineering, .github/skills/prompt-engineering and .opencode/skills/prompt-engineering in your project.

What does Prompt Engineering need to run?

Going by SKILL.md and its folder, Prompt Engineering needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Prompt Engineering access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Prompt Engineering safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Prompt Engineering use?

Prompt Engineering is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Prompt Engineering use?

About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Prompt Engineering?

Skills that share tags, products or a category with Prompt Engineering: Prompt Improver (severity1/claude-code-prompt-improver, 1.9k stars), Prompt Engineering Patterns (ynulihao/AgentSkillOS, 617 stars), Patch Creation (Piebald-AI/tweakcc, 2.5k stars) and LLM Application Dev (MoizIbnYousaf/ai-agent-skills, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Prompt Engineering?

diegosouzapw (a GitHub user) maintains it in diegosouzapw/awesome-omni-skills, which has 159 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on July 8, 2026.

Source: diegosouzapw/awesome-omni-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.