skills/prompt-engineer/SKILL.md
Expert prompt optimization for LLMs and AI systems. Use PROACTIVELY when building AI features, improving agent performance, or crafting system prompts. Masters prompt patterns and techniques.
npx skillsauth add curiositech/windags-skills prompt-engineerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Expert in crafting, optimizing, and debugging prompts for large language models. Transform vague requirements into precise, effective prompts that produce consistent, high-quality outputs.
User: "My chatbot gives inconsistent answers about our refund policy"
Prompt Engineer:
1. Analyze current prompt structure
2. Identify ambiguity and edge cases
3. Apply constraint engineering
4. Add few-shot examples
5. Test with adversarial inputs
6. Measure improvement
Result: 40-60% improvement in response consistency
| Technique | When to Use | Expected Improvement | |-----------|-------------|---------------------| | Chain-of-Thought | Complex reasoning | 20-40% accuracy | | Few-Shot Examples | Format consistency | 30-50% reliability | | Constraint Engineering | Edge case handling | 50%+ consistency | | Role Prompting | Domain expertise | 15-25% quality | | Self-Consistency | Critical decisions | 10-20% accuracy |
C - Context: What background does the model need?
L - Limits: What constraints apply?
E - Examples: What does good output look like?
A - Action: What specific task to perform?
R - Review: How to verify correctness?
You are [ROLE] with expertise in [DOMAIN].
## Your Task
[CLEAR, SPECIFIC INSTRUCTION]
## Constraints
- [CONSTRAINT 1]
- [CONSTRAINT 2]
## Output Format
[EXACT FORMAT SPECIFICATION]
## Examples
Input: [EXAMPLE INPUT]
Output: [EXAMPLE OUTPUT]
Think through this step-by-step:
1. First, identify [ASPECT 1]
2. Then, analyze [ASPECT 2]
3. Consider [EDGE CASES]
4. Finally, synthesize into [OUTPUT]
Show your reasoning before the final answer.
| Phase | Activities | Tools | |-------|------------|-------| | Analyze | Review current prompts, identify issues | Read, pattern analysis | | Hypothesize | Form improvement hypotheses | Sequential thinking | | Implement | Apply prompt engineering techniques | Write, Edit | | Test | Validate with diverse inputs | Manual testing | | Measure | Quantify improvement | A/B comparison | | Iterate | Refine based on results | Repeat cycle |
Problem: Model fabricates information
Fix: Add "Only use information provided. Say 'I don't know' if uncertain."
Problem: Model produces too much text
Fix: Add "Be concise. Maximum 3 sentences." + format constraints
Problem: Output doesn't match required format
Fix: Add explicit examples + "Follow this exact format:"
Problem: Model loses track in long conversations
Fix: Add periodic context summaries + clear role reminders
What it looks like: Cramming every possible instruction into one prompt Why wrong: Dilutes important instructions, confuses model Instead: Prioritize 3-5 key constraints, use progressive disclosure
What it looks like: "Write something good about our product" Why wrong: No measurable criteria, inconsistent outputs Instead: Specific requirements with examples
What it looks like: 50+ rules the model must follow Why wrong: Model can't prioritize, contradictions emerge Instead: Essential constraints only, test for necessity
What it looks like: Complex format with no concrete examples Why wrong: Model interprets instructions differently Instead: Always include 2-3 representative examples
| Metric | How to Measure | Target | |--------|----------------|--------| | Consistency | Same input, same output quality | >90% | | Accuracy | Correct information | >95% | | Format Compliance | Follows specified format | >98% | | Latency | Time to first token | <2s | | Token Efficiency | Output tokens per task | -20% waste |
Use for:
Do NOT use for:
Core insight: Great prompts are like great specifications—specific enough to eliminate ambiguity, flexible enough to handle variation, and tested against adversarial inputs.
Use with: ai-engineer (production apps) | automatic-stateful-prompt-improver (automation) | agent-creator (new agents)
tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.