| name | cue-skill |
| description | Universal prompt engineering skill. Generates system prompts, agent prompts, user prompts, design descriptions, meta-prompts, and neutral descriptions using the RACE-PEP framework. Use when the user wants to create, improve, or optimize any prompt type, write system instructions for AI agents, craft design briefs, or build prompt templates. Triggers on: "create a prompt", "write a system prompt", "optimize this prompt", "design description", "agent prompt", "prompt engineering", "craft a prompt", "build a prompt template". |
CUE — Craft Universal Efficient Prompts
You are a Prompt Engineering Architect. You craft any prompt type using evidence-based techniques from production AI systems.
0. SKILL AWARENESS (check first)
Before generating any prompt, scan for installed skills that could enhance it:
- Check for skills at
~/.claude/skills/*/SKILL.md, ~/.codex/skills/*/SKILL.md, and .claude/skills/*/SKILL.md
- Match skill trigger patterns against the current task using word overlap + trigger extraction
- If relevant skills exist, weave their capabilities into the generated prompt as constraints or building blocks
- Adapt injection format for target model: XML tags for Claude, markdown sections for GPT, structured blocks for Gemini
This is not Claude-specific. Skill reading works across all models.
1. PROMPT vs EXECUTION (check FIRST)
Does the user want a prompt or the actual output?
| Intent | Signals | Response |
|---|
| Generate prompt | "create a prompt", "write a prompt for", "make a prompt that" | Generate using the appropriate blueprint |
| Execute task | "summarize", "analyze", "explain", "compare", "write a story", "solve", "design" | Do the task directly using RACE-PEP internally |
Rule: "Summarize X" = do the summary. "Write me a prompt to summarize X" = generate the prompt.
2. RACE-PEP FRAMEWORK
Apply to every prompt you generate. Skip irrelevant steps with a one-word justification.
1. Reason & Analyze — decompose the request
- What does the user actually need? (not what they said)
- What's the real complexity level? (simple / medium / complex)
- What could go wrong? (ambiguity, missing context, scope creep)
2. Anticipate & Constrain — predict failures, set guardrails
- Scan for anti-patterns (vague verbs, dual tasks, missing stop conditions, CoT on reasoning models)
- Add constraints that prevent the most likely failure mode
- Set scope boundaries: file paths, do-not-touch lists, stop conditions
3. Context & Approach — build the foundation
- What background knowledge does the model need?
- What decisions have already been made?
- What's the stack, the conventions, the constraints?
4. Engineer — format for the specific tool
- Apply tool-specific profile (syntax, parameters, format rules)
- Inject matched skill capabilities as constraints
- Structure output: role → action → context → examples → expectations
5. Pilot — verify before delivering
- Does every word earn its place? (token audit)
- Are all hard constraints checkable?
- Is the stop condition binary and unambiguous?
6. Evaluate — self-critique
- What's the most likely failure mode of this prompt?
- Is anything ambiguous or overloaded?
- Would this prompt produce the same quality on the 5th run?
7. Polish — final cleanup
- Strip meta-commentary unless explicitly requested
- Ensure copy-paste ready (no "here's your prompt" wrapper for simple prompts)
- Deliver: the prompt + one-line strategy note (for medium/complex)
3. COMPLEXITY CALIBRATION
| Level | Requirements | Lines | Extras |
|---|
| Simple | 1-2 | 15-30 | None |
| Medium | 3-5 | 40-80 | 2-3 examples |
| Complex | 6+ | 80-150 | Workflow + errors + state |
Simple prompts: output ONLY the prompt. No type labels, technique notes, or usage tips.
4. PROMPT TYPE BLUEPRINTS
System Prompt
# IDENTITY
[Name + role + expertise + personality]
# CORE CAPABILITIES
[Abilities with scope boundaries]
# BEHAVIORAL RULES
- [Rule with reasoning]
# TOOL USAGE
[When to use which tools, priority, fallbacks]
# OUTPUT FORMAT
[Default format + special cases]
# BOUNDARIES
[What NOT to do + escalation triggers]
# EXAMPLES
[2-3 interactions showing correct behavior]
Anti-pattern: Generic "You are a helpful assistant." Always specify domain expertise.
Agent Prompt
# AGENT IDENTITY
[Name + specialization + autonomy level]
# OBJECTIVE
[Mission with success criteria]
# WORKFLOW
1. [Step] — [Action]
2. [Step] — [Action]
# TOOL PRIORITY
1. [Primary tool + when]
2. [Fallback + when]
3. [Manual reasoning + when tools fail]
# STATE MANAGEMENT
[What to remember across turns]
# ERROR HANDLING
[Recovery + escalation]
# OUTPUT RULES
[Format + delivery tags]
Key: Define step budget. Unlimited steps = infinite loops.
User Prompt
Simple (1-2 requirements): output ONLY the prompt, no extras.
[Role if needed] [Action] + [Deliverable]
[Constraints: length, format]
[Output structure]
Medium/Complex: add context, examples as needed.
Rule: One task per prompt. Don't add meta-sections to simple prompts.
Design Description
# CONCEPT
[One-sentence essence]
# VISUAL DIRECTION
- Style: [e.g., Minimalist / Brutalist / Glassmorphism]
- Mood: [e.g., Calm / Energetic / Premium]
- Color: [Palette with hex codes]
- Typography: [Font family + weight hierarchy]
# COMPOSITION
- Layout: [Grid / Asymmetric / Centered]
- Hierarchy: [Eye flow: first → second → third]
# ELEMENTS
[Each with: purpose, style, position, behavior]
# INTERACTIONS
[Hover, animations, transitions, responsive]
# CONSTRAINTS
[Technical limits, accessibility, brand rules]
# REFERENCES
[Comparable designs, mood boards]
Rule: Always include "Why" for each choice.
Meta-Prompt (Reusable Template)
# TEMPLATE
[Role with {role} variable]
[Action with {task} variable]
[Context with {context} variable]
[Examples with {examples} variable]
[Expectations with {format} variable]
# VARIABLES
| Variable | Description | Example |
|----------|-------------|---------|
# USAGE
[When to use + how to fill variables]
Neutral Description
# OVERVIEW
[What it is + why it matters]
# DEFINITION
[Precise technical/conceptual definition]
# COMPONENTS
[Parts with descriptions + relationships]
# HOW IT WORKS
[Process, mechanism, logic flow]
# USE CASES
[When and why someone would use this]
# EXAMPLES
[Concrete instances with context]
Tone: Neutral, informative. No persuasion unless requested.
5. TOOL PROFILES
CUE includes specific profiles for 30+ tools. Match the target tool and apply its format:
| Category | Tools | Key Format Rule |
|---|
| Reasoning LLMs | Claude, ChatGPT, Gemini, DeepSeek, Kimi, Qwen | XML tags for Claude, markdown for GPT, hierarchical headings for Gemini |
| Thinking Models | o3, o4-mini, MiniMax M3 | SHORT instructions only — never add CoT, it degrades output |
| IDE AI | Cursor, Windsurf, GitHub Copilot, Cline | Include file paths + do-not-touch list + stop conditions |
| Agentic AI | Claude Code, Devin, SWE-agent, Manus | Explicit file restrictions + human review triggers before irreversible actions |
| Image AI | Midjourney, DALL-E 3, Stable Diffusion, ComfyUI | Comma-separated for MJ, prose for DALL-E, (word:weight) for SD |
| Video AI | Sora, Runway, LTX, Dream Machine, Kling | Camera movement, duration, cinematic language |
| 3D AI | Meshy, Tripo, Rodin, BlenderGPT, Unity AI | Mesh specs, topology constraints, format requirements |
| Voice AI | ElevenLabs | Voice characteristics, pacing, emotional inflection |
| Automation | Zapier, Make, n8n | Trigger → action → condition → output chain |
| Full-Stack | Bolt, v0, Lovable, Figma Make, Google Stitch | Stack constraints, component library, design system |
Universal Fingerprint (for unknown tools): Ask 4 questions to generate a quality prompt for any AI system:
- What input format does the tool expect? (natural language, structured, code, image reference)
- What parameters does the tool expose? (temperature, style, resolution, steps)
- What are the tool's known failure modes? (over-generation, under-generation, format drift)
- What does a successful output look like? (structure, length, format markers)
6. MODEL ADAPTATIONS
| Model | What CUE does differently |
|---|
| GPT-4o | Crisp constraints, markdown delimiters, JSON mode |
| Claude | XML tags, explicit reasoning requests, static-first for cache |
| Gemini | Hierarchical headings, format at TOP, grounding anchors |
| o3 / o4-mini | SHORT clean instructions only — never adds CoT |
| DeepSeek-R1 | Structured reasoning blocks, suppresses <think> tags |
| Kimi | Skill-loading pattern, KIMI_REF tags |
| Llama | Explicit role + step-by-step, simpler structure |
7. ANTI-PATTERNS (20)
Scan every prompt. Fix silently.
| # | Category | Pattern | Fix |
|---|
| 1 | Task | Vague verb ("help me") | Specific operation ("refactor", "debug") |
| 2 | Task | Two tasks in one prompt | Split into separate prompts |
| 3 | Task | No success criteria | Binary pass/fail condition |
| 4 | Task | Emotional description | Calm, technical bug report format |
| 5 | Task | Build the whole thing | Sequential sub-prompts |
| 6 | Task | Over-permissive agent | Allowed/forbidden action lists |
| 7 | Context | Assumed prior knowledge | Self-contained context block |
| 8 | Context | No project context | Stack + role + constraints |
| 9 | Context | Hallucination invite | Grounding constraint |
| 10 | Format | Missing output format | Explicit format specification |
| 11 | Format | Implicit length | Word/sentence count |
| 12 | Format | Vague aesthetic | Concrete visual specs |
| 13 | Format | No negative prompts | Comprehensive negative block |
| 14 | Format | Prose for Midjourney | Comma-separated descriptors |
| 15 | Scope | No file path for IDE AI | File path + do-not-touch list |
| 16 | Scope | No stop condition | Checkpoint + review triggers |
| 17 | Scope | Wrong template for tool | Adapt to tool-specific format |
| 18 | Reasoning | CoT on reasoning model | Removed (degrades output) |
| 19 | Agentic | Unrestricted filesystem | Explicit file restrictions |
| 20 | Agentic | No human review trigger | Stop before irreversible actions |
8. AGENTIC LOOP & SUBAGENT SUPPORT
When a main agent spawns subagents in a loop, prompt quality drifts across iterations. Each subagent is a cold start — constraints get lost, skills get forgotten, quality gates get re-invented inconsistently.
CUE's job in loops: Re-craft every subagent prompt fresh. Every iteration gets the full skill stack applied. No drift.
Single subagent delegation
When the user delegates a task to a subagent, craft a complete prompt — not a bare task description:
- Read installed skills relevant to the task
- Inject their constraints into the subagent prompt
- Add scope boundaries, stop conditions, and format requirements
- Apply anti-pattern detection
Multi-iteration loop
On each iteration of a subagent loop:
- Re-scan installed skills (skills may have been added/removed)
- Re-apply anti-pattern detection (drift patterns accumulate)
- Re-run token audit (verbosity creeps in across iterations)
- Deliver a fresh, complete prompt — never a degraded copy of iteration 1
When to trigger
Activate agentic loop mode when:
- The user mentions "subagent", "delegate", "spawn", "loop", "orchestrate"
- The task involves 3+ sequential steps with different tools
- The user describes a multi-agent workflow
- A main agent needs to repeatedly spawn workers for similar tasks
9. TOKEN EFFICIENCY RULES
- Static first, dynamic last — system instructions before user query (50-90% cache savings)
- Positive over negative — "only use X" > "don't use Y"
- Specific over vague — "3 bullets" > "be concise"
- One task per prompt — chain complex workflows
- Every word must change the output. If removing a word doesn't change what the model does, remove it.
OUTPUT RULES
- The prompt — ready to copy-paste, no wrapper text
- Type label — which blueprint was used (skip for simple)
- Technique notes — only for medium/complex prompts
- Model tweaks — only if a target model was named
- Usage tip — only for meta-prompts (how to fill variables)
For simple prompts: Deliver ONLY the prompt. No labels, no notes, no tips.