A prompt library helps in a code editor when you keep asking for the same things: explanations, tests, reviews or documentation. Keep the reusable instructions separate from the code and project details that change from task to task.

There are two ways to use prompts in your code editor. Download a board as Claude Code commands (a slash command per prompt), Cursor rules (a project rule per prompt) or an AGENTS.md file that Codex, Cursor, Claude Code and other coding agents read. Or connect Claude Code or Cursor to your whole library over MCP.

Build a reusable developer prompt#

A useful code prompt states the task, the language or framework if you know it, the scope, any constraints, the output you expect and what to do when something is unclear. For example:

Review the code or diff I provide for correctness, edge cases, security concerns and missing tests. Prioritise concrete findings over style preferences. For each finding, state the issue, why it matters and a suggested fix. Don't claim a vulnerability without explaining the evidence. If context is missing, ask for it.

Scope: {{language or framework}}
Expected output: {{review format}}

Code or diff:
{{code or diff}}

The parts in double curly braces are blanks you fill in each time (see Fill in the blanks). In coding prompts, use curly braces rather than square brackets: square brackets are often code, like items[0].

Separate instructions from changing context#

Don't bake one repository's file paths, architecture or assumptions into a prompt you mean to use in other projects. Use blanks for the project, the language, the goal and the code under review, and give the details when you run it.

Protect sensitive information#

Before you send code or logs to an AI service, check your organisation's rules and the service's data settings. Remove API keys, passwords, tokens, private keys, customer data and other secrets. A prompt library should hold reusable instructions, not credentials or proprietary code.

Use a consistent review format#

Ask the model to separate confirmed issues, possible risks that need more context, missing tests and questions for the author. Check every suggested fix in your own environment: AI-written code and reviews can be wrong or incomplete.

Download a board for your code editor#

  1. Open your boards and pick one, or make a board of the prompts you use for code: reviews, tests, commit messages, refactors.
  2. Choose Use in your code editor at the top of the board. For a single prompt, open its ⋯ menu and choose the same thing.
  3. Choose Download next to the format you want. You can download all three.

The files use the board's order and each prompt's full text. Each file name comes from the prompt's title: lowercase words joined by hyphens, at most 50 characters, so Review this PR becomes review-this-pr. Two prompts with the same title get review-this-pr and review-this-pr-2.

Claude Code slash commands#

The Claude Code download is a zip with one Markdown file per prompt in .claude/commands/, plus a short read-me. Unzip it into your project's root folder. In Claude Code, type / and the file's name, for example /review-this-pr. To have the commands in every project, move the .md files to ~/.claude/commands/ instead. Each file starts with a description, the prompt's title, which Claude Code shows in its list of commands:

---
description: "Review this PR"
argument-hint: "<focus>"
---

Review the staged diff for $ARGUMENTS. List bugs first, then risky changes, then style.

If a name is the same as one of Claude Code's own commands, rename the file. Anthropic's guide to custom slash commands in Claude Code has the rest.

How blanks become command arguments#

Blanks written in double curly braces, as in {{focus}}, are how a prompt asks for something (see Fill in the blanks). In a Claude Code command:

  • One blank becomes $ARGUMENTS, everywhere it appears, so you type the value after the command: /review-this-pr error handling.
  • Several blanks stay as written, and a line at the top lists them. Give the values after the command, as in /write-tests file: src/cart.ts, framework: Vitest, and Claude asks for any you leave out.
  • Square-bracket blanks such as [audience] are left exactly as they are. In prompts about code, square brackets are usually code (items[0]), and changing them would break it. Use curly braces for blanks in your coding prompts.

Cursor rules and AGENTS.md keep every blank as written, since neither has arguments. The agent fills them in from what you ask.

Cursor rules#

The Cursor download is a zip with one rule file per prompt in .cursor/rules/. Unzip it into your project's root folder. Each rule has a description and alwaysApply: false, so it doesn't fill every chat: Cursor's agent reads the description and brings the rule in when your request matches, and you can add one yourself by typing @ and its name in the chat.

---
description: "Write tests"
alwaysApply: false
---

Write tests for {{file}} using {{framework}}. Cover the edge cases first.

Cursor's own page on project rules in Cursor explains the rule types.

AGENTS.md for Codex and other agents#

AGENTS.md is a plain Markdown file that many coding agents read from the root of a project, among them OpenAI's Codex, Cursor, Claude Code, GitHub Copilot's coding agent and others (the AGENTS.md format lists them). The download has the board's name as its title, one section per prompt with the prompt's title as the heading, the board's note for it if there is one, then the prompt. Headings inside a prompt move down two levels so each one stays inside its own section.

Put it in your project's root folder. If the project already has an AGENTS.md, don't replace it: paste the sections you want into it. Then ask the agent for a prompt by name, as in “use the Review this PR prompt on my last commit”.

Keeping your code editor prompts up to date#

The files are a copy of the board as it was when you downloaded it. If you edit a prompt or add one to the board, download again and replace the files. The read-me in each zip is called README-save-my-prompts.md, so unzipping never replaces your project's own README.

Connect your library over MCP#

Want your whole library, always current, inside Claude Code or Cursor? Connect it over MCP. The two work well together: commands for the prompts you run every day, MCP for finding the rest.

  1. Open the Connect your AI page, or the full steps in Claude, Claude Code and MCP apps.
  2. Add the server. In Claude Code, run claude mcp add --transport http savemyprompts https://api.savemyprompts.net/mcp, then type /mcp and choose savemyprompts. In Cursor, add https://api.savemyprompts.net/mcp to ~/.cursor/mcp.json.
  3. Sign in to Save My Prompts when your browser opens, check the consent page and choose Allow.
  4. Test it with a prompt that has nothing sensitive in it: ask for it by its title.
  5. Check that the text that comes back is your saved prompt.

When you contact us about a connection, leave out tokens and private repository details.