Skill: zcxggmu/create-agents-wizard (version 1.0.1)

--- name: create-agents-wizard description: Guided creation of multiple OpenClaw agents and their workspace templates. Use when users ask to create agents in batch, configure new agents, or customize AGENTS/SOUL/IDENTITY/BOOTSTRAP/USER/STYLE files. The workflow confirms scope, collects preferences agent-by-agent, drafts and confirms files, writes to disk, and summarizes results. --- # Create Agents Wizard Follow this workflow to create multiple agents with low user effort. ## 1) Confirm scope 1. Ask for total agent count `N`. 2. Ask each agent `id` (lowercase letters/digits/hyphens only). 3. Ask each workspace path (default `~/.openclaw/workspace-<id>`). 4. Ask scaffold mode: - **Standard (default):** 6 files - `AGENTS.md`, `SOUL.md`, `IDENTITY.md`, `BOOTSTRAP.md`, `USER.md`, `STYLE.md` - **Fast mode:** 2 files only - `AGENTS.md`, `SOUL.md` 5. If user does not specify, use **Standard** by default. ## 2) Process one agent at a time For each agent, collect info and draft files in fixed order. 1. Ask focused questions (use `references/question-bank.md` if available). 2. Produce an improved draft from user input. 3. Ask explicit confirmation: `Confirm write / Revise`. 4. Write only after confirmation; otherwise keep iterating. Rules: - Do not dump a long questionnaire; ask in small rounds (2–4 key questions each). - Preserve user intent; do not change direction without consent. - Respect selected mode (Standard 6 files or Fast 2 files). - If user requests partial scaffolding, allow writing only the confirmed subset and continue/stop as requested. ## 3) Write files and create agent After required files for one agent are confirmed: 1. If agent does not exist, create it: - `openclaw agents add <id> --workspace <path>` 2. Write approved files into workspace root. - Optional batch helper: - `scripts/scaffold.sh --agent <id> --workspace <path> --from <approved_dir> --force` 3. Optional identity setup: - `openclaw agents set-identity --workspace <path> --from-identity` If user wants docs only, skip CLI config changes. ## 4) Final summary When all agents are done, report: - Created agents (id + workspace) - Written file list per agent - `openclaw agents list` output (if CLI available) - Next-step suggestions (skills, routing, default models) ## 5) Quality bar - `AGENTS.md`: operation rules, safety boundaries, heartbeat/external-action policy - `SOUL.md`: values, working principles, boundaries, style - `IDENTITY.md`: name, type, vibe, emoji, avatar convention - `BOOTSTRAP.md`: first-conversation script and initialization steps - `USER.md`: addressing, timezone, preferences, taboos, work/life context - `STYLE.md`: tone, length preference, banned words, output format preference ## 6) Failure handling - Conflicting user inputs: point out conflicts and offer 2 concrete revision options. - Too-short answers: provide a minimal viable template, then request missing details. - Scope change mid-way: reconfirm scope, then continue serial processing. - Write failure: report exact path + error and provide retry command.

path: references/question-bank.md
content: # Question Bank (by file)

Ask key questions first, then draft.

## AGENTS.md (ops rules / safety)

1. Main mission in one sentence?
2. What can be autonomous vs must ask first?
3. External-action policy (message/email/post/PR)?
4. Hard prohibitions (e.g., no prod config edits, no destructive ops)?

## SOUL.md (principles / boundaries)

1. Working doctrine (direct, pragmatic, conservative, etc.)?
2. Priority under conflict (speed / accuracy / safety)?
3. Non-negotiable values?
4. What it must not become?

## IDENTITY.md (name / type)

1. Name?
2. Type (assistant/engineer/daemon/other)?
3. Vibe/tone?
4. Emoji and avatar preference?

## BOOTSTRAP.md (first-run flow)

1. Opening questions?
2. Mandatory init tasks?
3. Need external channel setup prompts?
4. Preferred closing line after init?

## USER.md (user profile)

1. Addressing, timezone, do-not-disturb window?
2. Work focus and long-term goals?
3. Communication preference (short/detailed, language, tone)?
4. Absolute taboos (phrasing/behavior/privacy)?

## STYLE.md (writing style)

1. Default response length?
2. Preferred format (bullets/steps/code/table)?
3. Tool preference order?
4. Banned wording / fixed catchphrases?

---

## Confirmation phrasing

- After drafting:
  - “Here is the optimized draft (same intent, more executable). Confirm write or revise?”
- If user is not satisfied:
  - “Change direction or tone? I can give 2 options.”

## Output constraints

- No fluff; executable rules only.
- Match user language preference.
- Keep prompts short; avoid long one-shot questionnaires.


path: scripts/scaffold.sh
content: #!/usr/bin/env bash
set -euo pipefail

usage() {
  cat <<'EOF'
Usage:
  scaffold.sh --agent <id> --workspace <path> [--from <dir>] [--force]

What it does:
  1) Ensure workspace directory exists
  2) Ensure 6 core files exist:
     AGENTS.md SOUL.md IDENTITY.md BOOTSTRAP.md USER.md STYLE.md
  3) Optionally copy approved drafts from --from directory

Options:
  --agent <id>        Agent id (for display/log only)
  --workspace <path>  Target workspace path
  --from <dir>        Source dir containing any of the 6 files to copy
  --force             Overwrite existing files when copying from --from
  -h, --help          Show this help
EOF
}

AGENT_ID=""
WORKSPACE=""
FROM_DIR=""
FORCE=0

while [[ $# -gt 0 ]]; do
  case "$1" in
    --agent)
      AGENT_ID="${2:-}"
      shift 2
      ;;
    --workspace)
      WORKSPACE="${2:-}"
      shift 2
      ;;
    --from)
      FROM_DIR="${2:-}"
      shift 2
      ;;
    --force)
      FORCE=1
      shift
      ;;
    -h|--help)
      usage
      exit 0
      ;;
    *)
      echo "Unknown argument: $1" >&2
      usage >&2
      exit 2
      ;;
  esac
done

if [[ -z "$AGENT_ID" || -z "$WORKSPACE" ]]; then
  echo "Error: --agent and --workspace are required." >&2
  usage >&2
  exit 2
fi

if [[ -n "$FROM_DIR" && ! -d "$FROM_DIR" ]]; then
  echo "Error: --from directory not found: $FROM_DIR" >&2
  exit 2
fi

mkdir -p "$WORKSPACE"

files=(AGENTS.md SOUL.md IDENTITY.md BOOTSTRAP.md USER.md STYLE.md)

for f in "${files[@]}"; do
  target="$WORKSPACE/$f"

  if [[ -n "$FROM_DIR" && -f "$FROM_DIR/$f" ]]; then
    if [[ -f "$target" && "$FORCE" -ne 1 ]]; then
      echo "skip  $target (exists; use --force to overwrite)"
    else
      cp "$FROM_DIR/$f" "$target"
      echo "write $target (copied from $FROM_DIR/$f)"
    fi
  else
    if [[ ! -f "$target" ]]; then
      cat > "$target" <<EOF
# $f

<!-- TODO: fill content for agent: $AGENT_ID -->
EOF
      echo "write $target (placeholder created)"
    else
      echo "keep  $target"
    fi
  fi
done

echo
echo "Done. Agent: $AGENT_ID"
echo "Workspace: $WORKSPACE"


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)