openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
50 lines (40 loc) • 3.21 kB
Markdown
# Private Template draft format
Write only the request-specific JSON draft at `.openclaw/template-drafts/<draftId>.json`, using the `draftId` returned by `templates draft` or attached to this skill invocation's working context. Never infer a target from creation time or a shared pointer. Keep these fields:
```json
{
"name": "portable-agent-slug",
"description": "What another person can do with this agent.",
"version": "0.1.0",
"scope": {
"input": "What a new user provides.",
"job": "What the agent does.",
"output": "What the user receives.",
"authority": "What the agent may do without further approval."
},
"manifest": "---\nschemaVersion: 1\nagent:\n id: portable-agent-slug\n name: Portable Agent\n description: What another person can do with this agent.\n---\nPortable instructions for a new owner.\n",
"files": []
}
```
The manifest is the complete `CLAW.md` text. `categories` is an optional top-level frontmatter key beside `agent`: a list of one to three unique lowercase slugs such as `engineering`, `operations`, `research`, `productivity`, or `personal`. The UI's review service appends the four scope fields and builds the archive using OpenClaw's existing Template project builder. The `name` is a lowercase unscoped package slug; `version` is exact semver. Review is read-only. For requested changes, revise this request's private proposal and call `screen(action="template_review", draftId="<this request's draftId>")` again to show a fresh review before publication.
For each portable workspace file, add its newly authored contents to `files`, for example `{ "path": "workspace/AGENTS.md", "content": "..." }`, and map it in manifest frontmatter:
```yaml
workspace:
bootstrapFiles:
AGENTS.md:
source: workspace/AGENTS.md
files:
- source: workspace/reference/checklist.md
path: reference/checklist.md
```
Use `workspace.bootstrapFiles` for supported startup files and `workspace.files` for other managed files. A nonempty `CLAW.md` body already supplies `SOUL.md`; do not also map `SOUL.md` separately. Include optional dependencies only when relevant:
```yaml
skills:
- path: skills/portable-checklist
- ref: "@publisher/skill-name"
version: 1.2.3
plugins:
- ref: "@publisher/plugin-name"
version: 2.0.0
```
Each entry is either `{ path }` for a newly authored bundled folder, or `{ ref, version }` for an exact ClawHub release. For the bundled skill example, include `skills/portable-checklist/SKILL.md` and its supporting text files in `files`; the builder selects them automatically. A skill folder needs a valid root `SKILL.md` with a description. Never invent a registry reference or version for local content. Referenced releases do not copy code into the archive. Keep tokens, credentials, personal accounts, and runtime-specific model choices out of the draft. The review service rejects unsafe paths and credential-like contents before publication.
Put supported native settings such as tools, sandbox, memory, heartbeat, groupChat, and humanDelay directly under `agent`. `CLAW.md` owns all configuration; keep `schemaVersion: 1` and use the top-level `skills` and `plugins` lists for dependencies.