ワンクリックで
openclaw-new-agent
Create a new OpenClaw agent with all required directive files, directory structure, and config registration
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create a new OpenClaw agent with all required directive files, directory structure, and config registration
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Add a messaging channel binding (Telegram, Slack, WhatsApp, or GChat) to an existing OpenClaw agent
Create a new scheduled cron job for an OpenClaw agent (recurring, interval, or one-shot)
Scaffold a new deterministic shell script for an OpenClaw agent with JSON output, error handling, and the json-response library
Add a new secret to the OpenClaw keychain and update the appropriate launcher/secrets script
Set up nightly dream routine (memory distillation) for an OpenClaw agent including DREAM-ROUTINE.md, cron job, and archive pipeline
Restart OpenClaw gateway(s) — handles stow conflicts and verifies channels reconnect. Supports single-gateway and multi-gateway (per-tier) deployments.
| name | openclaw-new-agent |
| description | Create a new OpenClaw agent with all required directive files, directory structure, and config registration |
Create a new agent with id $0 and display name $1.
Read the full playbook at ~/.openclaw/workspace/skills/01-first-agent-setup.md for detailed guidance.
Before starting, detect the user's openclaw-home repo location and deployment mode:
OPENCLAW_REPO=$(readlink ~/.openclaw/openclaw.json 2>/dev/null | sed 's|/.openclaw/openclaw.json||')
TIER_CONFIGS=(~/.openclaw/configs/openclaw-*.json)
[[ -f "${TIER_CONFIGS[0]}" ]] && MULTI_GATEWAY=true || MULTI_GATEWAY=false
If OPENCLAW_REPO is empty, ask the user where their openclaw-home repo is.
AGENT_ID="$0"
mkdir -p ~/.openclaw/agents/$AGENT_ID/{memory,memory/archives,sessions,scripts,scripts/lib,qmd,drafts,refs}
Ask the user for:
for cfg in ~/.openclaw/configs/openclaw-*.json; do
basename "$cfg" | sed 's/openclaw-//;s/.json//'
done
Generate 6 core .md files in the openclaw-home repo at .openclaw/agents/$0/:
SOUL.md — Identity, personality, responsibilities, boundaries. For focused sub-agents, keep it under 60 lines with clear responsibilities and key info. For orchestrators, include sub-agent routing and heartbeat monitoring.IDENTITY.md — Name, role, model, emojiUSER.md — Who the agent serves, their timezone, communication preferencesAGENTS.md — Session startup checklist (read SOUL.md → USER.md → MEMORY.md), workspace hygiene rules, safety rulesTOOLS.md — Document any CLI tools, browser profile, account flagsSECURITY.md — Use the standard 5-section template: Credential Handling, Browser Authentication, Cross-Agent Isolation, Disclosure Prevention, Incident ResponseRegister in config:
Read $OPENCLAW_REPO/.openclaw/configs/openclaw-<tier>.json, add to agents.list:
{
"id": "<agent-id>",
"name": "<agent-name>",
"workspace": "$HOME/.openclaw/agents/<agent-id>",
"agentDir": "$HOME/.openclaw/agents/<agent-id>",
"model": {"primary": "anthropic/<chosen-model>"}
}
Read $OPENCLAW_REPO/.openclaw/openclaw.json, add to agents.list with the same structure.
Replace $HOME with the user's actual home directory path.
If sub-agent: Add to parent's subagents.allowAgents array in the same config file (the parent must be in the same tier in multi-gateway mode).
If channel requested: Follow the /openclaw-add-channel skill
Stow and restart:
rm -f ~/.openclaw/cron/jobs.json
cd "$OPENCLAW_REPO" && stow --no-folding -t ~ .
launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway.<tier>
launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway
tail -30 ~/.openclaw-<tier>/gateway.logtail -30 ~/.openclaw/logs/gateway.log~/.openclaw/agents/<id>/ — stow handles the symlinks~/.openclaw/agents/ are shared across all tiers — only the config registration determines which gateway manages an agent${VAR} references