sbusso/claudeclaw/setup

Claude Code and agent skill by sbusso/claudeclaw

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Run initial ClaudeClaw setup. Use when user wants to install dependencies, authenticate messaging channels, register their main channel, or start the background services. Triggers on "setup", "install", "configure claudeclaw", or first-time setup requests.

Install

npx vskill@latest install sbusso/claudeclaw/setup

SKILL.md

ClaudeClaw Setup

Run setup steps automatically. Only pause when user action is required (channel authentication, configuration choices). Setup uses bash setup.sh for bootstrap, then npx tsx setup/index.ts --step <name> for all other steps. Steps emit structured status blocks to stdout. Verbose logs go to logs/setup.log.

Principle: When something is broken or missing, fix it. Don't tell the user to go fix it themselves unless it genuinely requires their manual action (e.g. authenticating a channel, pasting a secret token). If a dependency is missing, install it. If a service won't start, diagnose and repair. Ask the user for permission when needed, then do the work.

UX Note: Use AskUserQuestion for all user-facing questions.

Mode Detection

Before any steps, detect the execution mode:

bash
cat .claude-plugin/plugin.json 2>/dev/null | grep '"name": "claudeclaw"' && echo "DEVELOPER_MODE" || echo "PLUGIN_MODE"

If .claude-plugin/plugin.json exists in the current directory AND contains "name": "claudeclaw", we're inside the ClaudeClaw repo → Developer mode. Otherwise, the skill was loaded via --plugin-dir → Plugin mode.

Directory = Instance model

The current working directory IS the ClaudeClaw instance. All state (.env, store/, groups/, logs/) lives in cwd. Multiple instances = multiple directories. No hidden state, no ~/.claude/plugin-data/.

Plugin mode (no .claude-plugin/ in cwd):

  • Skip step 0 (Git & Fork) entirely
  • The current directory is the data directory — all state goes here
  • Plugin code directory: ${CLAUDE_PLUGIN_ROOT}
  • Ensure data directories exist: mkdir -p store groups logs
  • Check for .claudeclaw.json — if it exists, this directory has been set up before; if not, this is a fresh setup

CRITICAL — Plugin mode command prefix: All npx tsx setup/index.ts commands in subsequent steps MUST be run from the plugin code directory with CLAUDE_PLUGIN_ROOT set, but the working directory for the service must be the USER's current directory (the data dir). Use this pattern:

bash
cd ${CLAUDE_PLUGIN_ROOT} && CLAUDECLAW_ENV_FILE=$(pwd)/.env npx tsx setup/index.ts --step <name>

Where $(pwd) resolves to the user's data directory BEFORE the cd. Store the data dir first:

bash
MCLAW_PROJECT=$(pwd) && cd ${CLAUDE_PLUGIN_ROOT} && CLAUDECLAW_PROJECT_DIR=$MCLAW_PROJECT CLAUDECLAW_ENV_FILE=$MCLAW_PROJECT/.env npx tsx setup/index.ts --step <name>

CLAUDECLAW_PROJECT_DIR tells setup scripts the actual project directory (where .env, store/, groups/, logs/ live). Without it, they fall back to process.cwd() which is the plugin code root after the cd.

Developer mode (.claude-plugin/ in cwd):

  • Proceed with all steps unchanged
  • Code and state live in the same directory

0. Git & Fork Setup (Developer mode only)

Plugin mode: Skip this step entirely — there is no git repo to manage.

Check the git remote configuration to ensure the user has a fork and upstream is configured.

Run:

  • git remote -v

Case A — `origin` points to `sbusso/claudeclaw` (user cloned directly):

The user cloned instead of forking. AskUserQuestion: "You cloned ClaudeClaw directly. We recommend forking so you can push your customizations. Would you like to set up a fork?"

  • Fork now (recommended) — walk them through it
  • Continue without fork — they'll only have local changes

If fork: instruct the user to fork sbusso/claudeclaw on GitHub (they need to do this in their browser), then ask them for their GitHub username. Run:

bash
git remote rename origin upstream
git remote add origin https://github.com/<their-username>/claudeclaw.git
git push --force origin main

Verify with git remote -v.

If continue without fork: add upstream so they can still pull updates:

bash
git remote add upstream https://github.com/sbusso/claudeclaw.git

Case B — `origin` points to user's fork, no `upstream` remote:

Add upstream:

bash
git remote add upstream https://github.com/sbusso/claudeclaw.git

Case C — both `origin` (user's fork) and `upstream` (qwibitai) exist:

Already configured. Continue.

Verify: git remote -v should show origin → user's repo, upstream → sbusso/claudeclaw.git.

1. Bootstrap (Node.js + Dependencies)

Plugin mode: Dependencies are pre-installed in the plugin directory. Verify only:

  • node --version (must be 20+)
  • ls dist/service.js (must exist — if not, run npm run build in the plugin dir)
  • If agent runner needs compilation: cd agent/runner && npx tsc
  • Skip bash setup.sh entirely.

Developer mode: Run bash setup.sh and parse the status block.

  • If NODE_OK=false → Node.js is missing or too old. Use AskUserQuestion: Would you like me to install Node.js 22? If confirmed:
  • macOS: brew install node@22 (if brew available) or install nvm then nvm install 22
  • Linux: curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt-get install -y nodejs, or nvm
  • After installing Node, re-run bash setup.sh
  • If DEPS_OK=false → Read logs/setup.log. Try: delete node_modules, re-run bash setup.sh. If native module build fails, install build tools (xcode-select --install on macOS, build-essential on Linux), then retry.
  • If NATIVE_OK=false → better-sqlite3 failed to load. Install build tools and re-run.
  • Record PLATFORM and IS_WSL for later steps.

2. Check Environment

Run npx tsx setup/index.ts --step environment and parse the status block.

  • If HAS_AUTH=true → WhatsApp is already configured, note for step 5
  • If HAS_REGISTERED_GROUPS=true → note existing config, offer to skip or reconfigure
  • Record APPLE_CONTAINER and DOCKER values for step 3

3. Container Runtime

3a. Choose runtime

Check the preflight results for APPLE_CONTAINER and DOCKER, and the PLATFORM from step 1.

Use AskUserQuestion with options:

  • Sandbox (Recommended) — OS-level sandboxing via @anthropic-ai/sandbox-runtime. <10ms cold starts, no container daemon needed, kernel-enforced isolation. macOS/Linux only.
  • Apple Container — Native macOS container (if APPLE_CONTAINER=installed)
  • Docker — Cross-platform container runtime

If Sandbox chosen:

  • Run npm install @anthropic-ai/sandbox-runtime if not already installed
  • Set RUNTIME=sandbox in .env
  • Pre-compile agent runner: cd agent/runner && npx tsc
  • Skip container build (3b, 3c) — go directly to step 4

If Apple Container or Docker chosen, continue with the container setup below:

  • PLATFORM=linux → Docker (only option among container runtimes)
  • PLATFORM=macos + APPLE_CONTAINER=installed → Apple Container or Docker
  • PLATFORM=macos + APPLE_CONTAINER=not_found → Docker
3a-docker. Install Docker
  • DOCKER=running → continue to 4b
  • DOCKER=installed_not_running → start Docker: open -a Docker (macOS) or sudo systemctl start docker (Linux). Wait 15s, re-check with docker info.
  • DOCKER=not_found → Use AskUserQuestion: Docker is required for running agents. Would you like me to install it? If confirmed:
  • macOS: install via brew install --cask docker, then open -a Docker and wait for it to start. If brew not available, direct to Docker Desktop download at https://docker.com/products/docker-desktop
  • Linux: install with curl -fsSL https://get.docker.com | sh && sudo usermod -aG docker $USER. Note: user may need to log out/in for group membership.
3b. Apple Container conversion gate (if needed)

If the chosen runtime is Apple Container, you MUST check whether the source code has already been converted from Docker to Apple Container. Do NOT skip this step. Run:

bash
grep -q "CONTAINER_RUNTIME_BIN = 'container'" src/orchestrator/container-runtime.ts && echo "ALREADY_CONVERTED" || echo "NEEDS_CONVERSION"

If NEEDS_CONVERSION, the source code still uses Docker as the runtime. You MUST run the /convert-to-apple-container skill NOW, before proceeding to the build step.

If ALREADY_CONVERTED, the code already uses Apple Container. Continue to 3c.

If the chosen runtime is Docker, no conversion is needed. Continue to 3c.

3c. Build and test

Run npx tsx setup/index.ts --step container -- --runtime <chosen> and parse the status block.

If BUILD_OK=false: Read logs/setup.log tail for the build error.

  • Cache issue (stale layers): docker builder prune -f (Docker) or container builder stop && container builder rm && container builder start (Apple Container). Retry.
  • Dockerfile syntax or missing files: diagnose from the log and fix, then retry.

If TEST_OK=false but BUILD_OK=true: The image built but won't run. Check logs — common cause is runtime not fully started. Wait a moment and retry the test.

4. Claude Authentication (No Script)

If HAS_ENV=true from step 2, read .env and check for CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY. If present, confirm with user: keep or reconfigure?

AskUserQuestion: Claude subscription (Pro/Max) vs Anthropic API key?

Subscription: Tell user to run claude setup-token in another terminal, copy the token, add CLAUDE_CODE_OAUTH_TOKEN=<token> to .env. Do NOT collect the token in chat.

API key: Tell user to add ANTHROPIC_API_KEY=<key> to .env.

5. Set Up Channels

AskUserQuestion (multiSelect): Which messaging channels do you want to enable?

  • WhatsApp (authenticates via QR code or pairing code)
  • Telegram (authenticates via bot token from @BotFather)
  • Slack (authenticates via Slack app with Socket Mode)
  • Discord (authenticates via Discord bot token)

Delegate to each selected channel's own skill. Each channel skill handles its own code installation, authentication, registration, and JID resolution. This avoids duplicating channel-specific logic and ensures JIDs are always correct.

For each selected channel, invoke its skill:

  • WhatsApp: Invoke /add-whatsapp
  • Telegram: Invoke /add-telegram
  • Slack: Invoke /add-slack
  • Discord: Invoke /add-discord

Each skill will:

  1. Install the channel code (via git merge of the skill branch)
  2. Collect credentials/tokens and write to .env
  3. Authenticate (WhatsApp QR/pairing, or verify token-based connection)
  4. Auto-detect the bot's display name from the platform API and set ASSISTANT_NAME in .env
  5. Register the chat with the correct JID format (trigger uses the detected bot name)
  6. Build and verify

IMPORTANT: The channel skill sets ASSISTANT_NAME in .env based on the platform API (e.g., Slack's auth.test → users.info). This ensures the trigger pattern matches the bot's actual display name. Never hardcode a name or use the default.

After all channel skills complete, install dependencies and rebuild — channel merges may introduce new packages:

bash
npm install && npm run build

If the build fails, read the error output and fix it (usually a missing dependency). Then continue to step 6.

6. Mount Allowlist

AskUserQuestion: Agent access to external directories?

No: npx tsx setup/index.ts --step mounts -- --empty Yes: Collect paths/permissions. npx tsx setup/index.ts --step mounts -- --json '{"allowedRoots":[...],"blockedPatterns":[],"nonMainReadOnly":true}'

7. Start Service

The setup script generates a service whose WorkingDirectory is the current data directory. In plugin mode, the ExecStart points to ${CLAUDE_PLUGIN_ROOT}/dist/service.js. Logs go to <dataDir>/logs/.

Service name: Derived from the directory name: com.claudeclaw.<dirname> (macOS) / claudeclaw-<dirname> (Linux). For example, if cwd is /home/user/my-assistant, the service is com.claudeclaw.my-assistant. Determine the correct service name before running service commands below.

If service already running: unload first.

  • macOS: launchctl unload ~/Library/LaunchAgents/com.claudeclaw.plist
  • Linux: systemctl --user stop claudeclaw (or systemctl stop claudeclaw if root)

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 93 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
173
Repository forks
56
7-day trend score
26

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/sbusso/claudeclaw/setup/badge)](https://verified-skill.com/skills/sbusso/claudeclaw/setup)

Something wrong with this skill or its page? Tell us.