loom-prompt-engineering
Installation
SKILL.md
Prompt Engineering
Overview
Craft prompts for LLMs and orchestrated agents (system prompts, agent signals, few-shot). Optimize for output quality, consistency, and injection-resistance. Bias toward measurable iteration over intuition.
Prompt anatomy
Order matters — most models weight later instructions and the very start/end of context most heavily. A structured prompt has:
- Role — who the model is ("You are a Rust reviewer"). Sets vocabulary and priors; keep it short.
- Instructions — the task as explicit, ordered directives. Positive imperatives ("Return X") beat prohibitions.
- Context — data, code, conventions the task needs, clearly delimited (below).
- Examples — few-shot demonstrations when format/behavior must be consistent.
- Output contract — exact format, schema, length, and what to do on failure.
Tell the model what TO do, not just what to avoid. Replace vague verbs ("analyze") with the concrete deliverable ("list each bug as file:line — description").