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 -->
<!-- 2026-07-06 | claude-config-model-optimization | eval-before-activation framing came directly from this skill's process; keep -->
<!-- 2026-07-14 | llm-wiki-starter-repo-for-friend | greenfield doc-repo session: skill applied to reference repos / a single beginner reader; council converged cleanly, dry-run ingest validated the resulting contract -->
development
Use when the council needs to surface organizational knowledge buried across multiple internal sources (wikis, design docs, ADRs, past tickets, postmortems, chat archives, code repos). Plans where to look, what to cross-reference, and how to synthesize findings into evidence the council can act on. Do not use for external market research (use competitive-analysis), library evaluation (use library-evaluation), or technology trend assessment (use technology-radar).
testing
Use to convert a Word .docx file to PDF and/or verify its page count. Triggers on: converting docx to pdf, rendering a document, checking how many pages a docx produces, or asserting a page-count constraint (e.g. a resume must stay 2 pages). Wraps LibreOffice headless conversion.
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
Interactive wizard to craft effective prompts using Claude Code best practices