Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

claude-code-delegateClaude 代码 delegate

Agent Skill

claude-code-delegate 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

22,522

周安装

920

GitHub Stars

2

下载量

7,213
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:claude-code-delegate(Claude 代码 delegate)
来源仓库:https://github.com/chenhab03/claude-code-delegate
安装命令:
openclaw skills install claude-code-delegate
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install claude-code-delegate

简介

将编程任务委托给 Claude Code CLI 执行。

  • 适用于复杂编码需求的分布式处理。claude-code-delegate 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 安装命令:openclaw skills install claude-code-delegate。
  • 需监控子进程资源占用与超时行为。
  • 原始 README 未提供任务队列与优先级调度说明。

SKILL.md

name
claude-code-delegate
description
Delegate programming tasks to Claude Code CLI
user-invocable
true

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

ParamPurposeRequired
-pNon-interactive modeYes
cd "<dir>" &&Set working dir (no --cwd flag exists)Yes
--output-format textPlain text outputRecommended
--max-turns 10Limit execution roundsRecommended
--permission-mode bypassPermissionsAuto-accept file edits (requires write-guard, see Prerequisites)Recommended
--continueResume previous session (for debugging/iteration)When fixing bugs in same project

FORBIDDEN: --dangerously-skip-permissions

Timeout

Set exec timeout to 300 (5 minutes). The delegate needs time to write code.

Async Flow (CRITICAL)

The delegate MUST NOT block you. You must remain responsive to the user at all times.

Correct Flow

Step 1: exec claude -p "..."          → get session ID (e.g. "marine-sage")
Step 2: IMMEDIATELY reply to user     → "On it! Working on that now."
Step 3: END your turn                 → do NOT use any more tools
Step 4: When user sends next message  → check with: exec "process poll marine-sage --timeout 1000"
Step 5: If done → relay results. If not done → tell user "still working", continue chat

WRONG (causes blocking)

exec claude -p "..." → process poll → (BLOCKED! user waits with no response)

Rules

  1. After exec claude -p, you MUST reply to user and END your turn. No more tool calls.
  2. NEVER use process tool directly. Use exec "process poll <id> --timeout 1000" on next user message.
  3. Only check the delegate's status when the user sends a NEW message.
  4. You can run multiple claude -p tasks in parallel.

Task Description Rules

  1. Clear objective: what to do, which file
  2. Provide context: function names, error messages, expected behavior
  3. Specify constraints: language, framework, code style
  4. One task per call

Debugging / Iteration

When user reports bugs in code the delegate previously wrote:

  • Use --continue flag to resume the delegate's session context
  • Same project directory + --continue = the delegate remembers what it wrote
  • Translate user's feedback into clear bug description for the delegate

Testing / Verification (Independent Review)

After the delegate writes code, use a separate fresh session (NO --continue) to test and verify it.

Why: The author has context bias. A fresh session reads the source code independently — like an external code reviewer. This catches issues the author missed.

Flow

Step 1: claude -p "Write X in projects/X/"              → Author session (can use --continue to iterate)
Step 2: claude -p "Run and test projects/X/, report bugs" → Tester session (ALWAYS fresh, NO --continue)

Rules

  1. Author session: writes code, can use --continue to iterate on bugs
  2. Tester session: NEVER uses --continue — must read source fresh
  3. Tester reports: what it ran, output, pass/fail, bugs found
  4. If tester finds bugs → relay to user, then send fix task to author session (with --continue)

When to Auto-Test

  • User says "test it" or "run it" after writing → use fresh session
  • User says "fix the bug" after testing → use --continue on author session
  • User says "run hot_sectors.py" (existing program) → fresh session (no prior context needed)

Session Decision Rule

Scenario--continue?
Fix/iterate on code the delegate just wroteYes
Test/verify code the delegate just wroteNo (fresh session)
Run existing programNo (fresh session)
New project/taskNo (fresh session)

Relaying Results

The delegate does not talk to the user directly. You relay all results.

When relaying:

  1. Summarize what was done and which files changed
  2. Add the delegate's personality (see PERSONA.md for character template)
  3. Add your own reaction

Keep technical summary concise. Do not copy the delegate's full output verbatim.

Error Handling

ErrorAction
command not foundTell user to install: npm install -g @anthropic-ai/claude-code
Empty outputAsk user to clarify the task
TimeoutSuggest breaking into smaller tasks
Permission errorAsk user to check file path
API errorAsk user to run claude to check login status

Failure Rule

If the delegate fails or times out, do NOT write code yourself.

Tell the user: "The coding task didn't finish. Want me to try again?"

Retry with longer timeout or simpler task description. Only write code yourself if user explicitly says "you do it" (not recommended).

Security Best Practices

  1. Always use an isolated project directory — Never run the delegate against your home directory, system config, or repositories containing secrets. Use a dedicated projects/ or workplace/ directory.
  2. Set up the write-guard plugin — This is the most important safety measure. See README.md for the full plugin code. The write-guard blocks writes to platform config files (.openclaw/, LaunchAgents/, auth profiles) at the platform level.
  3. Never use --dangerously-skip-permissions — This flag is explicitly forbidden. --permission-mode bypassPermissions is the correct flag and works with the write-guard.
  4. Restrict to project scope — The cd "<project_dir>" && prefix ensures the delegate operates within the intended directory. Never omit it.
  5. Review delegate output — Always relay results through the main agent. Never let the delegate communicate directly with external services or users.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

81.82%
按下载量换算5,902

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills