prompt-engineer

prompt-engineer is a skill for Claude Code from shaharsha/claude-skills. It costs 247 tokens per session (20,880 once invoked), scanned A, original, MIT.

A set of instructions for designing and improving prompts and the surrounding context used by AI agents, chatbots, and assistants.

In plain words
What is it for?
Writing system prompts, tool descriptions, and agent instructions, plus planning, debugging, reviewing, or migrating AI-agent integrations.
Why use it?
It helps address agents that ignore instructions, choose the wrong tools, or behave inconsistently.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_SKILL_DIR} variable. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Part of the building-agents plugin — 3 skills shipped together , and of shaharsha-skills

Good fit Writing system prompts, tool descriptions, and agent instructions, plus planning, debugging, reviewing, or migrating AI-agent integrations.

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

Made for: Claude Code.

Or install building-agents, the plugin that ships this one along with the rest of its 3 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-engineer

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/shaharsha/claude-skills/prompt-engineer"><img src="https://agentmods.dev/badge/skills/shaharsha/claude-skills/prompt-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 247 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 20,880 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.00247 $0.20880
Opus 5.5 $0.00099 $0.08352
Sonnet 5.5 $0.00049 $0.04176
Haiku 4.5 $0.00025 $0.02088

Measured 9d ago against content hash 62966c3d70d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prompt-engineer 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 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.

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.

skills/prompt-engineer/SKILL.md · 499 lines

How it starts

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

Prompt Engineering for AI Agent APIs

First step (do this NOW, before reading further): run touch /tmp/.prompt-engineer-skill-loaded once. The ~/.claude/hooks/protect-prompts.sh PreToolUse hook blocks Edit/Write on prompt files (prompts/, system_prompt*, agents/tools/) until that flag exists; setting it confirms you've loaded these guidelines and lets subsequent edits proceed without re-loading the skill.

Guidelines for writing system prompts, tool descriptions, and agent instructions for building AI agents via the Claude, GPT, Gemini, Kimi, and Grok APIs. This covers both prompt engineering (crafting instruction text) and the broader discipline of context engineering (orchestrating everything the model sees — tools, memory, retrieved documents, state — to maximize the likelihood of desired behavior).

Step 0 — MANDATORY before anything else

Before reading the rest of this skill, do these two things in order. They are not optional and they are not "later." Skipping them is the #1 failure mode of this skill: the user repeatedly has to ask "did you read the provider-specific md?" because the universal section below got read in isolation and the version-specific knobs were never loaded.

0a. Identify the model family in scope

Look at the code, the file being edited, the SDK being imported, or what the user just said. Match against these signals — first hit wins. Split by model family, not platform: prompt engineering is identical whether GPT runs on OpenAI or Azure, or whether Claude runs on Anthropic or AWS Bedrock. This matters more now that each major platform hosts several families — AWS Bedrock serves GPT, Claude, Kimi, and Grok, Vertex AI serves Gemini, Claude, and Grok, and Microsoft Foundry serves GPT, Claude, Grok, and Kimi — so the platform alone never tells you which reference file to load; identify the model family and load that file.

Check the model ID and base_url before the import. Kimi and Grok are usually called through the OpenAI SDK (sometimes the Anthropic SDK) with a swapped base_url, so from openai alone does not mean GPT - match the Kimi and Grok rows first.

Read the full file on GitHub · 499 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 Changed · +11 lines · -73 tokens per session 62966c3d70d0
  2. 1mo ago Changed df7adf8a1651
  3. 1mo ago Changed · +26 lines 9f5bed3acba7
  4. 2mo ago First seen · 462 lines · 320 tokens per session scan A b3ede0c344a5

Subscribe to this mod's changes

prompt-engineer is a skill published in the GitHub repository shaharsha/claude-skills (6 stars, last pushed today), licensed MIT. It adds 247 tokens to every session and 20,880 once invoked, about $0.0010 per session on Opus 5.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-08-31.

Related

prompt-engineer compared with skills from other repositories

prompt-engineer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
prompt-engineershaharsha/claude-skillsSkill6todayMITA247Claude Code
llm-app-patternsdavila7/claude-code-templatesSkill33kyesterdayMITA54Claude Code, Codex
prompt-engineerJeffallan/claude-skillsSkill12k7d agoMITA93Claude Code
prompt-optimizationlangwatch/langwatchSkill5.0kyesterdayApache-2.0A105Claude Code, Codex
omh-model-optimizationrlaope/oh-my-hermesSkill5.2kyesterdayMITA84Claude Code, Codex
ideogram4digitalsamba/claude-code-video-toolkitSkill2.5kyesterdayMITA99Claude Code
prompt-library-for-startupsaws/agent-toolkit-for-awsSkill3.4kyesterdayApache-2.0A228Claude Code