Module 04 · Reusable Instruction Systems
Designing a Personal Prompt Library by Use Case
Open lesson + course map
On this lesson
Course outline
Module 1 · Structural Prompt Frameworks
Module 2 · Reasoning Patterns
Module 3 · Few-Shot and Example-Driven Prompting
Module 4 · Reusable Instruction Systems
A prompt library is a small, searchable collection of prompts that have a named job, known inputs, and a recorded test. Organizing it by use case lets you retrieve “client update” or “source review” when work arrives instead of scrolling through old chats.
By the end, you will have an offline-friendly library skeleton with five prompts filed under writing, analysis, client communications, research, and review. Each entry will carry enough metadata to tell you when it is safe to reuse—and when it is not.
// concept
Build a Taxonomy Around Jobs, Not AI Tools
Do not create top-level folders named ChatGPT, Claude, or Gemini: tool names do not describe the job and become obsolete when you switch tools. Start with five stable use cases:
prompt-library/
├── README.md
├── writing/
│ └── shorten-product-copy.md
├── analysis/
│ └── compare-vendor-options.md
├── client-comms/
│ └── project-update-email.md
├── research/
│ └── source-grounded-brief.md
├── review/
│ └── client-email-quality-check.md
├── tests/
├── _archive/
└── _retired/Use lowercase, hyphenated filenames that say what the prompt does. One prompt gets one file.
Put this index in README.md:
| ID | Use case | Trigger words | Status |
|---|---|---|---|
client-comms.project-update | Client update email | update, blocker, next step | current |
writing.shorten-product-copy | Shorten supplied copy | concise, product, listing | current |
analysis.compare-vendor-options | Compare documented options | shortlist, trade-off | current |
research.source-grounded-brief | Brief from supplied sources | research, citations | current |
review.client-email-quality-check | Check an email before sending | review, email, risk | current |
Search the index by job or trigger word, then check one candidate's metadata. In a local folder or notes app, search client update or the exact ID. In GitHub, a precise query is "project update" path:client-comms.
// concept
Give Every Prompt a Metadata Card and Acceptance Test
Paste this header at the top of every file. Record the model name exactly as shown when tested; behaviour can differ between models.
---
id: client-comms.project-update
purpose: Turn supplied project facts into a concise client update email
inputs: client_name, period, completed, blocker, next_step, tone
model_tested: "[provider and model name as displayed]"
last_tested: YYYY-MM-DD
owner: "[your name]"
status: draft | current | archived | retired
tags: [client, email, update, blocker]
known_limits:
- Cannot verify whether supplied project facts are true
- Needs human review for promises, dates, and confidential details
acceptance_test: tests/client-comms.project-update.md
replaces: null
---The acceptance test saves one input and visible pass conditions. Here: supplied completions appear, the blocker remains explicit, no date is invented, the next step has an owner, and the result has a subject plus an email under 140 words. Re-run it after any prompt or model change.
Here is the difference between collecting text and maintaining a library entry:
| Bad entry | Good entry |
|---|---|
Filename good-prompt-final2.md | Stable ID and searchable filename |
| No input list | Required inputs named in metadata |
| “Write a professional update” | Scope, output format, and no-invention rules |
| No saved result | Test input, pass conditions, and last-tested date |
| Old copies in the same folder | Current file plus deliberate archive record |
This is a complete first prompt for the entry:
You draft client project-update emails from facts I provide.
INPUT
Client: {client_name}
Reporting period: {period}
Completed: {completed}
Blocker: {blocker}
Next step and owner: {next_step}
Tone: {tone}
RULES
- Use only the input above. Do not invent progress, dates, causes, or commitments.
- State the blocker plainly; do not hide it behind positive language.
- If a required input is missing, return NEEDS INPUT followed by the missing field names.
- Do not expose private notes or provide hidden reasoning.
OUTPUT
Subject: [specific subject]
[Greeting]
[Email of no more than 140 words: completed work, blocker, next step]
[Sign-off]// concept
Retrieve, Archive, and Retire Without Losing Trust
Before use, confirm the purpose matches, required inputs exist, recorded limits are acceptable, and the saved test still passes. A polished response that invents a delivery date fails.
Keep one current entry per ID. Move a rollback candidate to _archive/<id>/YYYY-MM-DD-vN.md, mark it archived, and link its replacement. Move a duplicate, obsolete, or unsafe prompt to _retired; add retired_reason and replacement, and exclude it from normal search. Preserve its test history.
Local Markdown remains readable during load-shedding and can sync later. An offline notes notebook is a phone-first alternative if it preserves code blocks. Treat cloud workspaces as mirrors; verify their current plan and offline behaviour before depending on them.
// worked_example
Worked Example
The following is a hypothetical sample for a Lahore freelancer. No real client or result is claimed. They retrieve client-comms.project-update and run it with this sample input:
Client: Sample UK Retail Client
Reporting period: 14–18 July 2026
Completed: Product-feed field mapping; validation of 12 sample rows
Blocker: Client has not supplied image usage approvals
Next step and owner: Client sends approvals; freelancer then prepares the import preview
Tone: Direct and calmSample draft one says: “Everything is on track, and the import should be ready next week.” It also omits the approvals blocker. That output fails two acceptance conditions: “on track” is not supported, and “next week” invents a commitment.
The fix is not to ask for private reasoning. Add a visible pre-send gate to the prompt and run the same sample again:
Review the draft only against the supplied input and these tests:
1. Every completion claim appears in the input.
2. The blocker is explicit and unchanged in meaning.
3. No date, result, cause, or promise has been added.
4. The next step names the responsible party.
5. The body is 140 words or fewer.
Return exactly:
VERDICT: PASS or FAIL
DEFECTS: bullet list quoting each defective phrase
REVISED EMAIL: a corrected subject and email, or UNCHANGED if PASS
Do not reveal hidden reasoning. Do not add facts while revising.
<supplied_input>
{paste the original structured input}
</supplied_input>
<draft>
{paste draft one}
</draft>Sample output excerpt:
VERDICT: FAIL
DEFECTS:
- “Everything is on track” is unsupported and hides the approvals blocker.
- “ready next week” adds a date not present in the input.
REVISED EMAIL:
Subject: Product-feed update: image approvals needed
Hello,
The product-feed field mapping is complete, and 12 sample rows have been validated. The import preview is blocked until your team supplies image usage approvals. Once approvals arrive, I will prepare the import preview for review.
Regards,
[Name]Save both outputs and the fix in the test file. Promote draft to current only after the revised output passes.
// failure_cases
Failure Cases to Diagnose
6 cases to diagnose
Folders mirror vendors
ChatGPT/andClaude/contain duplicates. Refile by work use case and record the tested model in metadata.Search returns five “final” files
filenames such as
final-v2-new.mdlack stable IDs. Rename one current entry and move older versions into its dated archive folder.A prompt cannot be run by someone else
its inputs exist only in the author’s memory. Add an input list, sample input, and missing-field response.
An edit silently reduces quality
there is no saved acceptance test. Restore the last known version, create a fixed test case, then compare one change at a time.
A retired prompt keeps reappearing
it remains tagged
currentor sits in a normal folder. Mark itretired, record the replacement, and exclude_retiredfrom routine search.The library becomes a data leak
real CNICs, phone numbers, client secrets, or private chat transcripts are stored as examples. Replace them with labelled synthetic samples and keep sensitive material outside the prompt library.
// pakistan_angle
Pakistan Angle
For learners working through load-shedding or unstable mobile data, keep the source-of-truth library as lightweight Markdown or an offline notes notebook. Draft and search locally, then sync when power and connectivity return. A cloud-only prompt gallery can become unavailable exactly when a client update is due, so export any vendor-hosted prompt you depend on and check the current official export or offline options.
Pakistani freelancers often handle WhatsApp briefs containing phone numbers, order details, or CNIC images. Do not copy that material into a reusable example. Replace it with clearly labelled sample data, and add language tags such as roman-urdu, urdu-script, and client-english so a search retrieves the correct voice. For UK or US client emails, keep PKR quotes, delivery dates, and payment terms exactly as approved rather than letting the model “localize” them.
// hands_on
Hands-On Exercise
7 steps
Build prompt-library/ with the exact five use-case folders and five starter files shown in the index.
Create
README.md, the five folders,tests/,_archive/, and_retired/.Give each file an ID, verb-led filename, metadata card, and three trigger words.
File this lesson's two prompts; write three small prompts for the other use cases.
Save one sample input and 3–5 binary pass conditions per entry.
Run all five with non-sensitive sample data; record model, date, result, and one limit.
Search by trigger word and fix any ambiguous filename or tag.
Archive one superseded draft and retire one duplicate, linking replacements. Done means all five prompts are retrievable by use case, each has a recorded acceptance result, exactly one version of each ID is current, and no real personal or client-confidential data appears in the library.
// completion_rubric
Completion Rubric
6 checks — tick as you verify
// sources
Sources
// check_yourself
Check yourself
4 questions · answers and options are taken word-for-word from this course
1 / 4 · diagnose
Your work shows this failure mode: “Search returns five “final” files.” The lesson describes it like this: “Filenames such as `final-v2-new.md` lack stable IDs.” What does the lesson tell you to do about it?