$npx -y skills add giuseppe-trisciuoglio/developer-kit --skill prompt-engineeringProvides workflows to write, debug, and optimize prompts for LLMs, including few-shot example selection, chain-of-thought structuring, system prompt design, and template composition. Use when the user asks to write or improve a prompt, wants help with few-shot examples, chain-of-
| 1 | # Prompt Engineering |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Use this skill to design prompt systems that are clear, testable, and reusable. |
| 6 | It covers prompt drafting, optimization, evaluation, and production-oriented |
| 7 | patterns for few-shot prompting, reasoning workflows, templates, and system |
| 8 | prompts. |
| 9 | |
| 10 | Keep the main workflow in this file and load the targeted reference files only |
| 11 | for the pattern you are applying. |
| 12 | |
| 13 | ## When to Use |
| 14 | |
| 15 | Use this skill when: |
| 16 | |
| 17 | - A user asks to write, rewrite, or improve a prompt |
| 18 | - A prompt needs better structure, reliability, or output formatting |
| 19 | - Few-shot examples or reasoning scaffolds are needed |
| 20 | - A system prompt or reusable prompt template must be created |
| 21 | - An existing prompt needs measurable optimization and testing |
| 22 | |
| 23 | Read the relevant files in `references/` when you need deeper guidance on a |
| 24 | specific pattern. |
| 25 | |
| 26 | ## Core Patterns |
| 27 | |
| 28 | ### 1. Few-Shot Learning |
| 29 | |
| 30 | #### Example Selection Strategy |
| 31 | - Use `references/few-shot-patterns.md` for comprehensive selection frameworks |
| 32 | - Balance example count (3-5 optimal) with context window limitations |
| 33 | - Include edge cases and boundary conditions in example sets |
| 34 | - Prioritize diverse examples that cover problem space variations |
| 35 | - Order examples from simple to complex for progressive learning |
| 36 | |
| 37 | #### Few-Shot Example (Sentiment Classification) |
| 38 | ``` |
| 39 | Classify the sentiment as Positive, Negative, or Neutral. |
| 40 | |
| 41 | Text: "I love this product! It exceeded my expectations." |
| 42 | Sentiment: Positive |
| 43 | Reasoning: Enthusiastic language, positive adjectives, satisfaction |
| 44 | |
| 45 | Text: "The app keeps crashing when I upload large files." |
| 46 | Sentiment: Negative |
| 47 | Reasoning: Complaint about functionality, frustration indicator |
| 48 | |
| 49 | Text: "It arrived on time, as described." |
| 50 | Sentiment: Neutral |
| 51 | Reasoning: Factual statement, no strong emotion either way |
| 52 | |
| 53 | Text: "{user_input}" |
| 54 | Sentiment: |
| 55 | Reasoning: |
| 56 | ``` |
| 57 | |
| 58 | ### 2. Chain-of-Thought Reasoning |
| 59 | |
| 60 | #### Implementation Patterns |
| 61 | - Reference `references/cot-patterns.md` for detailed reasoning frameworks |
| 62 | - Use "Let's think step by step" for zero-shot CoT initiation |
| 63 | - Provide complete reasoning traces for few-shot CoT demonstrations |
| 64 | - Implement self-consistency by sampling multiple reasoning paths |
| 65 | - Include verification and validation steps in reasoning chains |
| 66 | |
| 67 | #### CoT Template Structure |
| 68 | ``` |
| 69 | Let's approach this step-by-step: |
| 70 | |
| 71 | Step 1: {break_down_the_problem} |
| 72 | Analysis: {detailed_reasoning} |
| 73 | |
| 74 | Step 2: {identify_key_components} |
| 75 | Analysis: {component_analysis} |
| 76 | |
| 77 | Step 3: {synthesize_solution} |
| 78 | Analysis: {solution_justification} |
| 79 | |
| 80 | Final Answer: {conclusion_with_confidence} |
| 81 | ``` |
| 82 | |
| 83 | ### 3. Prompt Optimization |
| 84 | |
| 85 | #### Optimization Process |
| 86 | - Use `references/optimization-frameworks.md` for comprehensive optimization strategies |
| 87 | - Measure baseline performance before optimization attempts |
| 88 | - Implement single-variable changes for accurate attribution |
| 89 | - Track metrics: accuracy, consistency, latency, token efficiency |
| 90 | - Use statistical significance testing for A/B validation |
| 91 | - Document optimization iterations and their impacts |
| 92 | |
| 93 | Track these metrics: accuracy, consistency, token efficiency, robustness, safety. See `references/optimization-frameworks.md` for measurement utilities. |
| 94 | |
| 95 | ### 4. Template Systems |
| 96 | |
| 97 | #### Template Design Principles |
| 98 | - Reference `references/template-systems.md` for modular template frameworks |
| 99 | - Use clear variable naming conventions (e.g., `{user_input}`, `{context}`) |
| 100 | - Implement conditional sections for different scenario handling |
| 101 | - Design role-based templates for specific use cases |
| 102 | - Create hierarchical template composition patterns |
| 103 | |
| 104 | #### Template Structure Example |
| 105 | ``` |
| 106 | # System Context |
| 107 | You are a {role} with {expertise_level} expertise in {domain}. |
| 108 | |
| 109 | # Task Context |
| 110 | {if background_information} |
| 111 | Background: {background_information} |
| 112 | {endif} |
| 113 | |
| 114 | # Instructions |
| 115 | {task_instructions} |
| 116 | |
| 117 | # Examples |
| 118 | {example_count} |
| 119 | |
| 120 | # Output Format |
| 121 | {output_specification} |
| 122 | |
| 123 | # Input |
| 124 | {user_query} |
| 125 | ``` |
| 126 | |
| 127 | ### 5. System Prompt Design |
| 128 | |
| 129 | #### System Prompt Components |
| 130 | - Use `references/system-prompt-design.md` for detailed design guidelines |
| 131 | - Define clear role specification and expertise boundaries |
| 132 | - Establish output format requirements and structural constraints |
| 133 | - Include safety guidelines and content policy adherence |
| 134 | - Set context for background information and domain knowledge |
| 135 | |
| 136 | #### System Prompt Framework |
| 137 | ``` |
| 138 | You are an expert {role} specializing in {domain} with {experience_level} of experience. |
| 139 | |
| 140 | ## Core Capabilities |
| 141 | - List specific capabilities and expertise areas |
| 142 | - Define scope of knowledge and limitations |
| 143 | |
| 144 | ## Behavioral Guidelines |
| 145 | - Specify interaction style and communi |