# Agent Templates A **template** is a reusable folder you stamp into a working agent group: it carries the agent's standing instructions, its MCP tool servers, its skills, and optional recurring tasks, but **no secrets and no provider**. Point `ncl` at one and you get a configured agent in seconds; you choose the runtime/provider separately. Templates are purely additive and require no DB migration. **Templates are resolved only from a local directory**: `templates/` at the project root by default (committed but shipped empty), or whatever `NANOCLAW_TEMPLATES_DIR` points at (a local path only). The public registry ([`nanocoai/nanoclaw-templates`](https://github.com/nanocoai/nanoclaw-templates)) is a manual copy source — clone or download it yourself and copy the chosen template into your local `templates/` before stamping. ## Using a template **Via the CLI:** ```bash ncl groups create --template sales/sdr --name "SDR Agent" ``` This stamps the group but does **not** wire it to a channel. Run `/manage-channels` (or `ncl wirings create`) afterward, exactly as for a hand-built group. ### The template ref `--template ` is a path **relative to the local templates directory** (`templates/` by default, or `NANOCLAW_TEMPLATES_DIR`). Refs are multi-segment, e.g. `sales/sdr` → `templates/sales/sdr`. For safety the ref must stay inside the templates directory: absolute paths, a leading `~`, and `../` escapes are rejected. There is no `--source`, no git URL, and no remote fetch at `ncl` time. Populate `templates/` first (by hand, e.g. copying from the public registry), then stamp. `NANOCLAW_TEMPLATES_DIR` may point the library at another **local** directory; it is never a URL and never changes at runtime. ## What's in a template The full authoring reference lives in the [templates repo README](https://github.com/nanocoai/nanoclaw-templates#anatomy-of-a-template). The short version: only `context/instructions.md` is required; everything else is optional and defaults sensibly: ```