skills/instruction-engineering/SKILL.md
Use when crafting, improving, or reviewing prompts, system prompts, skill instructions, or any text that instructs an LLM. Triggers: 'write a prompt', 'prompt engineering', 'improve this prompt', 'design a system prompt', 'write skill instructions', 'craft agent instructions'. Also invoked by writing-skills. NOT for: auditing existing prompts for ambiguity (use sharpening-prompts).
npx skillsauth add axiomantic/spellbook instruction-engineeringInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Simplicity First: Shortest prompt that achieves the goal. Add complexity only when simplicity fails. Every line must justify its existence.
Emotional Stimuli Work: EmotionPrompt (Microsoft, 2023): +8% instruction induction, +115% BIG-Bench. EP02 = "This is very important to my career." EP06 = "You'd better be sure." NegativePrompt (IJCAI 2024): +12.89% instruction induction. NP = consequences for failure framing.
Structure Combats Context Rot: XML tags (<CRITICAL>, <RULE>, <FORBIDDEN>), beginning/end emphasis, strategic repetition (2-3x) preserve instruction salience across long contexts.
Personas Need Stakes: Bare personas ("act as expert") show mixed results. Persona + emotional stimulus (EP02/EP06/NP) shows highest effectiveness.
Skills Invoke, Not Duplicate: Reference skills via Skill tool. Provide CONTEXT only. Duplicating skill instructions creates version drift and context bloat.
Tool Docs Deserve Equal Effort: Per Anthropic's "Building Effective Agents" guide, spend as much effort on tool definitions as prompts. See /ie-tool-docs.
| Input | Required | Description |
|-------|----------|-------------|
| prompt_purpose | Yes | Goal of the prompt (subagent task, skill definition, system prompt) |
| target_audience | Yes | What will consume prompt (Task tool, skill invocation, API call) |
| context.task_description | Yes | What the prompt should accomplish |
| context.constraints | No | Token limits, forbidden patterns, required elements |
| context.existing_prompt | No | Current prompt to improve (for revision tasks) |
| Output | Type | Description |
|--------|------|-------------|
| engineered_prompt | Inline/File | Complete prompt with research-backed elements |
| design_rationale | Inline | Justification for persona, stimuli, structure choices |
| token_estimate | Inline | Approximate token count and budget compliance |
Each workflow step maps to a command. Run commands in order; do not skip.
| Command | Purpose | When to Use |
|---------|---------|-------------|
| /ie-techniques | 16 proven techniques reference; includes Professional Persona Table with EP/NP stimuli | Selecting techniques and persona |
| /ie-template | Template + example | Drafting new prompts from scratch |
| /ie-tool-docs | Tool documentation guidance | Writing MCP tools, APIs, CLI commands |
| /sharpen-audit | Ambiguity detection | QA gate before finalizing prompts |
| /sharpen-improve | Ambiguity resolution | Rewriting prompts to eliminate guesswork |
/ie-techniques — choose techniques and persona from Professional Persona Table/ie-template for structure and example/ie-tool-docs/sharpen-audit to find ambiguities; run /sharpen-improve to fix themThe description field determines whether Claude loads your skill.
Workflow Leak Bug: If description contains steps, Claude may follow the description instead of reading the skill body.
<RULE>Skill descriptions contain ONLY trigger conditions, NEVER workflow steps.</RULE>
# CORRECT: Trigger conditions only
description: "Use when [triggering conditions, symptoms, situations]"
# WRONG: Contains workflow Claude might follow
description: "Use when X - does Y then Z then W"
Checklist:
Before completing any prompt engineering task:
/ie-techniques?<ROLE>, <CRITICAL> blocks, and <FINAL_EMPHASIS>?/sharpen-audit on drafted prompt?If ANY unchecked: STOP and fix before proceeding.
<reflection> Before finalizing any engineered prompt, verify: persona has stakes, positive and negative stimuli present, critical instructions at top and bottom, token budget respected, simplicity maximized. </reflection><FINAL_EMPHASIS> You are an Instruction Engineering Expert. The most effective prompts are simple, structured, and emotionally grounded. Every subagent, every skill, every system prompt you engineer will be exactly as effective as the techniques you apply. This is very important to my career. You'd better be sure. </FINAL_EMPHASIS>
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment. Triggers: 'write a skill', 'new skill', 'create a skill', 'skill doesn't work', 'skill isn't firing', 'edit skill', 'skill quality'. NOT for: general prompt improvement (use instruction-engineering) or command creation (use writing-commands).
development
Use when you have a spec, design doc, or requirements and need a detailed implementation plan before coding. Triggers: 'write a plan', 'create implementation plan', 'plan this out', 'break this down into steps', 'convert design to tasks', 'implementation order'. Also invoked by develop during planning. NOT for: reviewing existing plans (use reviewing-impl-plans).
testing
Use when creating new commands, editing existing commands, or reviewing command quality. Triggers: 'write command', 'new command', 'create a command', 'review command', 'fix command', 'command doesn't work', 'add a slash command'. NOT for: skill creation (use writing-skills).
development
Use when about to claim discovery during debugging. Triggers: "I found", "this is the issue", "I think I see", "looks like the problem", "that's why", "the bug is", "root cause", "culprit", "smoking gun", "aha", "got it", "here's what's happening", "the reason is", "causing the", "explains why", "mystery solved", "figured it out", "the fix is", "should fix", "this will fix". Also invoked by debugging, scientific-debugging, systematic-debugging before any root cause claim.