How to build a prompt library in Markdown files
Keep reusable AI prompts as Markdown files: one prompt per file, front matter for tags and variables, a folder layout, and the prompt files coding tools read.

A prompt library is a folder of prompts you reuse, and the most durable way to keep one is as Markdown files: one prompt per .md file, a short front matter block with its purpose, tags and variables, and the prompt text below it with placeholders such as {{audience}} where the details change. Plain files work with every AI tool because you copy the text in, they can be searched and versioned with Git, and several coding tools now read Markdown prompt files directly from your project.
This guide covers what a prompt file should contain, a folder layout, how to handle variables, and where tools such as Claude Code and VS Code expect their own prompt files (checked November 2026).
Why keep prompts as Markdown files?
Prompts saved inside one chat app are hard to find, cannot be compared across versions, and disappear if you change tools. A folder of .md files fixes each of those:
- Portable. Every chat interface and coding agent accepts pasted text, and Markdown is the format most of them already answer in.
- Searchable. A prompt you wrote six months ago is one search away, in any editor or with
grep -ril "release notes" prompts/. - Versioned. In a Git repository,
git log -p prompts/summarize-meeting.mdshows how a prompt changed and why. A guide to that setup is in Git for notes. - Shareable. A team can review a prompt change in a pull request like any other text change.
- Readable by tools. Coding agents can be pointed at the folder and told to use a prompt by name.
What should a prompt file contain?
A prompt file should contain the prompt itself plus enough context that someone else, or you in six months, knows when to use it and what to fill in. Front matter holds the facts; the body holds the text you send.
---
title: Summarize a meeting transcript
description: Turns a raw transcript into decisions, owners and open questions.
tags: [meetings, summary]
variables: [team, transcript]
tested_with: Claude, ChatGPT
updated: 2026-11-20
---
You are summarizing a meeting for the {{team}} team, who did not attend.
Read the transcript below and write:
1. **Decisions**: one line each, past tense.
2. **Action items**: a task list with the owner's name first.
3. **Open questions**: anything raised but not answered.
Rules:
- Use only what is in the transcript. If an owner is unclear, write "Owner: unknown".
- Keep the whole summary under 200 words.
- Answer in Markdown.
Transcript:
{{transcript}}
## Notes
- v3: added the 200-word limit; summaries were running long.
- Works poorly on transcripts with no speaker names.
Front matter fields are free-form; pick a few and use them consistently. The front matter page covers the syntax. The ## Notes section at the end is for you, not the model: leave it out when you paste.
How should you organize the folder?
Organize by the job a prompt does, not by the tool you used it in. Tools change; jobs repeat.
prompts/
README.md
writing/
rewrite-for-clarity.md
release-notes-from-commits.md
meetings/
summarize-meeting.md
agenda-from-notes.md
code/
review-pull-request.md
explain-error.md
research/
compare-sources.md
_parts/
tone-plain-english.md
output-markdown-table.md
A few conventions that keep it usable:
| Convention | Example | Why |
|---|---|---|
| Verb-first file names | summarize-meeting.md |
You search for what you want to do |
| One prompt per file | not all-writing-prompts.md |
Each prompt has its own history |
| A README index | one line per prompt | New teammates see what exists |
Shared fragments in _parts/ |
tone-plain-english.md |
Fix the tone once, reuse it everywhere |
updated date in front matter |
2026-11-20 |
Stale prompts are easy to spot |
How do you handle variables in a prompt?
Mark every part that changes with a placeholder, and list the placeholders in front matter so nobody misses one. Double curly braces, {{name}}, are a common convention because they rarely appear in normal text and are easy to search for.
Before you send a prompt, search the text for {{. Any match is a placeholder you forgot to fill. If you fill them often, a short script can do it:
sed -e "s/{{team}}/Platform/" prompts/meetings/summarize-meeting.md
Placeholder syntax is a convention of your library, not a standard. Tools that read prompt files directly each have their own, listed below.
Which tools read prompt files from your project?
Some coding tools load Markdown prompt files from fixed folders and run them by name, so a prompt can live in the repository it is used with.
| Tool | Location | How you run it | Variables |
|---|---|---|---|
| Claude Code (skills) | .claude/skills/<name>/SKILL.md |
/name |
$ARGUMENTS, or named arguments declared in front matter |
| Claude Code (commands) | .claude/commands/<name>.md |
/name |
Same as skills |
| VS Code with GitHub Copilot | .github/prompts/<name>.prompt.md |
/name in chat, or Chat: Run Prompt |
${input:name} |
Claude Code's documentation says custom commands "have been merged into skills" and that existing .claude/commands/ files keep working; skills are the recommended form for new work because they can include supporting files. VS Code's prompt file documentation now recommends converting prompt files to agent skills as well, so check the current docs before building on either format.
A practical approach is to keep the general library in your own prompts/ folder and copy a prompt into a tool's folder only when a project uses it repeatedly. Standing instructions that apply to every task in a repository belong in a different file, covered in AGENTS.md explained.
How do you keep prompts working over time?
Treat a prompt like a small piece of code: change it on purpose, note why, and check it still does its job.
- Keep a test input. Save a short example input next to the prompt, such as
summarize-meeting.example.md, and run it after every change. - Write down the version note. One line in the
## Notessection: what changed and what problem it fixed. - Record what it was tested with. Models change behavior between versions;
tested_withtells you when a prompt might need another look. - Delete what you do not use. A library of 30 prompts you trust beats 300 you have to read before using.
- Keep private data out. Prompts often get shared. Put real names, keys and customer data in the input you paste, never in the stored template.
If your prompts depend on longer background material, such as a style guide or product facts, keep that as separate Markdown files and attach them when needed. That approach is covered in Markdown notes as AI context.
Keeping a prompt library in Noteline
Noteline, which we make, opens a prompts/ folder (Cmd+O on a Mac, Ctrl+O on Windows and Linux), lists the Markdown files in the sidebar and saves each prompt as a plain .md file. Find in Folder (Cmd+Shift+F or Ctrl+Shift+F) searches every prompt at once, which is also a quick way to find leftover {{ placeholders. Noteline does not run prompts or connect to an AI model; you copy the text into the tool you use. Hidden folders such as .claude and .github are skipped in the sidebar, so edit tool-specific prompt files in your code editor.