Prompt engineering cheat sheet with templates
Eight prompt patterns that reliably work, each with a copy-paste template that already has variables.
Most "prompt engineering" content is either too abstract (five-page philosophical essays) or too specific (one-off prompts for one use case). This cheat sheet is the middle ground: eight prompt patterns that consistently work across models, each with a real template you can drop into TextDeck and parameterize for your own use.
1. Role + task + constraints
The workhorse pattern. Tell the model who to be, what to do, and what not to do. Works for virtually everything.
Template: "You are an expert {{role}}. Your task: {{task}}. Constraints: {{constraints}}. Output format: {{format}}."
Variables: role, task, constraints, format. Example use: "You are an expert technical writer. Your task: explain kubernetes operators to a junior developer. Constraints: no jargon, include one analogy, 300 words max. Output format: plain prose."
2. Few-shot examples
Show, do not tell. When the task involves a specific format or style, two or three examples beat any amount of explanation.
Template: "Convert the input into the output format shown in the examples.\n\nExample 1:\nInput: {{example1_input}}\nOutput: {{example1_output}}\n\nExample 2:\nInput: {{example2_input}}\nOutput: {{example2_output}}\n\nNow convert:\n{{actual_input}}"
3. Structured extraction
When you want clean, parseable output from messy input. Ask for a specific schema and the model will usually respect it.
Template: "Extract the following fields from the text below as JSON: {{fields}}. If a field is not present, use null. Do not invent values.\n\nText:\n{{text}}"
4. Rewrite with tone transfer
The most common editorial task. Keep the content, change the voice.
Template: "Rewrite the following in the tone of {{tone_reference}}. Preserve meaning and length. Do not add new information.\n\nOriginal:\n{{original}}"
5. Compare and contrast
Great for research, decision-making, and analysis. The table format forces structured thinking.
Template: "Compare {{options}} across these dimensions: {{dimensions}}. Output a markdown table. Flag any dimensions where the answer is ambiguous or depends on context."
6. Critical review
When you want the model to disagree with you instead of cheerleading. This pattern reliably gets past the sycophancy problem.
Template: "Review the following {{content_type}} critically. Identify weak claims, unsupported assertions, and places where the reasoning breaks down. Be direct. Do not soften the critique. Do not summarize — critique.\n\n{{content}}"
7. Step-by-step plan
For anything non-trivial, forcing explicit steps dramatically improves output quality.
Template: "Help me plan {{goal}}. Step 1: identify constraints. Step 2: list assumptions. Step 3: propose three approaches with tradeoffs. Step 4: recommend one with reasoning. Context: {{context}}."
8. Persona + audience + goal
For writing tasks where tone matters. Naming both speaker and listener tightens the output enormously.
Template: "Write {{output_type}} as {{speaker_persona}} for {{audience}}. Goal: {{goal}}. Tone: {{tone}}. Length: {{length}}."
How to use this cheat sheet
Copy any of these into TextDeck as a new template, replace the {{variables}} with your own defaults, and you are done. Trigger with ⇧⌘P, fill in the fields, paste into your AI of choice. The eight patterns cover most daily AI work.
You do not need to memorize them. You need them accessible with one hotkey. That is the whole point of having a prompt library.