✨

Claude Code Collaboration

Claude Code Collaboration · v1.0.0
这个包缺安装入口,装上也不会生效 缺 SKILL.md 或 frontmatter 不完整(HAS_SCRIPTS,NO_FRONTMATTER)。我们仍保留下载,方便你自行查看内容。
安全 unknown 级 作者 gesilajerry 公开目录收录
568 下载 0 安装 2.7k 收藏 2 浏览

简介

Claude Code Collaboration

原始描述

Integrates OpenClaw with Claude Code CLI to delegate coding tasks via JSON queues for advanced multi-turn code collaboration and analysis.

通过你的 Agent 添加

安装目录:claude-code-collaboration/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/claude-code-collaboration/
Codex CLI~/.codex/skills/claude-code-collaboration/
DeepSeek Harness~/.agents/skills/claude-code-collaboration/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文

Claude Code Collaboration

Enable OpenClaw to delegate tasks to Claude Code CLI for collaborative discussions and complex task execution. When OpenClaw needs deeper analysis, coding assistance, or multi-turn discussions with a powerful code-generation model, it writes tasks to a queue and Claude Code Interface Agent executes them.

Architecture

OpenClaw (main agent)
  ↓ writes task .json
Claude Code Interface Agent (polling loop)
  ↓ calls claude CLI with env vars
Claude Code CLI →阿里云 API (qwen3.5-plus)
  ↓ returns result .json
OpenClaw reads result and continues

Setup Requirements

1. Install Claude Code CLI

# macOS
brew install anthropic/claude-code/claude-code

# Or via npm
npm install -g @anthropic/claude-code

2. Configure Environment Variables

The agent requires these environment variables:

export ANTHROPIC_AUTH_TOKEN="your-api-token"
export ANTHROPIC_BASE_URL="https://coding.dashscope.aliyuncs.com/apps/anthropic"
export ANTHROPIC_MODEL="qwen3.5-plus"  # or your preferred model

3. Start the Interface Agent

mkdir -p ~/.openclaw/agents/main/workspace/.oc-cc-in
mkdir -p ~/.openclaw/agents/main/workspace/.oc-cc-out

python3 agent.py &

Usage

Sending a Task

Create a JSON file in .oc-cc-in/ with:

{
  "task_id": "unique-task-id",
  "prompt": "Your question or task for Claude Code",
  "priority": "normal"
}

The interface agent polls the directory, executes via Claude Code CLI, and writes results to .oc-cc-out/{task_id}.json.

Reading Results

Results are JSON files with:

  • task_id: Task identifier
  • status: "completed" or "failed"
  • prompt: Original prompt
  • stdout: Claude Code's response
  • stderr: Error output if any
  • returncode: Exit code
  • completed_at: ISO timestamp

Example: Collaborative Discussion

OpenClaw sends:

{
  "task_id": "discuss-01",
  "prompt": "Analyze the pros and cons of microservices vs monolith for a small startup. Provide concrete recommendations.",
  "priority": "high"
}

Claude Code returns detailed analysis in stdout, OpenClaw reads it and continues the conversation with the user.

Directory Structure

.oc-cc-agent/
├── agent.py          # Interface agent (polling loop)
.oc-cc-in/            # Input queue (tasks to process)
.oc-cc-out/           # Output queue (results)
.oc-cc-chat.log      # Conversation log
.oc-cc-status.json   # Agent status

Monitoring

  • Status: Check .oc-cc-status.json for agent state
  • Logs: Conversation log at .oc-cc-chat.log
  • View Results: Read JSON files in .oc-cc-out/

Configuration

Key settings in agent.py:

WORK_DIR = "/path/to/workspace"  # Claude Code's working directory
IN_DIR = f"{WORK_DIR}/.oc-cc-in"
OUT_DIR = f"{WORK_DIR}/.oc-cc-out"
LOG_FILE = f"{WORK_DIR}/.oc-cc-chat.log"
PORT = 18790  # Optional HTTP server port
TIMEOUT = 120  # seconds

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

没有标签

同类 Skill