prompt-engineering

prompt-engineering is a skill for Claude Code, Codex from hoangatg/ai-agent-toolkit. It costs 42 tokens per session (1,032 once invoked), scanned A, original, MIT.

A guide to writing prompts that produce more consistent results from large language models (LLMs), the systems behind tools such as ChatGPT.

In plain words
What is it for?
Use it to design system prompts, choose between direct instructions and examples, control output formats, and improve AI interactions through testing and refinement.
Why use it?
It helps reduce unclear or unreliable AI responses by defining the task, context, format, constraints, and examples.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design system prompts, choose between direct instructions and examples, control output formats, and improve AI interactions through testing and refinement.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoangatg/ai-agent-toolkit/prompt-engineering
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 hoangatg/ai-agent-toolkit --skill prompt-engineering
Clone the repo
git clone --depth 1 https://github.com/hoangatg/ai-agent-toolkit

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/prompt-engineering/github.svg)](https://agentmods.dev/skills/hoangatg/ai-agent-toolkit/prompt-engineering)
Your own site
<a href="https://agentmods.dev/skills/hoangatg/ai-agent-toolkit/prompt-engineering"><img src="https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/prompt-engineering/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 prompt-engineering

Your own site · 80×15
<a href="https://agentmods.dev/skills/hoangatg/ai-agent-toolkit/prompt-engineering"><img src="https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/prompt-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,032 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.00042 $0.01032
Opus 5 $0.00021 $0.00516
Sonnet 5 $0.00008 $0.00206
Haiku 4.5 $0.00004 $0.00103

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

Security

Grade A, and why

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

.agent/skills/prompt-engineering/SKILL.md · 163 lines

How it starts

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

Prompt Engineering

Design prompts that get reliable, high-quality results from LLMs.


1. Core Principles

Principle Description
Clarity Unambiguous instructions, one interpretation
Specificity Define format, length, tone, constraints
Context Provide relevant background, not noise
Examples Show desired output (few-shot)
Iteration Test, measure, refine systematically

2. Prompt Architecture

Anatomy of a Good Prompt

[System Role] → Who the AI is
[Context]     → Background information
[Task]        → What to do
[Format]      → How to output
[Constraints] → What NOT to do
[Examples]    → Few-shot demonstrations

System Prompt Design

Component Purpose
Persona Define expertise and behavior
Scope Boundaries of what to handle
Style Tone, formality, verbosity
Rules Hard constraints and guardrails

3. Prompting Strategies

Strategy Selection

Strategy When to Use
Zero-shot Simple, well-defined tasks
Few-shot Need consistent format/style
Chain-of-Thought Complex reasoning, math, logic
Self-Consistency High-stakes decisions (multiple runs)
Tree-of-Thought Exploration, creative problem-solving
ReAct Tool use, multi-step tasks

Chain-of-Thought Principles

  • Ask model to "think step by step"
  • Break complex problems into sub-problems
  • Request reasoning before final answer
  • Validate intermediate steps

4. Few-Shot Patterns

Design Principles

Principle Application
Representative examples Cover edge cases
Consistent format Same structure each example
Diverse difficulty Easy → Hard progression
Minimal examples 2-5 usually sufficient

Anti-Patterns

❌ Don't ✅ Do
20+ examples (context waste) 3-5 well-chosen examples
All similar examples Diverse representative cases
Examples without labels Clear input → output mapping
Ambiguous formatting Explicit delimiters

Read the full file on GitHub · 163 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. 8d ago First seen · 163 lines · 42 tokens per session scan A c91514e3cd6d

Subscribe to this mod's changes

prompt-engineering is a skill published in the GitHub repository hoangatg/ai-agent-toolkit (1 stars, last pushed 5mo ago), licensed MIT. It adds 42 tokens to every session and 1,032 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories