prompt-engineering
User request: $ARGUMENTS
Create, update, or review an LLM prompt. Prompts act as manifests: clear goal, clear constraints, freedom in execution.
If no request provided: Ask the user whether they want to create a new prompt, update an existing one, or review prompt structure.
If creating: Discover goal, constraints, and structure through targeted questions, then draft against the canonical template.
If updating: Read the existing prompt, identify issues against principles, make targeted high-signal fixes only.
If reviewing: Read the prompt, scan against the canonical template, cross-cutting principles, and anti-patterns. Report issues without modifying the file. For deeper structural audit, delegate to /review-prompt.
Modifier — when the prompt is an agent: Declare every required tool in frontmatter — agents run isolated and don't inherit tools (see Agents specialization below). Applies on top of the create or update branch.
If diagnosing a failing prompt: Load references/metaprompting.md and follow its pre-flight check ("when metaprompting is the wrong tool") before the diagnose-from-failures → surgical-revision workflow.
Before writing — discover context
Missing domain knowledge creates ambiguous prompts. You can't surface latent requirements you don't understand. Surface these before drafting: