prompt-engineering

Installation
SKILL.md

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}"
Installs
3
GitHub Stars
116
First Seen
Aug 6, 2026
prompt-engineering — ericrisco/rsc-harness