An OpenClaw plugin that integrates Claude Code into your messaging workflow. Control Claude Code from Slack (or any OpenClaw-supported channel) to analyze, plan, and execute coding tasks on your local machine.
claude_plan— Read-only analysis mode. Analyze codebases, review architecture, plan implementations. No files are modified.claude_exec— Execution mode. Implement features, fix bugs, refactor code. Operates with full permissions within whitelisted directories.claude_teams— Multi-agent mode. Multiple Claude Code agents collaborate in parallel with built-in file locking and coordination.
All security constraints are enforced in code — the LLM cannot bypass them.
| Layer | What it controls | Default |
|---|---|---|
allowedPaths |
Directories where Claude Code can operate | [] (deny all — must configure explicitly) |
maxTimeoutSecs |
Hard cap on task duration | 600 (10 min) |
maxConcurrent |
Max simultaneous Claude Code processes | 2 |
| Path validation | Resolves ~ and blocks ../../ traversal |
Always on |
| Tool | Claude Code mode | Behavior |
|---|---|---|
claude_plan |
plan |
Read-only. Cannot create, edit, or delete files. |
claude_exec |
bypassPermissions |
Full write access within allowedPaths directories only. |
claude_teams |
bypassPermissions |
Same as exec, with multi-agent coordination. |
- OpenClaw installed and running
- Claude Code installed locally (
claude --version) - Node.js 22+
git clone https://github.com/Phoenizard/openclaw-claude-code.git
cd openclaw-claude-code
npm install
openclaw plugins install -l .
openclaw gateway restartVerify:
openclaw plugins list
# Should show: claude-code: loadedEdit ~/.openclaw/openclaw.json:
Claude Code needs authentication to call the Anthropic API. Since the Gateway runs as a system service (launchd/systemd), it doesn't inherit your shell environment. Set claudeOauthToken in the plugin config, or set CLAUDE_BIN to point to a pre-authenticated Claude Code binary.
The plugin searches for the claude binary in this order:
$CLAUDE_BINenvironment variable~/bin/claude(recommended — create a copy here to avoid spaces in path)~/Library/Application Support/Claude/claude-code/<latest>/claudeclaudeon PATH
macOS note: The Claude Desktop install path contains a space (
Application Support). Node.jsspawn()may fail with ENOENT. Copy the binary to~/bin/claudeto avoid this issue.
Send messages to your OpenClaw bot in Slack:
Use claude_plan to analyze ~/projects/my-app architecture
Use claude_exec to add error handling to ~/projects/my-app/src/api.ts
Use claude_teams in ~/projects/my-app: Frontend team builds the login page. Backend team implements the auth API.
- Plan: Ask
claude_planto create an implementation plan - Review: Read the plan in Slack, request changes if needed
- Execute: Ask
claude_execto implement the approved plan
| Tool | Mode | Default Timeout | Use Case |
|---|---|---|---|
claude_plan |
plan (read-only) |
300s | Architecture analysis, code review, planning |
claude_exec |
bypassPermissions |
300s | Feature implementation, bug fixes, refactoring |
claude_teams |
bypassPermissions |
600s | Parallel development (frontend + backend + tests) |
All tools accept:
task(required) — Task descriptionworkdir(optional) — Working directory (must be inallowedPaths)timeout(optional) — Timeout in seconds (clamped tomaxTimeoutSecs)
MIT
{ "plugins": { "entries": { "claude-code": { "enabled": true, "config": { "allowedPaths": ["~/projects/my-app", "~/projects/another-app"], "maxTimeoutSecs": 600, "maxConcurrent": 2, "claudeOauthToken": "your-token-here" } } } }, "agents": { "list": [ { "id": "main", "default": true, "tools": { "allow": ["claude_plan", "claude_exec", "claude_teams"] } } ] } }