# Create and edit blocks

*Write reusable pieces of prompt text, change them, copy them and see which prompts use them.*

Online version: https://promptmason.ai/docs/blocks

A block is a reusable piece of prompt text, such as a role ("You are a support agent for…"), a task, or a set of rules for the format of the answer. You write a block once on the **Blocks** screen, then use it in as many prompts as you like. When you change a block, every dynamic prompt that uses it changes too (see [Static prompts, dynamic prompts and documents](https://promptmason.ai/docs/static-and-dynamic)).

## The Blocks screen

Click **Blocks** in the sidebar (or press Ctrl+1). The screen has two parts:

- **The list** on the left. Switch between **Tile view** and **List view** with the buttons in the toolbar. In Tile view, blocks are grouped by type. Use the **Search…** box (Ctrl+F) and the sort options to find a block (see [Find anything](https://promptmason.ai/docs/search) for search and filters).
- **The detail pane** on the right. Click a block to see it here. When nothing is selected, it says **Select a block to view it here.** Drag the line between the two parts to make either wider.

![The Blocks screen with blocks as cards grouped by type, and the selected block's text, stars and tags in the pane on the right.](https://promptmason.ai/images/docs/blocks-screen.webp)

On the Free plan, the top of the screen shows how many blocks you have, for example **12 of 25 blocks**. Archived blocks count toward the 25; blocks embedded in a single prompt don't (see [Library blocks and embedded blocks](https://promptmason.ai/docs/embedded-blocks)). [Plans and limits](https://promptmason.ai/docs/plans) has the details.

Only library blocks are listed here. Archived blocks are on the **Archive** screen, and blocks embedded in a prompt are only seen inside that prompt.

## Create a block

1. Click **Blocks** in the sidebar.
2. Click **New block** at the top right (or press Ctrl+N). A new, empty block opens in the detail pane.
3. Type a name for the block.
4. Write the block's text in the large box. Use the toolbar above it for bold, italic, lists and color ([Formatting, block headers and hidden notes](https://promptmason.ai/docs/text-formatting)). To put in a [variable](https://promptmason.ai/docs/variables), type `{{` and pick its name (when the Variables feature is on).
5. Under **Properties**, choose a **Type**, for example **Role** or **Task** (see [Block types](#block-types)).
6. Under **Location**, choose a folder. It starts on the folder selected in the sidebar, or **My Files (no folder)** if none is selected.
7. If the Tags feature is on, type a tag under **Tags** and press Enter. Add as many as you like.

    ![A new block open for editing, with a name, the text box and toolbar, and Type, Location and Tags under Properties.](https://promptmason.ai/images/docs/blocks-new-block-pane.webp)

8. Click the disk icon (**Save**) at the top of the pane, or press Ctrl+S.

**Save** stays grayed out until the block has a name and some text. Once it's saved, the block shows in the list and opens in the detail pane.

If you're on the Free plan and already have 25 blocks, the **Free plan limit** window opens instead of a new block. See [Plans and limits](https://promptmason.ai/docs/plans).

To stop without saving, click the X (**Cancel**) or press Esc. If you've typed anything, PromptMason asks **Discard your new block?** Click **Keep Editing** to go back, or **Discard Draft** to throw it away.

## Edit a block

1. Click **Blocks** in the sidebar.
2. Double-click the block, or click it once and then click the pencil (**Edit**) at the top of the detail pane.
3. Change the name, the text, the **Type** or, when the Tags feature is on, the **Tags**.
4. Click the disk icon (**Save**), or press Ctrl+S.

Nothing changes until you save. Once saved, every dynamic prompt that uses the block uses the new text.

To undo your changes instead, click the X (**Cancel**) or press Esc. This puts the block back as it was **without asking first**.

If you click another block or go to another screen with unsaved changes, PromptMason asks **Discard your changes?** Click **Keep Editing** to go back and save, or **Discard Changes** to lose the edits.

A block's folder isn't changed here. To put it in another folder, right-click it and choose **Move** ([Folders, moving and copying](https://promptmason.ai/docs/folders)).

You can also edit a block while you build a prompt, from the block's card on the Build screen. See [Library blocks and embedded blocks](https://promptmason.ai/docs/embedded-blocks#edit-a-block-from-build).

## Copy a block's text

1. Click the block in the list.
2. Click **Copy to Clipboard** at the bottom of the detail pane. You can also click the block's text in the pane, or press Ctrl+Shift+C.

The button shows **Copied** for a moment. What's copied is the text you see in the pane: [hidden notes](https://promptmason.ai/docs/text-formatting#hidden-notes) are left out and [variables](https://promptmason.ai/docs/variables) are filled in. If the block has a variable that asks for a value each time, the **Fill in your values** window opens first: type a value in each box and click **Copy** (more in [Fill in your values](https://promptmason.ai/docs/use-prompts#fill-in-your-values)).

## Duplicate a block

1. Right-click the block and choose **Copy**.
2. Under **Destination**, choose the folder for the copy. (Once you have a team library, this box is called **Folder**, and a **Library** box above it picks the library.)

    ![The Copy window with a Destination list and a Copy button.](https://promptmason.ai/images/docs/blocks-copy-block-window.webp)

3. Click **Copy**.

The copy is named after the original with "(copy)" at the end. It has the same type, text, tags and [expected output](https://promptmason.ai/docs/expected-output), and starts with no rating, not a favorite and no comments. It's a separate block: changing one doesn't change the other. On the Free plan the copy counts toward your 25 blocks.

To duplicate several blocks at once, tick their checkboxes and click **Copy** in the bar that appears above the list.

## See which prompts use a block

1. Right-click the block and choose **Used by**.
2. The **Used by** window lists every dynamic prompt built from this block, with its folder. Archived prompts aren't listed.

    ![The Used by window listing the prompts built from a block and their folders.](https://promptmason.ai/images/docs/blocks-used-by-window.webp)

3. Click a prompt to open it on the Build screen.

If no prompt uses the block yet, it says **Not used by any prompts yet.** Static prompts never appear here, because they don't use blocks once saved. In List view, the **Used By** column shows how many prompts use each block.

Check this before you change or remove a block, so you know which prompts will change.

## Block types

Every block has one type, which says what kind of instruction it is. PromptMason comes with five: **Role**, **Task**, **Context**, **Format** and **Constraints**. The type is shown on the block, groups the blocks in Tile view, and can be written as a header above the block's text in a prompt (see [Formatting, block headers and hidden notes](https://promptmason.ai/docs/text-formatting#block-headers)).

To add your own types, click **Settings** in the sidebar, then **Blocks & prompts**, and use **Block types**. The five built-in types can't be removed. See [Block types, prompt types and defaults](https://promptmason.ai/docs/types-and-defaults).

## Other things you can do with a block

From the detail pane, or by right-clicking a block (the right-click menu doesn't have **Evaluate** or **Expected Output**):

![The right-click menu on a block card listing Edit, Copy, Move, History, Used by, favorites, Rating and Delete.](https://promptmason.ai/images/docs/app-tour-block-right-click-menu.webp)

- **History**: see earlier versions and restore one ([Version history](https://promptmason.ai/docs/version-history)).
- **Add to favorites** and **Rating**: mark and rate blocks ([Tags, favorites and ratings](https://promptmason.ai/docs/tags-favorites-ratings)).
- **Move**: put it in another folder or library ([Folders, moving and copying](https://promptmason.ai/docs/folders)).
- **Delete**: archive it or delete it ([Archive, delete and restore](https://promptmason.ai/docs/archive-and-delete)).
- **Evaluate**: have AI grade the block or check it for private details ([Evaluate a block, prompt or document](https://promptmason.ai/docs/evaluate)).
- **Expected Output**: keep sample results with the block, in the detail pane ([Expected output](https://promptmason.ai/docs/expected-output)).

**Comments** for the selected block are in a panel at the bottom of the list ([Comments](https://promptmason.ai/docs/comments)).

Some of these only show when their feature is turned on in **Settings**, under **Features** ([Show or hide features](https://promptmason.ai/docs/features)). **Evaluate** also needs AI set up ([Set up AI](https://promptmason.ai/docs/ai-setup)).

If your library is paused because it's over the Free plan's limits, you can still read blocks, but editing and copying open the **Your library is paused** window. See [When your library is paused](https://promptmason.ai/docs/paused-library).

## Want a hand?

Paste this prompt into Claude, ChatGPT or another AI assistant, together with this guide, to be walked through it step by step:

> I'm new to PromptMason and want to set up my first few blocks. Explain what a block is, help me decide what blocks to write for my work, and walk me through creating and editing one.
