Prompt templates
A prompt template is a Markdown file that becomes a command. You type /name some words, and Tatu sends the file’s text as your message, with your words put in where you asked.
Save this as ~/.tatu/prompts/design.md:
---description: Design a change before codingargument-hint: "<slug> [focus]"---Design the change "$1" and write the design to docs/${1:-design}.md.Implement nothing. Focus on: ${@:2}Start Tatu and type:
/design login-page the error messagesThe model receives the file’s text with $1 replaced by login-page and ${@:2} by the error messages.
Where the files go
Section titled “Where the files go”| Folder | Applies to |
|---|---|
~/.tatu/prompts/ |
every project (prompts/ inside TATU_HOME, if you set it) |
.tatu/prompts/ in a project |
that project only |
The file prompts/<name>.md is the command /<name>. Files in subfolders are not read, and neither are names that start with a dot or contain a space. Tatu reads the folders when it starts, so restart it after you add or edit a template.
If a project and your global folder both have design.md, the project’s wins, and a note at startup says so. A name that is already a built-in command (such as /model) is never replaced; the template is ignored, with a note.
The front matter
Section titled “The front matter”The front matter is optional. It sits between two lines of --- at the top of the file.
| Field | What it does |
|---|---|
description |
the text shown beside the command in the suggestions. Without it, Tatu uses the first line of the file, cut at 60 characters. |
argument-hint |
a hint for the arguments, shown before the description (<slug> [focus]). |
Write each field on one line, as key: value. A value can be in quotes. A comment after a value is not a comment: it becomes part of the value. Other fields are ignored.
Arguments
Section titled “Arguments”Tatu splits what you type after the command the way a shell does: spaces separate words, and '...' or "..." keep words together. There are no escapes.
| Write | You get |
|---|---|
$1, $2, … |
the first argument, the second, and so on. Empty when there is none. |
$@ or $ARGUMENTS |
all the arguments, joined by spaces |
${1:-fallback} |
the first argument, or fallback when it is empty. Works with $@ and $ARGUMENTS too. |
${@:2} |
all arguments from the second on |
${@:2:3} |
three arguments, starting at the second |
Text that Tatu puts in is never searched for placeholders again, so an argument that contains $1 stays as you typed it. In the other direction, you cannot write a literal $1 in a template: a $ followed by a number, @ or ARGUMENTS is always a placeholder.
If the template has no placeholder at all, your arguments are added at the end, after a blank line, so they are not lost.
How it shows
Section titled “How it shows”In the conversation the message appears as the line you typed, followed by the kind in dim text:
› /design login-page the error messages (prompt)The model got the full text. Press Ctrl+O to see it under that line. In the suggestions that appear when you type /, your templates are listed with (prompt) at the end of the description.
Templates also work in print mode: tatu -p "/design login-page" expands the template and sends it.
Limits
Section titled “Limits”A template body is cut at 32 KiB, with a note at startup. A file that is not text is ignored. A file whose front matter is not closed with a second --- is ignored, with a note.
See also
Section titled “See also”- Skills: a command that the model can also load by itself.
- Commands: the built-in commands.
- Files and folders: where
prompts/lives.