Lesson 17 of 1455
Prompt Templates and Libraries: Write Once, Use Forever
Turn prompts that work into reusable templates with variables, then save them in a simple library so future you can move faster without lowering the quality bar.
Builders · Prompting · ~14 min read
From prompt to template
A prompt is a one-off message. A template is a reusable prompt with placeholders you fill in each time. If you're doing the same task more than twice — summarizing articles, translating messages, rewriting emails — make a template.
Your first template
Placeholders in {{double braces}} are where input goes.
You are a concise news editor. Summarize the following article for a reader with 2 minutes to spare. Requirements: - 3 bullet points. - Include the main claim, the key evidence, and the biggest caveat. - Neutral tone, no opinion. Article: """ {{ARTICLE_TEXT}} """Each time you need a summary, you paste a new article into the placeholder. Same structure, same quality bar, different input. Your output stays consistent across hundreds of summaries.
A more advanced template
Multiple variables let you tune the template for different jobs.
ROLE: You are a {{TONE}} writing coach for {{AUDIENCE}}. TASK: Rewrite the user's draft to be {{GOAL}}. RULES: - Preserve the original meaning. - Do not invent new facts. - Keep the rewrite within {{WORD_COUNT}} words. - Flag any unclear passages with [UNCLEAR: ]. DRAFT: """ {{DRAFT_TEXT}} """ OUTPUT: 1. The rewritten version. 2. Three specific notes on what you changed and why.- {{TONE}} = 'supportive' or 'tough-love'
- {{AUDIENCE}} = 'high school seniors' or 'startup founders'
- {{GOAL}} = 'more concise' or 'more persuasive'
- {{WORD_COUNT}} = 150 or 500
Template hygiene
- 1Use a clear placeholder style ({{CAPS}} is common).
- 2Document what each variable expects.
- 3Keep an example filled-in version next to the template.
- 4Version your templates. v1, v2, v3 — with notes on what changed.
- 5Test with weird inputs (empty, very long, wrong format).
Key terms in this lesson
Build a prompt library
A template only helps if you can find it again. Save your best prompts in one place with a short name, the task it solves, the variables to replace, and one example output that shows what good looks like.
End-of-lesson quiz
Check what stuck
8 questions · Score saves to your progress.
Lesson help
Questions are best handled with a grown-up here.
For this age range, Tendril keeps freeform AI chat paused until parent/guardian consent and child-safe moderation are fully verified. Use the quiz, notes, and related lessons below, or ask a parent, guardian, teacher, or librarian to work through the question with you.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Builders · 28 min
The Five-Part Prompt: Role, Context, Examples, Constraints, Format
Pro prompters follow a structure. Give the AI a role, set the context, show examples, set constraints, and pick a format. This framework alone 10x's your output quality.
Builders · 22 min
Iterate, Don't Rewrite
Beginners scrap their prompt and start over. Pros keep the good parts and change only what isn't working. Here's how to iterate like a craftsperson.
Builders · 30 min
Structured Output: JSON and XML
When your prompt feeds into code, you need machine-readable output. JSON mode and XML tags make the AI's response parseable instead of loose prose.
