prompt-engineering

prompt-engineering is a skill for Claude Code from itsmostafa/llm-engineering-skills. It costs 33 tokens per session (2,124 once invoked), scanned B, original, MIT.

A guide to writing instructions for AI models so they produce more useful and consistent results. It covers clear wording, background information, examples, structure, and output formats.

In plain words
What is it for?
Use it to design prompts, improve AI output, structure complex requests, and investigate why a model is responding poorly.
Why use it?
Vague instructions can lead to incorrect, inconsistent, or poorly formatted answers. This helps you describe the task and expected result more precisely.

Skill for Claude Code

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

Part of the llm-engineering-skills plugin — 9 skills shipped together

Good fit Use it to design prompts, improve AI output, structure complex requests, and investigate why a model is responding poorly.

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

Made for: Claude Code.

Or install llm-engineering-skills, the plugin that ships this one along with the rest of its 9 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

README.md
[![agentmods](https://agentmods.dev/badge/skills/itsmostafa/llm-engineering-skills/prompt-engineering/github.svg)](https://agentmods.dev/skills/itsmostafa/llm-engineering-skills/prompt-engineering)
Your own site
<a href="https://agentmods.dev/skills/itsmostafa/llm-engineering-skills/prompt-engineering"><img src="https://agentmods.dev/badge/skills/itsmostafa/llm-engineering-skills/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/itsmostafa/llm-engineering-skills/prompt-engineering"><img src="https://agentmods.dev/badge/skills/itsmostafa/llm-engineering-skills/prompt-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,124 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00033 $0.02124
Opus 5 $0.00016 $0.01062
Sonnet 5 $0.00007 $0.00425
Haiku 4.5 $0.00003 $0.00212

Measured 9d ago against content hash 3a40ec66728d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

prompt-engineering scanned grade B with 1 finding 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 9d 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.

Asks the agent to reveal its instructionsmediumSystem prompt leakage

Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.

**Golden rule**: Show your prompt to a colleague with minimal context. If they're confused, the model will be too.
skills/prompt-engineering/SKILL.md · 349 lines

How it starts

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

Prompt Engineering

Prompt engineering is the practice of designing inputs that guide LLMs to produce desired outputs. Effective prompts reduce errors, improve consistency, and unlock model capabilities.

Table of Contents

Core Principles

Golden rule: Show your prompt to a colleague with minimal context. If they're confused, the model will be too.

  1. Be explicit - State exactly what you want; never assume the model knows your preferences
  2. Provide context - Include what the output is for, who the audience is, and what success looks like
  3. Use structure - Sequential steps, XML tags, and clear formatting reduce ambiguity
  4. Show examples - Demonstrations outperform descriptions for complex formats

Be Clear and Direct

Treat the model as a capable but context-free collaborator. Specify:

  • What the task results will be used for
  • What audience the output is meant for
  • What a successful completion looks like

Vague vs Specific

# Vague
Analyze this data and give insights.

# Specific
Analyze this Q2 sales data for our board presentation.
1. Identify the top 3 revenue trends
2. Flag any anomalies exceeding 15% variance
3. Recommend 2-3 actionable next steps
Format as bullet points, max 200 words.

Sequential Steps

Use numbered lists for multi-step tasks:

Your task is to anonymize customer feedback.

Instructions:
1. Replace customer names with "CUSTOMER_[ID]"
2. Replace emails with "EMAIL_[ID]@example.com"
3. Redact phone numbers as "PHONE_[ID]"
4. Leave product names intact
5. Output only processed messages, separated by "---"

Read the full file on GitHub · 349 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. 9d ago First seen · 349 lines · 33 tokens per session scan B 3a40ec66728d

Subscribe to this mod's changes

prompt-engineering is a skill published in the GitHub repository itsmostafa/llm-engineering-skills (23 stars, last pushed 4mo ago), licensed MIT. It adds 33 tokens to every session and 2,124 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (asks the agent to reveal its instructions). 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

better-prompt

A prompt editor that turns rough instructions for AI systems into clearer, more complete prompts. It follows published OpenAI and Anthropic guidance.

huangwb8/skills · 107 tokens

image-prompt

Use when the user wants to turn a short idea into a rich, production-grade image-generation prompt — posters, landing-page or UI mockups, ads, editorial layouts, photoreal scenes, game screenshots, logos, or illustrations. Builds ONE structured, copy-paste-ready prompt optimized for gpt-image-2 by default, following…

veryCoolTimo/imagegen-skills · 148 tokens

kimi-prompting

Guidelines for composing effective prompts for Kimi CLI.

luhfilho/kimi-plugin-cross-platform · 0 tokens

ai-engineering-toolkit

6 production-ready AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, and product sense coaching.

sickn33/agentic-awesome-skills · 47 tokens

llm-redteam-overview

LLM red team category — full AATMF v3 tactic coverage (T01–T15). Routing skill: read this first to identify which tactic applies, then load the matching sub-skill. Maps to MITRE ATLAS where overlap exists.

PurpleAILAB/Decepticon · 58 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