Prompt Template Patterns
# Prompt Template Patterns
Use this file as the overview for prompt structure patterns. Detailed templates and contracts now live in smaller companion files.
## Prompt Anatomy
Most production prompts should separate:
1. role or identity
2. hard rules
3. task instructions
4. context or data
5. output contract
6. fallback or error path
## Pattern Map
| Need | File |
|---|---|
| Delimiters and prompt sectioning | `prompt-template-foundations.md` |
| System prompt structure | `prompt-template-foundations.md` |
| Few-shot and CoT formatting | `prompt-template-foundations.md` |
| Output schemas and tool schemas | `prompt-template-contracts.md` |
| Prompt registry and versioning | `prompt-template-contracts.md` |
| Provider-specific prompt adjustments | `prompt-template-contracts.md` |
## Default Rules
- separate instructions from untrusted data
- prefer XML tags or other hard delimiters over loose prose
- keep output contracts explicit
- define what failure looks like
- treat prompt changes like versioned config, not ad hoc copy editswhen to use it
Community prompt sourced from the open-source GitHub repo alex-voloshin-dev/ai-skills (MIT). A "Prompt Template Patterns" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
alex-voloshin-dev/ai-skills · MIT
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar