$npx -y skills add szsip239/teamclaw --skill agent-initInitialize and configure OpenClaw agent workspace MD files (AGENTS.md, SOUL.md, IDENTITY.md, USER.md, TOOLS.md, BOOTSTRAP.md, HEARTBEAT.md). Use when: setting up a new agent, customizing agent personality/behavior, configuring agent workspace for TeamClaw, or checking/fixing agen
| 1 | # Agent Init |
| 2 | |
| 3 | Initialize OpenClaw agent workspace with tailored MD files through an interactive interview. |
| 4 | |
| 5 | ## Workflow |
| 6 | |
| 7 | ### Phase 1: Interview (MANDATORY — do not skip) |
| 8 | |
| 9 | Before generating ANY files, gather context through conversation. Ask in batches of 2-3 questions: |
| 10 | |
| 11 | **Batch 1 — Identity & Purpose:** |
| 12 | - What is this agent's primary purpose? (e.g., coding assistant, research, DevOps, personal assistant) |
| 13 | - What name and emoji? Any personality traits? |
| 14 | |
| 15 | **Batch 2 — User Profile:** |
| 16 | - Who will use this agent? (name, timezone, preferences) |
| 17 | - Communication style preference? (formal/casual, verbose/terse, language) |
| 18 | |
| 19 | **Batch 3 — Environment:** |
| 20 | - Is this a container instance or external instance? |
| 21 | - What tools/languages does the agent need? (Python, Node, etc.) |
| 22 | - Any specific workflows or periodic tasks? |
| 23 | |
| 24 | **Batch 4 — Boundaries:** |
| 25 | - Any topics or actions the agent should avoid? |
| 26 | - Privacy requirements beyond defaults? |
| 27 | |
| 28 | Only proceed to Phase 2 after user confirms the interview is complete. |
| 29 | |
| 30 | ### Phase 2: Environment Check |
| 31 | |
| 32 | Run `scripts/check-env.sh` to detect Python/uv status: |
| 33 | |
| 34 | ```bash |
| 35 | bash <skill-path>/scripts/check-env.sh |
| 36 | ``` |
| 37 | |
| 38 | If uv is missing and user wants Python support: |
| 39 | ```bash |
| 40 | bash <skill-path>/scripts/check-env.sh --install |
| 41 | ``` |
| 42 | |
| 43 | For container instances, run inside the container: |
| 44 | ```bash |
| 45 | docker exec <containerId> bash -c "which uv && uv --version || echo 'uv: NOT FOUND'" |
| 46 | ``` |
| 47 | |
| 48 | ### Phase 3: Generate Files |
| 49 | |
| 50 | Generate files in this order, showing each to user for confirmation before writing: |
| 51 | |
| 52 | 1. **IDENTITY.md** — Fill in fields from interview |
| 53 | 2. **USER.md** — Fill in user profile |
| 54 | 3. **SOUL.md** — Rewrite content, keep 4-section structure (Core Truths / Boundaries / Vibe / Continuity) |
| 55 | 4. **TOOLS.md** — Add environment info, Python/uv config, documentation access notes |
| 56 | 5. **AGENTS.md** — Extend default template with domain-specific sections (see strategy below) |
| 57 | 6. **HEARTBEAT.md** — Add periodic tasks if any |
| 58 | 7. **BOOTSTRAP.md** — Skip unless user wants first-run ritual |
| 59 | |
| 60 | #### AGENTS.md Strategy: Extend, Don't Replace |
| 61 | |
| 62 | Read the current AGENTS.md first. The default template contains critical infrastructure: |
| 63 | - Session startup sequence (file loading order) |
| 64 | - Memory system (daily + MEMORY.md) |
| 65 | - Safety rules |
| 66 | - Heartbeat logic |
| 67 | |
| 68 | **Add** new sections; **never remove** existing ones. Safe insertion points: |
| 69 | - After "Every Session" → domain-specific startup tasks |
| 70 | - After "Safety" → TeamClaw security rules + file exchange rules |
| 71 | - After "Tools" → Python/uv preferences, documentation access |
| 72 | - Before "Make It Yours" → project-specific workflows |
| 73 | |
| 74 | #### Mandatory AGENTS.md Additions |
| 75 | |
| 76 | Always add these to AGENTS.md regardless of agent type: |
| 77 | |
| 78 | ```markdown |
| 79 | ## File Exchange (TeamClaw) |
| 80 | - User uploads appear in `current-session/input/` |
| 81 | - Save output files to `current-session/output/` |
| 82 | - Check input folder at session start for uploaded files |
| 83 | - ALWAYS use `current-session/` symlink — NEVER navigate sessions/ by folder name |
| 84 | (folders use TeamClaw DB IDs which differ from your OpenClaw session UUID) |
| 85 | |
| 86 | ## Security (TeamClaw) |
| 87 | - NEVER delete files you didn't create — use `trash` over `rm` |
| 88 | - NEVER display API keys, tokens, passwords, or credentials |
| 89 | - NEVER read other users' session directories |
| 90 | - NEVER use `web_fetch` tool (DNS issues with proxy) — use browser tools instead |
| 91 | - For OpenClaw docs: `qmd query "<topic>"` or `qmd get "openclaw-docs/<path>"` |
| 92 | ``` |
| 93 | |
| 94 | #### Mandatory TOOLS.md Additions |
| 95 | |
| 96 | ```markdown |
| 97 | ## Python |
| 98 | - Package manager: `uv` (NEVER use pip directly) |
| 99 | - Create venv: `uv venv .venv` |
| 100 | - Install: `uv pip install <package>` |
| 101 | - Run: `uv run python script.py` |
| 102 | - If uv missing: `curl -LsSf https://astral.sh/uv/install.sh | sh` |
| 103 | |
| 104 | ## Documentation |
| 105 | - OpenClaw docs: `qmd query "<topic>"` or `qmd get "openclaw-docs/<path>"` |
| 106 | - Web browsing: use browser tools only (no web_fetch) |
| 107 | ``` |
| 108 | |
| 109 | ### Phase 4: Write Files |
| 110 | |
| 111 | Determine write method based on instance type: |
| 112 | |
| 113 | **External instance** (workspacePath set): |
| 114 | ```bash |
| 115 | # Workspace files live at {workspacePath}/workspace/ (or workspace-{profile}/) |
| 116 | cat > {workspacePath}/workspace/SOUL.md << 'ENDOFFILE' |
| 117 | [content] |
| 118 | ENDOFFILE |
| 119 | ``` |
| 120 | |
| 121 | **Container instance** (containerId set): |
| 122 | ```bash |
| 123 | docker exec -i <containerId> sh -c 'cat > /home/node/.openclaw/workspace/SOUL.md' << 'ENDOFFILE' |
| 124 | [content] |
| 125 | ENDOFFILE |
| 126 | ``` |
| 127 | |
| 128 | **For non-main agents** (agentId ≠ "main"): |
| 129 | - Check if agent has a dedicated workspace via `config.get` |
| 130 | - Agent workspace might be at `workspace-{agentId}/` or configured separately |
| 131 | |
| 132 | ### Phase 5: Verify |
| 133 | |
| 134 | After writin |