/command shortcuts with no code or build step. Each prompt template is a Markdown file whose filename (without .md) becomes its slash command.
Choose a skill instead when the model should decide when to load instructions automatically, or an extension when you need TypeScript code.
Before you begin
Before you add a project template, confirm the following:- Atomic is installed and available on your
PATH. - For project templates under
.atomic/prompts/, your project is trusted (run/trustin Atomic or start with--approve; see Security).
Create your first template
Follow these steps to create and test a reusable/review prompt template:
1
Save the template file
Save the following file as
.atomic/prompts/review.md for one project, or ~/.atomic/agent/prompts/review.md (%USERPROFILE%\.atomic\agent\prompts\review.md on Windows) for every project:2
Reload your session
Run
/reload in an active Atomic session so Atomic picks up the template without restarting.3
Invoke and verify
Type
/review or /review "auth edge cases" in the editor. Confirm that autocomplete shows /review, its [focus area] hint, and its description, and that submitting expands the template into the prompt.Format and frontmatter
Prompt templates support two optional YAML frontmatter fields:- Filename: Determines the slash command name. Saving
review.mdregisters/review. description: Optional summary shown in autocomplete. If omitted or set to a non-string YAML value, Atomic uses the first non-empty line of the template body, truncated to 60 characters with....argument-hint: Optional usage hint shown before the description in autocomplete (non-string YAML values are ignored). Use<angle brackets>for required arguments and[square brackets]for optional arguments.
argument-hint ahead of its description:
Use prompt templates
Type/ followed by the template name and any arguments:
- Multiline arguments: The command name ends at the first space, tab, or line break, so arguments can start on the next line with
Shift+Enter, and line breaks inside arguments stay intact. - Subagent views: While viewing a subagent, invoking a prompt template expands and sends the prompt to that subagent instead of
main(see Commands while viewing a subagent). - Non-interactive and queued inputs: Prompt templates also expand in print (
-p), JSON, and Remote Procedure Call (RPC) modes as well as queuedsteerandfollowUpmessages. From extensions,atomic.sendUserMessage()expands templates only when you pass{ expandPromptTemplates: true }. Skill commands (/skill:...) expand before prompt templates.
Arguments and placeholders
Templates support bash-style positional arguments, defaults, and slicing. Substitution runs in a single pass (not recursively), so argument values containing$1 or $@ stay literal text.
The following table lists every supported placeholder:
Default values inside
${N:-default} or ${@:-default} can’t contain }. Defaults longer than 1,024 characters don’t match and stay literal text.
The following template combines $1 and $@:
/component Button "onClick handler" "disabled support" replaces $1 with Button and $@ with Button onClick handler disabled support.
To pass an empty positional argument without shifting later positions, use "" or ''. For Review $2. Focus: ${1:-correctness}., running /review "" src/index.ts expands to Review src/index.ts. Focus: correctness.
Quote and split arguments
Atomic tokenizes template arguments with the following rules:- Arguments split on space (
) and tab (\t) only, not on newlines (\n). Multiline text without spaces or tabs between lines stays in one argument. - Quotes (
"or') start a quoted argument only at the start of a token, so apostrophes inside words (doesn't) stay literal. Unquoted characters immediately after a closing quote stay in the same argument ("hello"worldbecomeshelloworld). - Atomic treats an unclosed quote as a literal character and tokenizes the remaining text normally.
- Backslash escaping applies only to a matching quote inside a quoted argument (
\"inside"..."or\'inside'...'). All other backslashes (including\\and unquoted backslashes) stay literal.
Locations and loading rules
Atomic loads prompt templates from the following sources:- Global:
~/.atomic/agent/prompts/*.md(%USERPROFILE%\.atomic\agent\prompts\*.mdon Windows). - Project (requires project trust):
.atomic/prompts/*.md. - Packages:
prompts/directories oratomic.promptsentries inpackage.json. - Settings: The
promptsarray in global or projectsettings.json(Resource settings), accepting files, directories, and filter patterns (!glob,+path, and-pathwith~expansion; see Package filtering). - CLI:
--prompt-template <path>(repeatable; accepts a.mdfile or a directory and still loads with--no-prompt-templates/-np; see CLI resource options).
- Auto-discovery in
~/.atomic/agent/prompts/and.atomic/prompts/is non-recursive and skips dotfiles,node_modules, broken symlinks, and files matched by.gitignore,.ignore, or.fdignoreinsideprompts/. Atomic follows direct symlinks to.mdfiles. - Explicit
--prompt-template <dir>paths read all.mdfiles in that directory without applying dotfile or.gitignorefilters. Atomic ignores a non-.mdfile path passed to--prompt-templatesilently. - Built-in slash commands and extension slash commands always take precedence over prompt templates with the same name. Among templates themselves,
-epackages win first, then project overrides global, both override configured and bundled packages, and explicit--prompt-templatepaths apply last (see Resource precedence order).
Legacy
.pi paths (~/.pi/agent/prompts/*.md, .pi/prompts/*.md, and pi.prompts in package.json) continue to load alongside .atomic paths. If an inherited legacy .pi template collides with a bundled template, the bundled template wins.Troubleshooting
The following table lists common prompt template issues and how to fix them:Next steps
Use skills
Provide instructions that the agent loads automatically when a task matches.
Subagents
Delegate a focused, bounded task to a child agent.
Install and manage packages
Bundle prompt templates with skills, themes, and extensions to share with your team.
Build with Atomic
Compare every customization option in Atomic.