搜索

PythonReactSEOPDF
OpenClaw

claude-code-delegate

Delegate programming tasks to Claude Code CLI

chenhab030 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install chenhab03/claude-code-delegate

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Claude Code Delegate

Delegate programming tasks to local Claude Code CLI.

RULE: You NEVER write code directly. ALL programming goes through claude -p.

Prerequisites Check (Run Before First Use)

Before delegating any task, verify the environment is ready:

  1. Claude Code CLI installed: Run which claude — if not found, tell user: npm install -g @anthropic-ai/claude-code
  2. API key configured: Run claude --version — if it errors about auth, tell user to run claude and complete login
  3. Write-guard active (STRONGLY RECOMMENDED): Check if a write-guard plugin exists at .openclaw/extensions/write-guard/. If not, warn the user:

    ⚠️ No write-guard detected. The delegate uses --permission-mode bypassPermissions which grants full filesystem read/write access. It is strongly recommended to set up a write-guard plugin before running tasks. See README.md for setup instructions.

Only proceed with delegation after items 1 and 2 pass. Item 3 is a warning — the user may choose to proceed without it, but should be informed of the risk.

When to Trigger

Auto-trigger on ANY of these:

  • Write, modify, refactor, debug code
  • Create project files or directories
  • Run tests, lint, build
  • Code review, architecture planning
  • Edit any file (except memory/ and .relationship/)

Manual trigger: user sends /code <task>

Do NOT trigger: chat, emotional interaction, information lookup.

Command Template

cd "<project_dir>" && claude -p "<task_description>" --output-format text --max-turns 10 --permission-mode bypassPermissions
Parameters
Param Purpose Required
-p Non-interactive mode Yes
cd "<dir>" && Set working dir (no --cwd flag exists) Yes
--output-format text Plain text output Recommended
--max-turns 10 Limit execution rounds Recommended
--permission-mode bypassPermissions Auto-accept file edits (requires write-guard, see Prerequisite...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/chenhab03/claude-code-delegate
Version
—
Commit
464cfb2fb2c93023a36ad9df9e580a43523e325e
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

🔧 Claude Code Delegate

An OpenClaw skill that delegates programming tasks to a local Claude Code CLI instance.

Your OpenClaw agent handles conversation and user interaction. When coding is needed, it delegates to Claude Code (claude -p) running locally — giving your agent professional-grade programming ability without the main agent writing code directly.

Why Delegate?

Without Delegation With Delegation
Main agent writes code inline (often poor quality) Claude Code handles all programming with full tooling
Agent gets stuck in long code blocks, loses conversation context Agent stays responsive, code runs async in background
No file system awareness Full file system access, can run tests, install packages
Single-model limitations Leverages Claude Code's specialized coding abilities

How It Works

User: "Write me a stock screener in Python"
    ↓
Main Agent: delegates via `claude -p "Write a stock screener in projects/screener/"`
    ↓
Main Agent: immediately replies "On it! Let me get that done for you."
    ↓
Claude Code: writes files, installs deps, runs tests (async, non-blocking)
    ↓
User: (sends next message)
    ↓
Main Agent: polls for result, relays summary with personality

Installation

npx clawhub install claude-code-delegate

Or manually copy the skill directory into your workspace's skills/ folder.

Prerequisites
  • Claude Code CLI installed locally:
    npm install -g @anthropic-ai/claude-code
    
  • ANTHROPIC_API_KEY environment variable set, or Claude Code authenticated via claude login
  • OpenClaw agent framework
  • Write-guard plugin (strongly recommended) — See Security Notes below. This skill uses --permission-mode bypassPermissions which grants the delegate full filesystem access. Without a write-guard, the delegate can re...

来源内容

SKILL.md
# Claude Code Delegate

Delegate programming tasks to local Claude Code CLI.

**RULE: You NEVER write code directly. ALL programming goes through `claude -p`.**

## Prerequisites Check (Run Before First Use)

Before delegating any task, verify the environment is ready:

1. **Claude Code CLI installed**: Run `which claude` — if not found, tell user: `npm install -g @anthropic-ai/claude-code`
2. **API key configured**: Run `claude --version` — if it errors about auth, tell user to run `claude` and complete login
3. **Write-guard active (STRONGLY RECOMMENDED)**: Check if a write-guard plugin exists at `.openclaw/extensions/write-guard/`. If not, warn the user:
   > ⚠️ No write-guard detected. The delegate uses `--permission-mode bypassPermissions` which grants full filesystem read/write access. It is strongly recommended to set up a write-guard plugin before running tasks. See README.md for setup instructions.

Only proceed with delegation after items 1 and 2 pass. Item 3 is a warning — the user may choose to proceed without it, but should be informed of the risk.

## When to Trigger

Auto-trigger on ANY of these:
- Write, modify, refactor, debug code
- Create project files or directories
- Run tests, lint, build
- Code review, architecture planning
- Edit any file (except memory/ and .relationship/)

Manual trigger: user sends `/code <task>`

Do NOT trigger: chat, emotional interaction, information lookup.

## Command Template

```bash
cd "<project_dir>" && claude -p "<task_description>" --output-format text --max-turns 10 --permission-mode bypassPermissions
```

### Parameters

| Param | Purpose | Required |
|-------|---------|----------|
| `-p` | Non-interactive mode | Yes |
| `cd "<dir>" &&` | Set working dir (no --cwd flag exists) | Yes |
| `--output-format text` | Plain text output | Recommended |
| `--max-turns 10` | Limit execution rounds | Recommended |
| `--permission-mode bypassPermissions` | Auto-accept file edits (**requires write-guard**, see Prerequisite...
README
# 🔧 Claude Code Delegate

**An OpenClaw skill that delegates programming tasks to a local Claude Code CLI instance.**

Your OpenClaw agent handles conversation and user interaction. When coding is needed, it delegates to Claude Code (`claude -p`) running locally — giving your agent professional-grade programming ability without the main agent writing code directly.

## Why Delegate?

| Without Delegation | With Delegation |
|---|---|
| Main agent writes code inline (often poor quality) | Claude Code handles all programming with full tooling |
| Agent gets stuck in long code blocks, loses conversation context | Agent stays responsive, code runs async in background |
| No file system awareness | Full file system access, can run tests, install packages |
| Single-model limitations | Leverages Claude Code's specialized coding abilities |

## How It Works

```
User: "Write me a stock screener in Python"
    ↓
Main Agent: delegates via `claude -p "Write a stock screener in projects/screener/"`
    ↓
Main Agent: immediately replies "On it! Let me get that done for you."
    ↓
Claude Code: writes files, installs deps, runs tests (async, non-blocking)
    ↓
User: (sends next message)
    ↓
Main Agent: polls for result, relays summary with personality
```

## Installation

```bash
npx clawhub install claude-code-delegate
```

Or manually copy the skill directory into your workspace's `skills/` folder.

### Prerequisites

- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) installed locally:
  ```bash
  npm install -g @anthropic-ai/claude-code
  ```
- **`ANTHROPIC_API_KEY`** environment variable set, or Claude Code authenticated via `claude` login
- [OpenClaw](https://github.com/openclaw/openclaw) agent framework
- **Write-guard plugin (strongly recommended)** — See [Security Notes](#%EF%B8%8F-security-notes) below. This skill uses `--permission-mode bypassPermissions` which grants the delegate full filesystem access. Without a write-guard, the delegate can re...

相关技能

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

0protocol

0isone

Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.

OpenClaw

0x0-messenger

eijiac24

Send and receive P2P messages using disposable numbers and PINs. No servers, no accounts. Use for human notifications, approval flows, and agent-to-agent communication.