skills/council/oracle/prompt-engineering/SKILL.md
Use when designing, evaluating, or versioning system prompts for LLM-powered features. Covers instruction structure, chain-of-thought patterns, output format constraints, few-shot example selection, and prompt versioning strategy. Do not use for RAG pipeline design (use rag-architecture) or AI evaluation frameworks (use ai-evaluation).
npx skillsauth add dtsong/my-claude-setup prompt-engineeringInstall 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.
Design, evaluate, and version system prompts for LLM-powered features, including instruction structure, chain-of-thought patterns, output format constraints, and few-shot example selection.
Reads feature requirements, data format examples, and quality constraints for prompt design analysis. Does not execute LLM calls, modify production prompts, or access API keys directly.
No user-provided values are used in commands or file paths. All inputs are treated as read-only analysis targets.
Before writing a prompt, articulate:
Use a layered structure:
For complex reasoning tasks:
<thinking> block, then provide the answer separatelySpecify the exact output structure:
Choose examples strategically:
Plan for prompt evolution:
Compaction resilience: If context was lost during a long session, re-read the Inputs section to reconstruct what system is being analyzed, check the Progress Checklist for completed steps, then resume from the earliest incomplete step.
# Prompt Design: [Feature Name]
## Task Definition
**Input:** [Description + example]
**Output:** [Description + format]
**Constraints:** [Hard rules]
## System Prompt (v1.0)
[Full system prompt text]
## Few-Shot Examples
### Example 1
**Input:** [Example input]
**Expected output:** [Example output]
### Example 2
**Input:** [Edge case input]
**Expected output:** [Edge case output]
## Chain-of-Thought Strategy
[Whether CoT is used, what the reasoning structure looks like]
## Output Schema
```json
{
"field1": "string (required) — description",
"field2": "number (optional) — description"
}
| Version | Date | Change | Eval Score | |---------|------|--------|------------| | v1.0 | [Date] | Initial | [Score] |
Recommended: [Model] at [temperature] Rationale: [Why this model for this task] Cost estimate: [$/1K requests]
## Handoff
- Hand off to rag-architecture if prompt design reveals retrieval or context assembly requirements.
- Hand off to ai-evaluation if prompt versioning requires an evaluation framework or regression testing.
## Quality Checks
- [ ] System prompt has a clear role, task, constraints, format, and examples
- [ ] Output format is designed for reliable programmatic parsing
- [ ] Few-shot examples cover normal cases and at least one edge case
- [ ] Constraints address prompt injection, hallucination, and off-topic input
- [ ] Prompt is stored in version control with a changelog
- [ ] Model and temperature are justified for the task requirements
## Evolution Notes
<!-- Observations appended after each use -->
development
Use when planning implementation steps, deciding commit format, or structuring development approach. Provides brainstorm-plan-implement flow with conventional commits. Triggers on 'how should I approach this', 'commit format'.
development
Security audit checklist for web applications. Use when reviewing, auditing, or hardening a web app's security posture. Covers rate limiting, auth headers, IP blocking, CORS, security middleware, input validation, file upload limits, ORM usage, and password hashing. Triggers on requests like "review security", "harden this app", "security audit", "check for vulnerabilities", or when building/reviewing API endpoints.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.