Files
nanoclaw/templates
Amit Shafnir 411f5e71df feat(templates): local template loader, ncl --template, provider-agnostic persona and skills seams
Agent templates: folder-only templates under templates/ (context/instructions.md +
optional context extras, .mcp.json, skills/). Stamping via ncl groups create
--template writes the provider-neutral instructions.prepend.md (inlined at the top
of CLAUDE.md/AGENTS.md every spawn), copies context extras preserving their
template-relative layout, writes MCP servers to container config, and installs the
per-group skills overlay. Includes docs (docs/templates.md, templates/README.md).

Setup-wizard wiring ships separately on top of this.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 12:36:33 +03:00
..

Templates

Local agent-template library for this NanoClaw install. This folder ships empty. Anything you drop here is a template you can stamp into an agent:

ncl groups create --template <relative-ref> --name "My Agent"

<relative-ref> is a path relative to this folder (e.g. sales/sdr). Refs must stay inside this directory — absolute paths, ~, and ../ escapes are rejected. Override the location with NANOCLAW_TEMPLATES_DIR=/another/local/path (a local path only — never a URL).

The setup wizard's Template setup → NanoClaw template library option clones the public registry and copies your chosen template into this folder, after which it stamps from the local copy. Local templates lists whatever is here.

Anatomy of a template

Only context/instructions.md is required; it both supplies the agent's standing brief and marks the folder as a template.

<template>/
├── context/
│   ├── instructions.md        # REQUIRED: the agent's standing persona, prepended to its
│   │                          #           CLAUDE.md/AGENTS.md every spawn
│   └── additional_context/    # optional: extra .md files
│       └── *.md
├── .mcp.json             # optional: { "mcpServers": { ... } } — command + args, NO secrets
├── skills/<name>/        # optional: one folder per skill (SKILL.md + references/), copied whole
└── README.md             # recommended: per-template docs

Notes:

  • Extra context is copied preserving its layout relative to instructions.md (context/additional_context/faq.mdadditional_context/faq.md in the agent's workspace). Nothing is referenced automatically — instructions.md must point to each file (e.g. "Pricing rules live in additional_context/pricing.md").
  • No provider, no model, no packages. A template is instructions + MCP servers + skills. The agent's runtime/provider is chosen separately (ncl groups config update --provider … or during setup).
  • No secrets. .mcp.json carries launch config only; credentials are injected by the credentials proxy at request time. If an MCP server refuses to boot without an env var, use a placeholder value — never a real key.
  • Skills are copied into the agent's own per-group overlay, never shared.