$npx -y skills add sabahattink/antigravity-fullstack-hq --skill prompt-engineeringComprehensive prompt engineering framework for designing, optimizing, and iterating LLM prompts. Use when creating prompts, optimizing existing prompts, or improving AI instructions.
| 1 | # Prompt Engineering |
| 2 | |
| 3 | ## Workflow |
| 4 | |
| 5 | ``` |
| 6 | User Request |
| 7 | | |
| 8 | +-- "Create a prompt" --> EXPLORATION PHASE |
| 9 | +-- "Optimize this prompt" --> OPTIMIZATION PHASE |
| 10 | +-- "Fix this issue" --> ANALYSIS PHASE |
| 11 | ``` |
| 12 | |
| 13 | ## Phase 1: Exploration |
| 14 | |
| 15 | Before creating any prompt, understand: |
| 16 | |
| 17 | - What task will this prompt accomplish? |
| 18 | - Who will use it? |
| 19 | - What does success look like? |
| 20 | - What are the constraints? |
| 21 | |
| 22 | ## Phase 2: Analysis |
| 23 | |
| 24 | ### Task Classification |
| 25 | |
| 26 | | Dimension | Options | |
| 27 | |-----------|---------| |
| 28 | | Complexity | Simple vs multi-step | |
| 29 | | Output | Creative vs analytical vs structured | |
| 30 | | Stakes | High vs experimental | |
| 31 | |
| 32 | ### Strategy Selection |
| 33 | |
| 34 | | Task Type | Approach | |
| 35 | |-----------|----------| |
| 36 | | Simple | Direct instructions | |
| 37 | | Complex | Chain-of-thought | |
| 38 | | Creative | Role setting | |
| 39 | | Structured | Format specs + examples | |
| 40 | |
| 41 | ## Phase 3: Implementation |
| 42 | |
| 43 | ### Version 1 - Minimal |
| 44 | - Core instructions only |
| 45 | - Test basic functionality |
| 46 | |
| 47 | ### Version 2 - Enhanced |
| 48 | - Add examples |
| 49 | - Clarify ambiguities |
| 50 | - Add constraints |
| 51 | |
| 52 | ### Version 3+ - Optimized |
| 53 | - Refine wording |
| 54 | - Remove redundancy |
| 55 | |
| 56 | ## Key Techniques |
| 57 | |
| 58 | ### Role Setting |
| 59 | |
| 60 | ``` |
| 61 | As an experienced code reviewer, analyze... |
| 62 | ``` |
| 63 | |
| 64 | ### Chain-of-Thought |
| 65 | |
| 66 | ``` |
| 67 | Think step-by-step: |
| 68 | 1. First, identify... |
| 69 | 2. Then, analyze... |
| 70 | 3. Finally, conclude... |
| 71 | ``` |
| 72 | |
| 73 | ### Few-Shot Learning |
| 74 | |
| 75 | ``` |
| 76 | Example 1: |
| 77 | Input: "Great product" |
| 78 | Output: { "sentiment": "positive" } |
| 79 | |
| 80 | Now analyze: "It was okay" |
| 81 | ``` |
| 82 | |
| 83 | ### Explicit Constraints |
| 84 | |
| 85 | ``` |
| 86 | - Limit to 3 paragraphs |
| 87 | - Focus on technical aspects only |
| 88 | - Do not include pricing |
| 89 | ``` |
| 90 | |
| 91 | ## Prompt Template |
| 92 | |
| 93 | ```markdown |
| 94 | ## Context |
| 95 | [Background information] |
| 96 | |
| 97 | ## Role (Optional) |
| 98 | You are a [ROLE] with expertise in [DOMAIN]. |
| 99 | |
| 100 | ## Task |
| 101 | [Clear instruction] |
| 102 | |
| 103 | ## Constraints |
| 104 | - Constraint 1 |
| 105 | - Constraint 2 |
| 106 | |
| 107 | ## Output Format |
| 108 | [Format specification] |
| 109 | |
| 110 | ## Examples (Optional) |
| 111 | [Input/Output examples] |
| 112 | ``` |
| 113 | |
| 114 | ## Common Mistakes |
| 115 | |
| 116 | | Mistake | Fix | |
| 117 | |---------|-----| |
| 118 | | Vague instructions | Be specific | |
| 119 | | No examples | Add 1-2 examples | |
| 120 | | Too many rules | Simplify | |
| 121 | | No format spec | Define output structure | |