Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计提醒

cursor-dispatchCursor dispatch 搜索

Agent Skill

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

总安装

11,307

周安装

453

GitHub Stars

公开资料未说明

下载量

3,660
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install cursor-dispatch

简介

cursor-dispatch 协调多个 Cursor Agent CLI 实例并发执行编码任务并处理超时重试。

  • 适用于 OpenClaw 中并行处理多个独立模块开发或批量代码生成需求。
  • 内置任务队列管理与负载均衡机制,提升整体执行效率。
  • 使用前需评估本地或云端计算资源上限,避免同时调度过多任务导致系统过载。
  • 建议为关键任务设置合理超时阈值,防止单个失败阻塞整个流水线。

SKILL.md

name
cursor-dispatch
description
Orchestrate Cursor Agent CLI for coding tasks with concurrency control, timeout recovery, and multi-task coordination. Use when: (1) dispatching coding tasks to cursor agent via CLI, (2) analyzing code before modifying (plan mode), (3) running parallel batch coding tasks with concurrency limits, (4) coordinating multi-step code changes with review gates, (5) recovering from stuck/timeout cursor processes. Triggers: cursor dispatch, plan then execute, code analysis pipeline, batch coding tasks, cursor agent orchestration, parallel coding, concurrent tasks.

Cursor Agent CLI Dispatch

Orchestrate cursor agent CLI with concurrency control, timeout recovery, and retry.

Hard Constraints (from testing)

ConstraintValueSource
PTY requiredpty: true mandatoryNo output without PTY
Max safe concurrency6 parallel tasksTested 8 OK, 6 is safe margin
Plan timeout (single file)60-120sTested on .gd files
Plan timeout (multi-file)>180s, WILL timeoutDon't attempt
Execute timeout60-90s typicalUp to 180s for complex
--output-format jsonBROKEN in PTYUse text format only
Empty output = failureCheck output size > 20 bytesRetry if empty

Command Template

exec(
  command: "cd <project> && cursor agent -p --trust [FLAGS] --model auto --workspace . '<prompt>'",
  pty: true,
  timeout: <seconds>
)
ModeFlagsTimeoutUse
Plan--plan180sRead-only analysis
Execute--yolo180sAuto-approve changes
Ask--mode ask120sQ&A, no changes

Concurrency Control Protocol

State Tracking

Before launching cursor tasks, track them via process(action=list). Each running exec session with cursor agent counts toward the limit.

Launch Rules

1. Check: process(action=list) → count sessions with "cursor agent" in command
2. If count >= MAX_CONCURRENT (default 4, max 6): WAIT or QUEUE
3. Launch: exec(command=..., pty=true, timeout=T, background=true)
4. Record: sessionId + taskId + startTime
5. Poll: process(action=poll, sessionId=X, timeout=T*1000)

Concurrency Limits by Task Type

ScenarioMax ConcurrentWhy
Plan-only (read)6No file conflicts
Execute (write)3Avoid git/file conflicts
Mixed plan+execute4Balance safety and speed
Same-file tasks1 (serial only)NEVER parallel on same file

Timeout & Recovery Protocol

Detection

A task is stuck when:

  • process(action=poll, timeout=T) returns with process still running after timeout
  • Exit code 143 (SIGTERM) or 137 (SIGKILL) = was killed by timeout
  • Output is empty (< 20 bytes) after completion = silent failure

Recovery Steps

1. DETECT: poll returns "still running" or exit 143/137 or empty output
2. KILL: process(action=kill, sessionId=X)
3. WAIT: 3 seconds cooldown (avoid API rate limits)
4. SIMPLIFY: reduce prompt scope (fewer files, simpler question)
5. RETRY: relaunch with simplified prompt, same or higher timeout
6. MAX RETRIES: 2 attempts total. After 2 failures → report to user

Simplification Strategy

When a task times out, simplify before retrying:

OriginalSimplified
"Scan all dungeon scripts for bugs""Scan dungeon_manager.gd for null refs"
"Fix 5 issues in this file""Fix issue #1 and #2 only"
"Analyze architecture of combat system""List all functions in arpg_monster.gd"

Cleanup Protocol

When to Clean Up

  • Before starting a new batch of tasks
  • After any task failure
  • On session start (check for orphans)

How to Clean Up

1. process(action=list) → find all cursor-related sessions
2. For each: check if still running
3. If running > 10 minutes: process(action=kill, sessionId=X)
4. Verify: ps aux | grep "cursor agent -p" | grep -v grep
5. Nuclear option: pkill -f "cursor agent -p" (kills ALL cursor CLI agents)

Orphan Detection

Cursor agent processes that outlive their exec session become orphans:

# Find orphan cursor agent processes
ps aux | grep "cursor agent -p" | grep -v grep
# Kill specific orphan
kill <PID>

Four Dispatch Chains

Chain A: Direct Execute

For simple tasks (1-3 files, clear logic). Single exec call.

exec(
  command: "cd <project> && cursor agent -p --trust --yolo --model auto --workspace . '<task>'",
  pty: true, timeout: 180
)
→ poll → verify output not empty → done

Chain B: Plan → Review → Execute ⭐

For complex tasks. Most reliable chain.

Step 1 — PLAN (pty:true, timeout:180):
  "检查 <file> 中会导致运行时崩溃的问题。重点:<specific concerns>。只列会崩溃的。"

Step 2 — REVIEW (agent decides):
  Parse output → grade 🔴🟠🟡🟢 → select fixes for this round

Step 3 — EXECUTE (pty:true, timeout:180):
  "修复 <file> 中 N 个问题:[paste selected items with line numbers and fix code]。
   修复后运行:<verify command>。确认无错误后 git commit。"

Step 4 — VERIFY:
  Run headless build/test to confirm

Chain C: Parallel Batch

For independent tasks across different files. Use background exec.

# Launch (respect concurrency limit)
exec(cmd="cursor agent ... task1", pty:true, background:true) → session1
exec(cmd="cursor agent ... task2", pty:true, background:true) → session2
exec(cmd="cursor agent ... task3", pty:true, background:true) → session3

# Monitor
process(action=poll, sessionId=session1, timeout=180000)
process(action=poll, sessionId=session2, timeout=180000)
process(action=poll, sessionId=session3, timeout=180000)

# Verify all
Run headless build/test

Rules:

  • Max 4 parallel execute tasks (6 for plan-only)
  • NEVER parallel on same file
  • Check for git conflicts after all complete
  • If any fails: kill remaining → fix conflict → retry failed ones

Chain D: Plan Global → Serial Execute

For large refactors with dependencies.

1. Plan pass on each file (can parallel, up to 6)
2. Collect all findings → sort by dependency
3. Execute in dependency order (serial)
4. Verify after each execute before next
5. If verify fails: stop, fix, re-plan remaining

Prompt Engineering for Cursor Agent

Plan Prompts (what works)

Good: "检查 scripts/dungeon/dungeon_manager.gd 中所有可能返回 null 的函数调用,以及调用方是否有 null 检查" Good: "列出 <file> 中所有 func 的名字" Bad: "扫描所有文件找出所有问题" (too broad, will timeout)

Execute Prompts (what works)

Good: Include exact line numbers + expected code change + verify command + git commit Bad: Vague "fix the bugs" without specifics

Template

Plan: "检查 <file> 中 <specific concern>。只列会崩溃/卡死的问题,给出行号和修复方案。"
Execute: "修复 <file> 中 N 个问题:
1. 第 X 行:<current code> → <fixed code>
2. 第 Y 行:<current code> → <fixed code>
修复后运行:<verify command>
确认无错误后 git commit -m '<message>'。"

Model Selection

TaskModelTimeout
Defaultauto
Simple editsauto120s
Complex analysisauto + --plan180s
Code reviewauto + --mode ask120s

auto routes to best available model (typically opus-4.6-thinking). Don't override unless needed.

Session Resume

cursor agent ls                              # List past sessions
cursor agent -p --trust --continue "..."     # Continue last
cursor agent -p --trust --resume <id> "..."  # Resume specific

Timing Benchmarks

v2.6.12 (tested 2026-03-06 evening, cursor 2.6.12)

Task TypeTimeConcurrency Tested
List functions (small file <50 lines)8-14s6/6 parallel ✅
List functions (medium file ~600 lines)17ssingle ✅
List functions (large file ~1000 lines)40ssingle ✅
Simple execute (add comment, 1 file)16-19s3/3 parallel ✅
Ask mode (simple Q&A)8ssingle ✅
Complex analysis (null-check scan, 660 lines)84ssingle ✅
Long complex prompt (3+ concerns, multi-file ref)>180sTIMEOUT ⚠️
Execute with broad prompt (3 bugs, multi-concern)>180sTIMEOUT ⚠️

Key Findings (v2.6.12)

  • Simple tasks (list/comment/ask) are MUCH faster than v2026.02.27 (8-40s vs 55-120s)
  • Complex analysis still takes 60-120s — similar to old version
  • Broad prompts (3+ separate concerns) STILL timeout — must split into 1-concern-per-task
  • Silent failures (empty output) reduced but still occur on timeout
  • 6 parallel plan = all pass in ~53s wall clock (individual 8-14s each)
  • 3 parallel execute = all pass in ~25s wall clock (individual 16-19s each)

Failure Mode: Prompt Complexity (NOT concurrency)

Timeouts correlate with prompt complexity, not concurrency:

  • 6 simple tasks parallel → all pass in <20s each
  • 1 complex task with 3+ concerns → timeout at 180s
  • Solution: ALWAYS split multi-concern prompts. One concern per cursor task.

Previous version (v2026.02.27, tested 2026-03-06 morning)

Task TypeTimeConcurrency Tested
List functions (1 file)15s8/8 passed
Null-check scan (1 file)80-120s4/4 parallel ✅
Execute fix (1 file, 1-4 issues)55-90s3/3 parallel ✅
Multi-file analysis>180sTIMEOUT

Validated Workflows

Workflow 1: Parallel Plan → Review → Parallel Execute (2026-03-06)

Round 1 (Chain B serial): 3 files × plan→execute = 9 fixes, 3 commits
Round 2 (Chain C parallel): 4 files × plan (parallel) → review → 3 files × execute (parallel) = 3 fixes, 3 commits
Total: 12 runtime crash risks fixed, 6 commits, Godot headless zero errors

Workflow 2: Skip Plan, Direct Execute (2026-03-06 evening)

When you already know exactly what to change, skip Plan and go straight to Execute:

3 parallel Execute (different files) = all pass, 16-19s each
Pre-requisite: dispatcher already analyzed the code and wrote precise prompts

Key insight: Plan can always be parallelized (read-only). Execute can be parallelized only when tasks touch different files. Review is always serial (agent decides). Critical: Keep prompts focused — 1 file, 1 concern, specific line numbers.

For model list and CLI parameters, see references/models-and-params.md.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

88.54%
按下载量换算3,241

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills