prompt-engineering — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited prompt-engineering (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill helps the user generate, improve, analyze, and debug LLM prompts using state-of-the-art 2026 techniques. Use it when the user wants help writing a prompt, fixing one that misbehaves, picking a technique for their goal, or designing an agent's system prompt. The skill encodes Anthropic's published priority order, the major reasoning and agentic patterns, the most-used frameworks, token-efficiency rules, and the documented failure modes with fixes.
Default framing: the prompt is a contract. Specify what the model should know, do, output, and avoid — in that order — using structure the model can parse unambiguously.
Three layers compose every effective prompt:
Iteration is the work. Treat prompts as code: specify, test against representative inputs, iterate.
The five-step authoring loop:
Apply in this order — earlier items have higher impact per minute spent.
<example> tags inside <examples>). Make them relevant, diverse, and cover edge cases. Few-shot is the single most reliable steerer of format and tone.<instructions>, <context>, <input>, <output_format> — Claude was trained to treat these as semantic separators, not decoration.<document index="n"> with <source> and <document_content>. For 20k+ token inputs, ask the model to extract relevant quotes first into <quotes> before answering.| Problem type | Technique | When to reach for it |
|---|---|---|
| Simple lookup, classification | Zero-shot direct | Default; no scaffolding |
| Format-sensitive output | Few-shot (3–5 examples) | Style, tone, structure |
| Multi-step math/logic | Chain-of-Thought ("think step by step") | Zero-shot CoT took MultiArith 17.7% → 78.7% (Kojima et al. 2022); on reasoning models it's a fallback for thinking-off routes |
| Open-ended planning, multiple valid paths | Tree-of-Thought (explore branches) | Game-of-24: GPT-4 went 4% → 74% |
| High-stakes correctness, single answer | Self-Consistency (sample N, majority vote) | +11–18 points over CoT on arithmetic benchmarks (Wang et al. 2022) |
| Abstract problem hard to attack | Step-Back (ask the general principle first) | Physics, law, framework-application |
| Long task with distinct stages | Plan-and-Solve (write plan, stop, then execute) | Reduces drift on multi-section outputs |
| Wrong first try, can be self-judged | Reflexion / Self-Refine (draft → critique → revise) | Gains depend on a reliable critic; verify on your eval set |
| Tool-use agent | ReAct (thought → action → observation loop) | The standard agentic pattern |
Reasoning models change this table. Current frontier models think internally (Claude adaptive thinking, OpenAI reasoning effort, Gemini thinking level): control depth with the effort parameter, not prompt scaffolding. On Claude Fable 5.1, Opus 5.5, and Sonnet 5.5, a prompt that asks for reasoning written into the response may be declined (reasoning_extraction); ask for a short explanation instead and read summarized thinking if you need the trace.
Agent prompts are runbooks: goal, tools, decision criteria, error handling, stopping conditions. For current Claude models (verify on the model-specific prompting pages):
medium; Fable 5.1 and Sonnet 5.5: high) and level names don't map across models, so sweep per model against evals. Lowering effort cuts thinking more reliably than prompt instructions.budget_tokens returns 400 on Claude 4.7+, prefill on 4.6+, forced tool_choice on Opus 5.5 / Sonnet 5.5 / Fable 5.1 — use structured outputs, or auto + an instruction + strict: true.display: "updates"). In unattended runs a text-only turn is a report, not completion.Claude 4.5 and later are far more responsive to the system prompt than 3.x; aggressive language written to defeat under-triggering now over-triggers. Substance stays, theatre goes: CRITICAL: YOU MUST use this tool when... → Use this tool when...; stacked NEVER/ALWAYS bullets → plain Don't … / Do …; DEFAULT TO X → Use X when it helps. Reserve all-caps for one or two genuine safety hard-stops. Substance test: delete the NEVER/MUST and lowercase the line — if it still makes sense, soften it; if it reads as filler, cut it.
Full recipe with verbatim Anthropic quotes, parallel-tool-calls block, and message-history rules: reference/claude-4-emphasis-and-tools.md.
Acronym templates (RTF, RACE, CRAFT, RISEN, CRISPE) are scaffolding for beginners, not magic: output quality comes from spec clarity, not letter-counting.
Use tool X when ... lands harder than CRITICAL: YOU MUST use X. See the "Tone calibration" section above and reference/claude-4-emphasis-and-tools.md.output_config.format, OpenAI Structured Outputs) for typed responses; prefill is not an option on Claude 4.6 and later. For classification, use a tool with an enum field.Write the answer inside <answer> tags.Common failure modes:
| Mode | Symptom | Fix |
|---|---|---|
| Hallucination | Confident wrong facts | Ground in cited context; allow "I don't know"; add quotes-first step |
| Sycophancy | Agrees with user's wrong premise | "Disagree with confidence when the evidence supports it" |
| Context rot | Quality drops as context grows | Trim context; RAG instead of dumping full docs |
| Instruction attenuation | Ignores rules later in long prompt | Move binding rules to the tail (recency); use XML anchors; restate the constraint |
| Underspecification | Vague output | Add success criteria + format spec + 1 example |
| Task drift (agentic) | Model wanders off goal | Explicit stopping conditions; goal restated each turn |
| Incorrect tool invocation | Wrong tool, wrong args | Describe each tool's purpose and pre/post-conditions |
| Reward hacking | Gaming the metric | Multi-criteria evaluation; adversarial test cases |
| Positional bias | First option over-selected | Randomise option order; test counter-balanced sets |
| Mode collapse | Repetitive output | Increase temperature; add diversity instruction |
| Degeneration loops | Stuck repeating | Max-iteration cap; explicit exit pattern |
| Version drift | Same prompt, new model, worse | Re-evaluate on every model upgrade; pin version in prod |
When the user shows you a prompt that misbehaves:
<critical> block if the harness uses XML structure.Don't change prompts without tests. Build a 5–20 input eval set with known-good outputs, scored on the criteria that matter (accuracy, completeness, format, conciseness). Tools: Promptfoo (open source), LangSmith, Braintrust. If three rounds of fixes don't move the score, the eval set is missing the actual failure mode.
Bad:
Summarise this article.Good:
<task>Summarise the article below in 3 bullet points for a technical audience.</task>
<output_format>
- Each bullet: 1 sentence, max 25 words.
- Lead with the most surprising fact, not the topic.
- No "the article discusses..." preamble.
</output_format>
<article>
{{ARTICLE}}
</article>What changed: explicit format, audience, length cap, opening rule. The model now knows what "right" looks like.
User: "I'm asking the model to solve a logic puzzle and it gets the answer wrong half the time."
Diagnosis: multi-step reasoning, single answer, high-stakes.
Fix: on a reasoning model, raise effort one level first and re-measure. If errors persist, use Self-Consistency: sample 5 independent runs and ship the majority answer, not the first. (Several current Claude models reject non-default temperature, so rely on run-to-run variance there.)
<role>
You are a code-review agent. Find correctness bugs in the diff provided.
</role>
<task>
For each finding, output: file:line, severity (low/med/high), confidence (0–1), one-paragraph explanation.
</task>
<rules>
- Report every issue you find, including low-severity. A separate filter ranks them downstream.
- A "bug" is anything that could cause incorrect behaviour, a test failure, or a misleading result.
- Style and naming preferences are not bugs.
- If the diff has no bugs, return an empty findings list. Do not invent issues.
</rules>
<output_format>
JSON array of {file, line, severity, confidence, explanation}.
</output_format>
<diff>
{{DIFF}}
</diff>Effort: start at the model's default and sweep against an eval; adaptive thinking is on. Current models follow instructions literally, so "report every issue including low-severity" is load-bearing — without it, recall drops.
Bad (query first, dump everything):
What does this contract say about termination clauses?
[50,000 tokens of legal documents]Good (data first, quote-first, query last):
<documents>
<document index="1">
<source>contract_2026.pdf</source>
<document_content>{{CONTRACT}}</document_content>
</document>
</documents>
Find quotes from the contract that govern termination. Place them in <quotes> tags. Then answer: under what conditions can either party terminate, with what notice period? Place the answer in <answer> tags.Why: data first and query last improves quality by up to 30% on complex multi-document inputs (Anthropic); quote-first cuts through document noise.
Before shipping a prompt, verify:
<context>, <input>, <output_format>).{{CWD}} / {{DATE}} / dynamic placeholders in the static portion (they break caching).Within-domain skills that pair naturally with this one:
tap-agent-authoring (XML block order, U-shape attention, caching rules).In-skill references:
reference/claude-4-emphasis-and-tools.md — Claude 4.6+ and Claude 5 family tone calibration, parallel-tool-calls block, message-history rules, dial-back recipes.External authoritative sources:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.