prompt-engeneeringlisted
Install: claude install-skill Layneformalized225/ai-cofounder
# Prompt Engineering
Universal techniques for crafting effective prompts across any LLM.
## Core Principles
### 1. Structure with XML Tags
Use XML tags to create clear, parseable prompts:
```xml
<context>Background information here</context>
<instructions>
1. First step
2. Second step
</instructions>
<examples>Sample inputs/outputs</examples>
<output_format>Expected structure</output_format>
```
**Benefits:**
- **Clarity**: Separates context, instructions, and examples
- **Accuracy**: Prevents model from mixing up sections
- **Flexibility**: Easy to modify individual parts
- **Parseability**: Enables structured output extraction
**Best practices:**
- Use consistent tag names throughout (`<instructions>`, not sometimes `<steps>`)
- Reference tags explicitly: "Using the data in `<context>` tags..."
- Nest tags for hierarchy: `<examples><example id="1">...</example></examples>`
- Combine with other techniques: `<thinking>` for chain-of-thought, `<answer>` for final output
### 2. Control Output Shape
Specify explicit constraints on length, format, and structure:
```xml
<output_spec>
- Default: 3-6 sentences or ≤5 bullets
- Simple yes/no questions: ≤2 sentences
- Complex multi-step tasks:
- 1 short overview paragraph
- ≤5 bullets: What changed, Where, Risks, Next steps, Open questions
- Use Markdown with headers, bullets, tables when helpful
- Avoid long narrative paragraphs; prefer compact structure
</output_spec>
```
### 3. Prevent Scope Drift
Explicitly constrai