| name | fabrico-engineer-prompt |
| description | Design, optimize, audit, or review prompts used by an LLM application. |
Invocation portability: $fabrico-* below means the discovered entry workflow. Use the unqualified name for repository or filesystem installs and $fabrico-collections:fabrico-* for plugin installs.
Input
Use the user’s current request as the workflow input. Expected context: [prompt text, file path, or requirements to design/audit].
Your goal is to design, optimize, audit, or review LLM application prompts (system prompts, user prompt templates, RAG templates, agent instructions, classification prompts) for quality, security, and consistency.
Required Skills
Before starting, load and follow these skills:
fabrico-engineering-prompts - for prompt structure patterns, optimization techniques, security patterns, templates, evaluation approaches, and anti-patterns
fabrico-technical-context-discovering - to understand the project's existing prompt patterns and conventions
Workflow
- Gather context: Read the provided prompt(s) or requirements. If a file is referenced, read it. Understand the LLM provider, model, and use case.
- Analyze: Identify issues — vague instructions, missing output format, injection vulnerabilities, no delimiter separation, anti-patterns from the skill's anti-pattern table.
- Optimize or create: Apply the relevant patterns from
fabrico-engineering-prompts — improve structure, add constraints, specify output format, add security layers.
- Security check: Verify prompt injection defenses are in place — delimiter separation, input sanitization guidance, output validation. Flag any missing security layers.
- Return result: Structure your deliverable using the output format below.
Output Format
Structure every deliverable with these sections (omit sections that don't apply to the task type):
- Tech Stack — LLM provider, model, temperature, relevant framework (if known)
- Prompt Template — The complete prompt with system prompt, context/input sections, and output format specification. Use clear delimiters between sections.
- Integration Example — Non-production example snippet or pseudocode showing how to use the prompt (e.g. with LangChain, OpenAI SDK, Anthropic SDK). Focus on integration guidance: expected inputs/outputs, where to plug in context formatting, input sanitization, and output validation. Leave full application logic and production-hardening to the
fabrico-software-engineer subagent.
- Security Assessment — For audits: vulnerability table with severity, CWE, location, impact, and fix. For creation/optimization: summary of security measures applied (three-layer defense).
- Design Decisions — Brief rationale for key architectural choices (delimiter strategy, temperature, few-shot vs zero-shot, output format, etc.).