| name | ai-prompting |
| description | Quick tips and templates for effective prompt engineering - few-shot examples, chain-of-thought patterns, constraint specification, output formatting |
| short_desc | quick prompting templates and tips |
| keywords | ["few-shot examples","constraint specification","output formatting","prompt template","prompting tips","prompt patterns","prompt engineering","improve this prompt","write a prompt"] |
| model | haiku |
AI Prompting (Haiku)
Purpose: Quick tips and templates for effective prompt engineering - few-shot examples, chain-of-thought patterns, constraint specification, output formatting.
Model: Haiku 4.5 (fast, practical prompt improvement)
When to Invoke Autonomously:
Use this skill when:
- Prompt Not Working Well: "LLM output is inconsistent/poor quality"
- Need Examples: "How to structure few-shot prompt for [task]?"
- Output Formatting: "LLM not following desired format"
- Constraint Specification: "How to enforce constraints in prompt?"
- Chain-of-Thought: "Need step-by-step reasoning for [complex task]"
DO NOT invoke for:
- Complex prompt engineering (use AI LLM Expert agent)
- Production prompt systems (use AI LLM Expert agent)
- Already-working prompts
Usage
/ai-prompting improve-prompt [current prompt] [issue]
/ai-prompting few-shot [task description]
/ai-prompting chain-of-thought [reasoning task]
/ai-prompting output-format [desired structure]
Quick Prompt Patterns
For detailed examples of each pattern, see examples/prompt-patterns.md.
Common Patterns
- Few-Shot Examples: Show 2-5 input→output examples (15-30% accuracy improvement)
- Chain-of-Thought: "Think step-by-step" for reasoning tasks
- Output Format Specification: Explicit structure with examples
- Constraint Enforcement: Explicit boundaries, "DO NOT" statements
- Role-Based Prompting: "You are a [role] specializing in [domain]" (20-40% improvement)
Common Issues & Fixes
- Inconsistent Output → Explicit format + examples
- Over-Verbose → Length constraints
- Hallucinations → Constrain to provided context only
- Ignoring Instructions → Repeat constraints, add examples
Quick Workflow Reference
Before implementing: Search for proven patterns
.claude/scripts/kg-search search "prompt-engineering" --type concepts
For deep research: Ask user "Use hybrid_search to research [prompting techniques]"
Development env: Python 3.12, Weaviate:8081, Ollama:11435, venv: source claude_mcp_servers/.venv/bin/activate
Integration with Knowledge Graph
After prompt improvement:
- Document successful pattern in
knowledge/prompts/[use-case]-patterns.md
- Tag with use case and effectiveness
Supporting Files
Success Metrics
- ✅ Prompt output improves after applying pattern
- ✅ Tips are actionable and immediate
- ✅ Common issues resolved