Templates let you package an agent configuration for reuse or sharing. This guide walks through the workflow: clone the starter, customize files, deploy from your template to test, and (optionally) submit it to the marketplace.For the full manifest.json field reference, see the manifest reference.
Reference Template
Clone this starter repo to create your own template.
The manifest defines your agent’s identity, required secrets, skills, scripts, routes, channels, tasks, and marketplace metadata. The starter ships with a _docs block documenting every field inline.
Section
What it does
agent
Name, description, vibe, emoji
model
Default AI model
secrets
Encrypted API keys and credentials
skills
Attachable skill packages — objects with clawhub_slug or cid and a name (max 10)
tasks
Cron-scheduled prompts (max 20)
scripts
Lifecycle hooks - build runs after deploy/push, start runs on agent boot
routes
Port forwarding for web apps/APIs (max 10)
channels
Telegram, Discord, Slack configuration
template
Marketplace listing metadata
See the manifest reference for every field’s type, defaults, and limits.
Remove the _docs block before submitting to the marketplace.
Skills are objects with a name and either a clawhub_slug or a cid. Use clawhub_slug for marketplace skills — they’ll automatically resolve to the latest published version when someone deploys your template. Use cid to pin a specific uploaded skill by its IPFS CID for byte-stable behavior.
// ClawHub marketplace skill{ "clawhub_slug": "@pinata/api", "name": "Pinata API"}// Uploaded skill pinned by CID{ "cid": "bafkreiexample...", "name": "My Custom Skill"}
build - Runs once after deploy or git push (e.g. npm install, compile). Executes from /home/node/clawd. Output logged to /tmp/user-build.log. 5 min timeout. If build fails, start does not run.
start - Launches a long-running background process after build completes (e.g. a web server). Executes from /home/node/clawd. Output logged to /tmp/user-start.log. Runs detached so it survives the runner exiting.
Retry scripts - To re-run the build/start lifecycle (e.g. after pushing changes that didn’t trigger a build), use the Retry Scripts action on the Danger tab or call POST /v0/agents/{agentId}/scripts/retry.
Your server must bind to 0.0.0.0, not localhost, or it won’t be reachable
Set protected: false for public routes, or true to require a gateway token
Use __AGENT_HOST__ as a placeholder in config files - replaced at runtime with the agent’s public hostname
For WebSocket/HMR setups (e.g. Vite), connect via WSS on port 443 through __AGENT_HOST__
Templates submitted with a paid tier use x402 micropayments for one-time purchase. Buyers pay before deploy; once paid, the template behaves like any other in their account.Mark a template as paid in the template block of manifest.json - see the manifest reference for the full schema.