Guides
Task templates
Kinds of task you start often, with the agent, branch and prompt filled in.
Task templates live on your laptop, one JSON file per template in
~/.berth/templates/; the file name is its id. The app's New worktree
dialog offers them under Template, and fills in the rest from it.
{
"name": "Fix a bug",
"description": "A fresh branch and Claude Code, asked for a failing test first.",
"box": "devl",
"location": "cal",
"agent": "claude",
"branch": "fix/{{name}}",
"base": "main",
"prompt": "Fix this bug: {{issue}}\n\nReproduce it with a failing test first.",
"variables": [{ "id": "issue", "label": "What's broken", "multiline": true }]
}boxandlocationare defaults the dialog starts from.{{name}}is the task's name, which is also the worktree's.- Every other
{{var}}inbranchorpromptbecomes an input;variablesgives them labels (label), adefault, and makes long onesmultiline. agentis a preset id, orcommandruns something else.- A branch that already exists, locally or on
origin, is checked out as it is, so a template can review or continue existing work.
The repository's
examples/templates
has two to start from: Fix a bug and Review a branch.
Templates or project config?
| Task templates | .berth/config.json | |
|---|---|---|
| Whose | Yours, on your laptop | The repository's, committed |
| Shapes | One kind of task: agent, branch, first prompt | Every worktree: setup, ports, env, services, hooks, flows |
| Applies | When you pick it | Always |
For saved prompts you send to agents that are already running, use the built-in Prompts library instead.