Build a prompt library: save the prompts that work

Stop retyping the same prompts. How to keep a small library of prompts that work: a prompts file in your repo, Claude Code skills for repeat routines, and a prompt tool for the browser.

By Shakir Sajad & Claude (AI by Anthropic) · 2 min read · Updated 2026-11-19

toolbox illustration

Step 11 of the agentic coding learning path.

Why save prompts

A good prompt takes thought: the goal, the context, what "done" means. Rewriting it from memory each time, you forget a line, and the agent gets it wrong again. A saved prompt keeps every lesson you learned the hard way.

Three places to keep them

WhereBest forExample
prompts.md in your repoPrompts for this one project"Add a new guide page"
Claude Code skillsMulti-step routines Claude can run on demand"Release checklist"
A prompt toolPrompts you use across ChatGPT, Claude, Gemini in the browser"Rewrite this email", "Explain this error"

Skills, for routines

Anthropic's best practices say procedures belong in skills, not in CLAUDE.md. Your memory file loads on every task. A skill loads only when it's needed. See the skills docs for how to make one.

A prompt tool, for the browser

Plenty of founder work happens in a chat window, not a code editor: emails, research, copy, quick questions. For that, I built PromptItIn. You write a rough request, it turns it into a clear prompt, and its Chrome extension drops it into ChatGPT, Claude, Gemini or Perplexity. You can save the prompts that work and reuse them. Any tool that saves and reuses prompts does the job; use the one you'll actually open.

Five templates to start with

Copy these into your library. Each one is a habit from this hub.

1. Brief a task

Prompt
Goal: {one sentence}
Where to look: {@files}
Done when: {check that passes} — show me the command and output.
Don't: {limits}

2. Fix a bug

Prompt
Bug: {what happens} when {steps}. Expected: {what should happen}.
Error: {paste exact text}
Write a failing test that reproduces it, then fix it. Smallest change that works.

3. Plan

Prompt
/plan {feature}. List the files you'll change, the steps in order, how you'll check each step, and what you're unsure about.

4. Review

Prompt
Review the current diff against {SPEC.md / my request}. Report only gaps that affect correctness. Skip style.

5. Hand over

Prompt
Write a handover to docs/PENDING.md: what's done, what's left, the next step, and any decision I made. Under 15 lines.

Keep improving them

Every time you correct the agent, ask: should this line be in the template? If yes, add it. After a month, your prompts carry everything you've learned, and new sessions start where the last one ended.

What's next

Part 3 starts here: give every session a shared memory with a docs folder for agents.

Do this now

  1. Collect 5 prompts you've typed more than once Scroll back through old sessions. The repeats are your library. (15 min)
  2. Turn each into a template Swap the specific bits for {placeholders}. (15 min)
  3. Save them in one place A prompts.md in your repo, or a prompt tool you'll actually open. (10 min)
  4. Make your most-used routine a skill If it's a multi-step procedure, it belongs in a skill, not your memory file. (20 min)
  5. Improve one prompt after using it Add the line you had to type as a correction. (5 min)

Frequently asked questions

What is a prompt library?

A small set of prompts you've tested and saved as templates, with placeholders for the parts that change. You reuse them instead of rewriting from memory.

Where should I keep it?

Prompts for one project fit in a prompts.md in the repo. Repeat procedures in Claude Code fit best as skills. Prompts you use across ChatGPT, Claude and Gemini in the browser fit a prompt tool.

What's the difference between a skill and CLAUDE.md?

CLAUDE.md loads on every task, so it should hold short facts. A skill holds a longer procedure that only loads when needed. Anthropic's docs suggest moving multi-step procedures out of CLAUDE.md into skills.

How many prompts do I need?

Fewer than you think. Five to ten good templates cover most daily work: brief a feature, fix a bug, plan, review, hand over.

Sources