Individual skill
prompt-engineering
Use when one prompt must give the same right answer across reruns, models, and pasted-in hostile input: forcing a fixed schema, picking the few-shot set, ordering the prompt blocks, or the inline cases you run while tuning. NOT the agent loop, tools, or retrieval (that is `building-agents`), NOT a standing CI eval harness (that is `agent-eval`).
skills/prompt-engineering/SKILL.md
Source commit d9d6bb338f66cc1e23998585e580a0ea45bbcb82
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- Yes
- Observed behavior
- Not checked yet
- Last checked
- Nov 6, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 568
- Repository last updated
- Nov 4, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- agent-skills Repository topic
- agentic-ai Repository topic
- ai-agents Repository topic
- ai-coding Repository topic
- claude-code Repository topic
- cli Repository topic
- cline Repository topic
- codex Repository topic
- coding-assistant Repository topic
- cursor Repository topic
- prompts Declared skill tag
- llm Declared skill tag
- few-shot Declared skill tag
- structured-output Declared skill tag
- evals Declared skill tag
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 9,532 bytesevals/README.mddoc · 806 bytesevals/cases.yamlasset · 4,204 bytesreferences/eval-templates.mddoc · 3,671 bytesreferences/output-contracts.mddoc · 4,499 bytesscripts/verify.shruns · 3,561 bytes
Read excerpt
# 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.