Prompt Engineering

Prompt Engineering is a skill for Claude Code from ralfyishere/rules-with-receipts. It costs 97 tokens per session (1,642 once invoked), scanned A, original, MIT.

A set of instructions for improving prompts, system prompts, and agent instructions through testing. A prompt is the text that tells an AI system how to behave.

In plain words
What is it for?
It helps write or revise reusable AI instructions, diagnose repeated model mistakes, and test whether a prompt change improves the intended behaviour.
Why use it?
It replaces guesswork with a repeatable process: identify a failure, make one targeted change, test it, and keep versions to catch regressions.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit It helps write or revise reusable AI instructions, diagnose repeated model mistakes, and test whether a prompt change improves the intended behaviour.

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

Made for: Claude Code.

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/ralfyishere/rules-with-receipts/prompt-engineering/github.svg)](https://agentmods.dev/skills/ralfyishere/rules-with-receipts/prompt-engineering)
Your own site
<a href="https://agentmods.dev/skills/ralfyishere/rules-with-receipts/prompt-engineering"><img src="https://agentmods.dev/badge/skills/ralfyishere/rules-with-receipts/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/ralfyishere/rules-with-receipts/prompt-engineering"><img src="https://agentmods.dev/badge/skills/ralfyishere/rules-with-receipts/prompt-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,642 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.00097 $0.01642
Opus 5 $0.00048 $0.00821
Sonnet 5 $0.00019 $0.00328
Haiku 4.5 $0.00010 $0.00164

Measured 9d ago against content hash 364fa25c0e32, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 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.

.claude/skills/prompt-engineering/SKILL.md · 82 lines

How it starts

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

Prompt Engineering

Purpose

A prompt is a program whose runtime is a model: it has specifiable behavior, test cases, regressions, and bugs. Most prompt "improvement" is vibe-editing — adding emphasis and adjectives without a single concrete failing example in hand, then declaring the result better without running it. This skill imposes the engineering loop: specify behavior → diagnose the actual failure → make one precise change → test against cases → keep versions.

When to use this skill

  • Improving an existing prompt, especially "the model keeps doing X" complaints.
  • Writing new system prompts, agent instructions, or reusable templates where behavior matters and the prompt will run many times.
  • Reviewing a prompt that has accreted patches ("ALWAYS do A. NEVER do B. IMPORTANT: remember A...").

When NOT to use this skill

  • One-off conversational asks — just ask well; the loop's overhead needs reuse to pay off.
  • When the problem is the task, not the prompt: if the model lacks the information or capability, no wording fixes it — restructure the task (provide the context, split the steps, add tools) instead of engineering the incantation.

Operating procedure

1 — Specify behavior with test cases first. Before touching the prompt, write 3–5 concrete cases: input → desired output (or desired property of output). Include: the reported failing case, a normal case that currently works (your regression guard), and one edge case (empty/hostile/ambiguous input). No test cases = no way to know the edit helped.

2 — Diagnose from actual failures, not descriptions of them. Get the real failing outputs (live-state-truth: run the prompt if you can). Classify the failure:

Failure class Signature Fix direction
Ambiguity Model does a reasonable other thing Define the term; add the disambiguating example
Missing context Model invents what it wasn't given Provide the facts/data in the prompt, don't demand the model "be accurate"
Conflicting instructions Behavior flips between runs; late instructions ignored Find and resolve the conflict — don't add a third instruction to arbitrate two
Underspecified format Content right, shape wrong/inconsistent Show the format: a literal example output beats three sentences describing it
Buried instruction Long prompt; the violated rule is in the middle Restructure: critical constraints near the top, grouped, deduplicated
Capability gap Fails all wordings of the same demand Restructure the task (steps, tools, context) — see "When NOT"

Read the full file on GitHub · 82 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 · 82 lines · 0 tokens per session scan A 364fa25c0e32

Subscribe to this mod's changes

Prompt Engineering is a skill published in the GitHub repository ralfyishere/rules-with-receipts (2 stars, last pushed 2mo ago), licensed MIT. It adds 97 tokens to every session and 1,642 once invoked, about $0.0005 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-08-31.

Related

Other skills, from other repositories

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

guidance

Control LLM output with regex and grammars, guarantee valid JSON/XML/code generation, enforce structured formats, and build multi-step workflows with Guidance - Microsoft Research's constrained generation framework.

davila7/claude-code-templates · 38 tokens

outlines

Guarantee valid JSON/XML/code structure during generation, use Pydantic models for type-safe outputs, support local models (Transformers, vLLM), and maximize inference speed with Outlines - dottxt.ai's structured generation library.

davila7/claude-code-templates · 50 tokens

prompt-master

Generates optimized prompts for AI tools. Activates only when the user explicitly asks to write, fix, improve, or adapt a prompt for a specific AI tool (LLM, Cursor, Midjourney, image AI, video AI, coding agents, etc.). Does not activate for general conversation, coding tasks, document writing, or other…

nidhinjs/prompt-master · 78 tokens

create-simple-prompt

This skill should be used when the user asks to "create a new prompt sample", "add a new prompt sample", "scaffold a new prompt sample", "create a prompt contribution", "add a prompt", or needs to create a new prompt sample with proper folder structure, README, and sample.json metadata. Do NOT use this skill for agent…

pnp/copilot-prompts · 80 tokens

prompt-context-engineer

Transform any rough prompt, request, or idea into a well-structured, context-engineered prompt using Andrej Karpathy's context engineering principles. Use this skill whenever the user asks to improve, rewrite, restructure, optimize, or "engineer" a prompt; mentions prompt engineering or context engineering; pastes a…

pnp/copilot-prompts · 180 tokens