TopRank Skills

Home / Claw Skills / Git / GitHub / claude-code-delegate
Official OpenClaw rules 36%

claude-code-delegate

Delegate programming tasks to Claude Code CLI

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 claude-code-delegate 技能。 若已安装,则直接安装 claude-code-delegate 技能。

Overview

Skill Key
chenhab03/claude-code-delegate
Author
chenhab03
Source Repo
openclaw/skills
Version
-
Source Path
skills/chenhab03/claude-code-delegate
Latest Commit SHA
464cfb2fb2c93023a36ad9df9e580a43523e325e

Extracted Content

SKILL.md excerpt

# 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 excerpt

# 🔧 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...

Related Claw Skills

heyixuan2

bambu-studio-ai

★ 41

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 pipeline: search → generate → analyze → colorize → preview → open BS → user slice → print → monitor. Supports all 9 Bambu Lab printers (A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D).

capt-marbles

geo-optimization

★ 1

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 discoverability and citation.

carlulsoe

parakeet-stt

★ 0

Local speech-to-text with NVIDIA Parakeet TDT 0.6B v3 (ONNX on CPU). 30x faster than Whisper, 25 languages, auto-detection, OpenAI-compatible API. Use when transcribing audio files, converting speech to text, or processing voice recordings locally without cloud APIs.

carlzhao007

feishu-process-feedback

★ 0

飞书消息自动处理与进度反馈技能。安装后后台运行,监听飞书任务消息并自动创建独立进程处理。 在处理前后发送实时进度反馈(任务确认、进度百分比、完成通知)。 支持任务类型识别、智能解析、错误重试、并发控制、状态持久化。 使用场景:飞书自动化工作流、任务进度追踪、批量任务处理、需要实时反馈的场景。

cartoonitunes

bottyfans

★ 0

BottyFans agent skill for autonomous creator monetization. Lets AI agents register, build a profile, publish posts (public, subscriber-only, or pay-to-unlock), upload media, accept USDC subscriptions and tips on Base, send and receive DMs, track earnings, and appear on the creator leaderboard. Use this skill when an agent needs to monetize content, interact with fans, manage a creator profile, handle payments in USDC, or operate as an autonomous creator on the BottyFans platform.

camopel

arxivkb

★ 0

Local arXiv paper manager with semantic search. Crawls arXiv categories, downloads PDFs, chunks content, and indexes with FAISS + Ollama embeddings. No cloud API keys required — everything runs locally.