Skip to main content
OpenClaw is a personal AI assistant platform that orchestrates multiple specialized agents across communication channels — Discord, Slack, Telegram, and others — from a single gateway. CC Commander ships a native integration that treats OpenClaw as a first-class runtime: skills sync automatically, hooks forward events in both directions, and sessions can hand off between Claude Code and any OpenClaw agent.
The OpenClaw integration requires OpenClaw to be installed and running separately. CC Commander does not bundle or install OpenClaw. Refer to the OpenClaw project for installation instructions.

How the integration works

Two components make up the CC Commander–OpenClaw integration:

OpenClaw Native skill

The openclaw-native skill handles auto-detection, skill sync, agent profile generation, and memory synchronization between CC Commander and the OpenClaw gateway.

OpenClaw Bridge skill

The openclaw-bridge skill provides the /openclaw and /claw commands, hook translation, workspace generation, session handoff protocol, and config sync between the two platforms.

Auto-detection

The openclaw-sync.js SessionStart hook runs automatically every time you start a Claude Code session. It checks for OpenClaw in this order:
  1. Look for the CC_OPENCLAW_ENABLED=1 environment variable
  2. Probe the gateway at http://localhost:18789/health
  3. If the gateway is healthy: sync skills, register hooks, and report the session
  4. If the gateway is not found: exit silently — no errors, no delays
You never need to manually trigger the sync. If OpenClaw is not running, CC Commander starts normally with no visible impact.

Skill sync

On session start, all CC Commander skills are registered with OpenClaw’s skill registry:
Syncing: 450+ skills → OpenClaw registry
  ├── Core workflow skills
  ├── 11 CCC domains (ccc-seo, ccc-design, ccc-testing, ...)
  ├── Integration skills (openclaw-native, status-updates, ...)
  └── Mode switcher (9 workflow modes)
Once synced, any OpenClaw agent can invoke CC Commander skills by name. For example, Alfred (personal assistant) can call /code-review from Discord, or Neo (orchestrator) can run /tdd across worker agents.

Bidirectional event forwarding

CC Commander hooks and OpenClaw webhooks exchange events in both directions through the openclaw-adapter.js hook: CC Commander → OpenClaw
CC Commander hookOpenClaw eventData forwarded
PostToolUsecc_kit_tool_useTool name, duration, result
Stopcc_kit_session_endSession summary, cost, files changed
cost-alertcc_kit_cost_alertCurrent cost, ceiling, percentage used
context-guardcc_kit_context_warnContext percentage, tokens remaining
OpenClaw → CC Commander
OpenClaw eventCC Commander actionDescription
agent_task_assignedLoad contextPre-load relevant files
agent_mode_changeSwitch modeApply the requested workflow mode
channel_messageStatus updateForward to the status-updates skill

Setting up the integration

1

Enable the bridge

Add the following to your shell profile (~/.zshrc or ~/.bashrc):
export CC_OPENCLAW_ENABLED=1
To use a non-default gateway URL:
export CC_OPENCLAW_URL=http://localhost:18789
2

Verify the adapter hook is registered

The openclaw-adapter.js hook ships with CC Commander. Confirm it appears in your hooks config:
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "",
        "hooks": ["hooks/openclaw-adapter.js"]
      }
    ]
  }
}
3

Register the webhook in OpenClaw

Add the following entry to ~/.openclaw/openclaw.json (back up the file first):
{
  "webhooks": {
    "bible": {
      "enabled": true,
      "source": "cc-commander",
      "allowedEvents": ["bible_hook"],
      "targetAgent": "alfred"
    }
  }
}
4

Validate the connection

Check that the gateway is responding and run OpenClaw’s built-in diagnostics:
curl -s http://localhost:18789/health
openclaw doctor

Available commands

Once the integration is active, two slash commands are available in any Claude Code session:
/openclaw status      # Gateway and agent overview
/openclaw sync        # Force skill and hook sync
/openclaw configure   # Set up or update integration config
/openclaw health      # Detailed health check
/openclaw agents      # List and manage agents

Configuration reference

SettingEnvironment variableDefaultDescription
Enable integrationCC_OPENCLAW_ENABLED0Set to 1 to enable
Gateway URLCC_OPENCLAW_URLhttp://localhost:18789Gateway endpoint
Request timeoutCC_OPENCLAW_TIMEOUT5000Timeout in milliseconds
Auto-sync on startCC_OPENCLAW_AUTOSYNC1Sync skills when a session starts
Debug loggingCC_OPENCLAW_DEBUG0Verbose output to stderr

Memory sync

CC Commander session memory (~/.claude/sessions/) and OpenClaw agent memory (~/.openclaw/memory/) can be kept in sync:
  • When you run /save-session in CC Commander, decisions and lessons are extracted and appended to the relevant OpenClaw workspace memory file
  • When you run /resume-session, CC Commander scans recent OpenClaw memory for [HANDOFF] and [DECISION] tags relevant to the current project
  • Sync is always additive — neither system removes entries written by the other

Session handoff

You can transfer an active Claude Code session to an OpenClaw agent, or receive a handoff from one. From CC Commander to OpenClaw:
  1. Run /save-session to capture the current state
  2. The handoff payload (task description, relevant files, progress, next steps) is sent to the target agent via sessions_send
  3. The target agent picks up the payload and continues from where you left off
From OpenClaw to CC Commander:
  1. The OpenClaw agent posts a handoff summary to #comms-log and writes a session file to ~/clawd/workspaces/{workspace}/memory/
  2. You run /resume-session in Claude Code to load the handoff context and continue

Architecture overview

CC Commander                    OpenClaw Gateway
┌──────────────────┐              ┌──────────────────┐
│  Skills (450+)   │──── sync ───→│  Skill Registry  │
│  Hooks (25)      │←── events ──→│  Webhook System  │
│  Modes (9)       │──── sync ───→│  Agent Profiles  │
│  Sessions        │←── sync ───→│  Memory DBs      │
└──────────────────┘              └──────────────────┘
         ↕                                 ↕
    Claude Code CLI              38+ AI Agents (12 workspaces)