Skip to content
Power Features

Dynamic Placeholders

You can make your Quicklinks, Snippets, and AI Commands dynamic with placeholders. The supported placeholders are:

NamePlaceholderDescription
Clipboard Text{clipboard}Inserts your last copied text. The placeholder is removed if no text has been copied recently.
Snippets{snippet name="…"}Inserts the content of the referenced snippet. Only snippets that don't reference other snippets can be inserted.
Cursor Position ¹{cursor}Moves the cursor to this position when pasted or injected. A snippet can contain only one {cursor} placeholder.
Date ¹ ³{date}Inserts the current date, e.g. 1 Jun 2022.
Time ¹ ³{time}Inserts the current time, e.g. 3:05 pm.
Date & Time ¹ ³{datetime}Inserts both date and time, e.g. 1 Jun 2022 at 6:45 pm.
Weekday ¹ ³{day}Inserts the day of the week, e.g. Monday.
UUID ¹ ³{uuid}Inserts a universally unique value, e.g. E621E1F8-C36C-495A-93FC-0C247A3E6E5F.
Selected Text ² ³{selection}Inserts the selected text from the frontmost application. In AI Chat, the previous message is inserted instead.
Argument{argument}Prompts for input in the search bar. Replaced by the argument's value. You can add a maximum of 3 different arguments.
Calculator ¹ ² ³{calculator}Evaluates a math expression.
Focused Browser Tab ² ⁴{browser-tab}Inserts the content of the focused browser tab.

¹ Only available in Snippets
² Only available in AI Commands
³ Only available in Quicklinks
⁴ Only available when the Browser Extension is installed

Using modifiers, you can transform the value of a placeholder with the {clipboard | uppercase} syntax. Modifiers work on all placeholders.

Available modifiers:

  • uppercase → transforms Foo into FOO
  • lowercase → transforms Foo into foo
  • trim → transforms Foo Bar into Foo Bar — removes whitespace from the beginning and end
  • percent-encode → transforms Foo Bar into Foo%20Bar — replaces special characters with percent-encoded equivalents
  • json-stringify → transforms Foo "Bar" into "Foo \"Bar\"" — ensures the value can be safely used as a JSON string

You can chain multiple modifiers: {clipboard | trim | uppercase}.

Depending on where the placeholder is used, Raycast may apply default formatting automatically:

  • Quicklinks → Special characters are percent-encoded to keep the link valid.
  • AI Commands → Placeholders are wrapped with """ to delimit them for the AI.

To opt out of this default formatting, use the raw modifier: {clipboard | raw}.

By default, date and time placeholders use the current date/time when the snippet is inserted. To use a relative date/time, add an offset modifier.

An offset modifier has three parts:

  • A + or - sign for the direction
  • A number
  • A unit letter: m (minutes), h (hours), d (days), M (months), y (years)

m (lowercase) is minutes and M (uppercase) is months. All units are case-sensitive.

Separate the modifier from the keyword with spaces. You can combine multiple offsets in a single placeholder:

  • {date offset="+2y +5M"}
  • {time offset="+3h +30m"}
  • {day offset=-3d}
  • {datetime offset=+1h}

There must be no space after the sign. {date offset="+ 2d"} is not valid — the correct form is {date offset="+2d"}.

When you type a valid placeholder, the curly braces turn blue. If the keyword or modifier is unrecognized, the braces remain unstyled.

The default format of date/time placeholders follows your system preferences. You can create a custom format with {date format="yyyy-MM-dd"}.

PlaceholderOutput
{date format="EEEE, MMM d, yyyy"}Wednesday, Jun 15, 2022
{date format="MM/dd/yyyy"}06/15/2022
{date format="MM-dd-yyyy HH:mm"}06-15-2022 13:44
{date format="MMM d, h:mm a"}Jun 15, 1:44 PM
{date format="MMMM yyyy"}June 2022
{date format="MMM d, yyyy"}Jun 15, 2022
{date format="E, d MMM yyyy HH:mm:ss Z"}Wed, 15 Jun 2022 13:44:39 +0000
{date format="yyyy-MM-dd'T'HH:mm:ssZ"}2022-06-15T13:44:39+0000
{date format="dd.MM.yy"}15.06.22
{date format="HH:mm:ss.SSS"}13:44:39.945

Notes:

  • You can mix date modifiers with custom formats: {date format="yyyy-MM-dd" offset="+3M -5d"}.
  • All characters inside the format string are case-sensitive.
  • Wrap literal text in single quotes to include it verbatim: {date format="h:mm 'on the eve of' MMMM d"} outputs 8:30 on the eve of June 5.

By default, each {argument} placeholder creates a new input field in the search bar (up to 3). To reuse the same value across multiple placeholders, give them the same name: {argument name="tone"}. Placeholders with matching names are replaced by the same value.

By default, an argument is required and the command cannot run until a value is entered. To make it optional, set a default value: {argument default="happy"} or {argument name="sport" default="skiing"}.

To present a predefined set of choices, use the options parameter: {argument name="tone" options="happy, sad, professional"}.

By default, {clipboard} inserts your most recently copied text. To access older clipboard entries, use an offset:

  • {clipboard offset=1} → second most recent
  • {clipboard offset=2} → third most recent

Using a clipboard offset placeholder requires Clipboard History to be enabled.

By default, the tab content is converted to Markdown. You can specify a different format:

  • {browser-tab format="markdown"} — default
  • {browser-tab format="text"} — plain text content of the tab, without any styling
  • {browser-tab format="html"} — full HTML content of the tab

To extract a specific part of the page, use a CSS selector: {browser-tab selector="a.author.text-bold"}. This lets you create highly targeted commands for specific websites.