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)
data-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.