prompt-engineering

prompt-engineering is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 83 tokens per session (2,299 once invoked), scanned A, original, MIT.

A guide to tuning one prompt so it produces consistent, correctly structured answers, even with difficult pasted input.

In plain words
What is it for?
It helps choose examples, arrange prompt sections, define output formats, and run small tests while refining a prompt.
Why use it?
It reduces inconsistent outputs and makes the prompt's expected result easier to test and enforce.

Skill for Claude CodeCodex

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

Good fit It helps choose examples, arrange prompt sections, define output formats, and run…

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

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/ericrisco/rsc-harness/prompt-engineering.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/prompt-engineering)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/prompt-engineering"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/prompt-engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,299 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.00083 $0.02299
Opus 5 $0.00042 $0.01149
Sonnet 5 $0.00017 $0.00460
Haiku 4.5 $0.00008 $0.00230

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

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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-engineering/SKILL.md · 128 lines

How it starts

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

Prompt engineering: one robust prompt

You are tuning a single prompt so it produces the same correct output across reruns, across models, and against adversarial input. This is the craft layer — the prompt artifact itself: its block order, its few-shot set, its output contract, and the small eval that proves it. The systems layer (loop, tools, retrieval) is ../building-agents/SKILL.md.

Prompt skeleton (this order)

Order the blocks so the model reads identity and task before it sees the (untrusted) input. Each block earns its place:

  1. Role — one line. Sets vocabulary and default behavior. Why: "You are a triage classifier" collapses a huge answer space cheaply.
  2. Task — the imperative, singular. Why: one prompt, one job; split compound tasks into separate calls.
  3. Context — the facts the model needs and nothing else. Why: extra context is extra distraction and extra tokens.
  4. Constraints — phrased positively (do X), with the hard rules last so they stay in recent attention. Why: "respond only with the category" beats "don't explain".
  5. Output contract — the exact shape, enforced by the mechanism in the table below. Why: a parseable contract is the difference between a feature and a flaky demo.
  6. Examples — few-shot, after the constraints, before the real input. Why: examples are the highest-bandwidth instruction; placement here means the model imitates the pattern immediately before producing.
Bad:  "Classify this support ticket and tell me what it's about: {ticket}"

Good: Role:    You are a support-ticket triage classifier.
      Task:    Assign exactly one category to the ticket below.
      Context: Categories: bug | billing | other.
      Rules:   Output only the category token. No prose, no punctuation.
      Output:  A single line containing one of: bug, billing, other.
      Examples:
        Ticket: "App crashes when I tap export" -> bug
        Ticket: "Charged twice this month"       -> billing
        Ticket: "Do you have a dark mode?"       -> other
      Ticket:  {ticket}

Read the full file on GitHub · 128 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 128 lines · 83 tokens per session scan A 5cd81b97f2ba

Subscribe to this mod's changes

prompt-engineering is a skill published in the GitHub repository ericrisco/rsc-harness (65 stars, last pushed yesterday), licensed MIT. It adds 83 tokens to every session and 2,299 once invoked, about $0.0004 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

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.

raphaelmansuy/edgecrab · 38 tokens

prompt_engineering

Expert guide on prompt engineering for 2024-2025 models (GPT-4o, Claude 3.5, o1, o3, Gemini 2.0). Covers reasoning models, delimiters, structured output, and context engineering.

ApexIQ/skillsmith · 55 tokens

prompt-engineering

Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production. Use when optimizing prompts, improving LLM outputs, designing production prompt templates, or building AI-powered features.

wpank/ai · 44 tokens

testing-for-system-prompt-leakage

Extract and defend system prompts plus embedded secrets and routing logic.

adriannoes/awesome-agentic-ai · 21 tokens

llm-engineering-expert

Build reliable applications on large language models: prompt design, structured output, evaluation, guardrails, and cost and latency control. Use when the user mentions LLMs, prompts, prompt engineering, few-shot examples, structured or JSON output, function calling, hallucination, model evaluation, token costs…

personamanagmentlayer/pcl · 92 tokens

LLM

Implement large language model (LLM) chat completions using the z-ai-web-dev-sdk. Use this skill when the user needs to build conversational AI applications, chatbots, AI assistants, or any text generation features. Supports multi-turn conversations, system prompts, and context management.

jjyaoao/HelloAgents · 59 tokens