跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 cursor-delegate

Cursor Delegate

将编码任务委托给Cursor Agent CLI("cursor-agent")作为背景执行者,然后审查它的diff并自己登陆. 当用户想要将执行工作交给 Cursor 时使用此语句——如"有 Cursor 执行 X","将其删除给 Cursor","通过 Cursor Agent 运行",或"使用 Cursor 执行/固定/执行",或想在保留审查员的同时通过 Cursor 运行一队编码任务. 不使用小到可以内置的任务, 或者当用户需要直接写入代码而不授权时 .

2662 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

将编码任务委托给Cursor Agent CLI("cursor-agent")作为背景执行者,然后审查它的diff并自己登陆. 当用户想要将执行工作交给 Cursor 时使用此语句——如"有 Cursor 执行 X","将其删除给 Cursor","通过 Cursor Agent 运行",或"使用 Cursor 执行/固定/执行",或想在保留审查员的同时通过 Cursor 运行一队编码任务. 不使用小到可以内置的任务, 或者当用户需要直接写入代码而不授权时 .

何时用

官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Cursor Delegate、When NOT to use this、Prerequisites (check once)、Choose the model、The loop、1. Write the brief。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/writing-the-brief.md、scripts/relay.mjs、references/dispatch-and-poll.md、references/review-and-land.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Delegate a coding task to the Cursor Agent CLI (`cursor-agent`) as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to hand implementation work to Cursor — phrasings like "have Cursor implement X", "delegate this to Cursor", "run it through Cursor Agent", or "use Cursor to implement/fix/refactor" — or wants to run a queue of coding tasks through Cursor while staying the reviewer. DO NOT USE for tasks small enough to do inline, or when the user wants the code written directly without delegating.

Cursor DelegateWhen NOT to use thisPrerequisites (check once)Choose the modelThe loop1. Write the brief2. Dispatchread-only (plan mode — review/diagnosis, no edits): add --read-onlywrite-capable without automatic command approval: add --no-forceexplicitly override Cursor's sandbox for this run: add --sandbox enabled|disabledpin a model from `cursor-agent models`: add --model <name>resume the most recent session: add --resume-last (delta brief only)

兼容:Requires the `cursor-agent` CLI installed and authenticated, Node 18+, and git. The optional `--add-dir` flag requires cursor-agent 2026.07.23 or newer. The orchestrating agent must be able to run shell commands and read files. Shell examples assume bash/zsh (macOS/Linux, or Git Bash/WSL on Windows). · 许可:MIT

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
cursor-delegate
description
Delegate a coding task to the Cursor Agent CLI (`cursor-agent`) as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to hand implementation work to Cursor — phrasings like "have Cursor implement X", "delegate this to Cursor", "run it through Cursor Agent", or "use Cursor to implement/fix/refactor" — or wants to run a queue of coding tasks through Cursor while staying the reviewer. DO NOT USE for tasks small enough to do inline, or when the user wants the code written directly without delegating.
compatibility
Requires the `cursor-agent` CLI installed and authenticated, Node 18+, and git. The optional `--add-dir` flag requires cursor-agent 2026.07.23 or newer. The orchestrating agent must be able to run shell commands and read files. Shell examples assume bash/zsh (macOS/Linux, or Git Bash/WSL on Windows).
许可
MIT
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 4
  • references/writing-the-brief.md
  • scripts/relay.mjs
  • references/dispatch-and-poll.md
  • references/review-and-land.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「cursor-delegate」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-7bf3969e846a14a2-%E5%85%89%E6%A0%87%E4%BB%A3%E8%A1%A8.html
请存为 .cursor/skills/cursor-delegate/SKILL.md 或 .claude/skills/cursor-delegate/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/amelnagdy/delegate-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/amelnagdy/delegate-skills' --list

npx skills add 'https://github.com/amelnagdy/delegate-skills' --skill 'cursor-delegate'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: cursor-delegate description: >- Delegate a coding task to the Cursor Agent CLI (`cursor-agent`) as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to hand implementation work to Cursor — phrasings like "have Cursor implement X", "delegate this to Cursor", "run it through Cursor Agent", or "use Cursor to implement/fix/refactor" — or wants to run a queue of coding tasks through Cursor while staying the reviewer. DO NOT USE for tasks small enough to do inline, or when the user wants the code written directly without delegating. license: MIT compatibility: Requires the `cursor-agent` CLI installed and authenticated, Node 18+, and git. The optional `--add-dir` flag requires cursor-agent 2026.07.23 or newer. The orchestrating agent must be able to run shell commands and read files. Shell examples assume bash/zsh (macOS/Linux, or Git Bash/WSL on Windows). metadata: version: 0.5.0 --- # Cursor Delegate You are the **orchestrator**. Hand a bounded coding task to a separate **implementer** — the Cursor Agent CLI — then review what it produced and land it yourself. You write the brief and own the judgment; Cursor does the typing in its own session; you verify and commit. The loop needs only a shell command and file access, so any comparable orchestrator can drive it. ## When NOT to use this - The task is small enough to do inline; delegation overhead is not worth it. - The `cursor-agent` CLI is not installed or authenticated (run `cursor-agent login`). - You want to write the code yourself, or you only need Cursor's opinion on code you wrote (a `--read-only` dispatch covers that — see below — but a plain review may not need delegation at all). ## Prerequisites (check once) 1. `cursor-agent --version` succeeds. If not, follow the installer for your platform at [cursor.com/cli](https://cursor.com/cli), inspect what it will run, and authenticate with `cursor-agent login`. 2. `cursor-agent status` shows you logged in. 3. You are in (or will point `--cd` at) the target git repository. The relay passes `--trust`, so point it only at repositories you trust. ## Choose the model Omitting `--model` uses your Cursor default (usually `auto` — Cursor picks). To pin one, pass `--model ` with a name from the account's live `cursor-agent models` output — select from that list rather than inventing a name. Parameterized forms like `[context=1m,effort=high]` are forwarded as-is. The model that actually served the run is recorded as `resolvedModel` in `result.json`. ## The loop Run these five steps per task. Steps 1, 4, and 5 require judgment; 2 and 3 are mechanical. ### 1. Write the brief Cursor sees only the text you send plus what it can inspect in the workspace — no chat history or shared context. Include the goal, current state, what to change, what to leave untouched, the project's **actual** gates, and a report contract. Tell Cursor not to commit. Keep one task per brief. See [references/writing-the-brief.md](references/writing-the-brief.md). ### 2. Dispatch Use the bundled helper. It wraps `cursor-agent -p`, feeds the brief on stdin, captures the structured event stream, and writes `result.json`. (`` is the installed folder containing this `SKILL.md`.) ```bash node "/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo # read-only (plan mode — review/diagnosis, no edits): add --read-only # write-capable without automatic command approval: add --no-force # explicitly override Cursor's sandbox for this run: add --sandbox enabled|disabled # pin a model from `cursor-agent models`: add --model # resume the most recent session: add --resume-last (delta brief only) # resume a specific session: add --session (delta brief only) # hard time limit (watchdog): add --timeout 2h (the 30m default suits short runs; implementation briefs routinely need 1-2h) # see all options: node .../relay.mjs --help ``` The child process's cwd pins the workspace. On Cursor `2026.07.23` or newer, use repeatable `--add-dir` flags only for extra workspace directories. The relay writes artifacts under the system temp dir by default and never commits. See [references/dispatch-and-poll.md](references/dispatch-and-poll.md). ### 3. Wait for completion The helper blocks until Cursor finishes. Run it with the orchestrator's background-command facility, or background it in the shell and poll for `result.json`. A pre-run usage error exits 2 and writes no result; a missing `cursor-agent` exits 127 and writes `status: "cursor_agent_unavailable"`. Trust process state and the working tree over a progress display. Completion means the process exited and `result.json` exists. Cursor's full report is the `finalMessage` field in `result.json` (also printed in full on stdout between the report markers). **Windows + hooks caveat:** if the user has Cursor hooks configured (`~/.cursor/hooks.json`, or Claude Code `PreToolUse` hooks, which cursor-agent imports), dispatching from a Git Bash (MSYS) console makes cursor-agent feed PowerShell-syntax hook wrappers to bash, so every command Cursor tries to run is blocked — edits still land, gates do not run. Dispatch from a PowerShell or cmd console instead. Details: [references/dispatch-and-poll.md](references/dispatch-and-poll.md). ### 4. Review — do not trust the self-report Treat Cursor's final message and gate claims as claims: - Re-run the project's gates yourself. - Read the diff against the brief, starting with `touchedFiles`. - Run relevant guard skills if installed. - Round-trip migrations and grep for dangling references after removals or renames. See [references/review-and-land.md](references/review-and-land.md). ### 5. Land it The implementer edits the working tree; **the orchestrator commits.** Commit only after the gates pass and the diff holds. If rework is needed, send a delta brief with `--resume-last` or `--session `, then review again. ## Autonomy and permissions A fresh run defaults to **write-capable with `--force`**: Cursor runs commands without approval unless your Cursor config explicitly denies them, so ordinary gates (tests, linters, builds) run headlessly. `--no-force` keeps the run write-capable but withholds automatic command approval; commands that require approval are refused because a headless run cannot prompt. `--read-only` switches to Cursor's **plan mode** (read-only analysis, no edits, no `--force`). The relay always passes `--trust` to keep headless runs from stalling on the workspace-trust prompt, which is why `--cd` must only ever point at repositories you trust. Pass `--sandbox enabled` or `--sandbox disabled` only when you need to override Cursor's sandbox for that dispatch. The requested value is recorded as `sandbox` in `result.json`; it does not claim what Cursor actually applied. The permission mode Cursor reports is recorded as `permissionMode`; inspect `touchedFiles` and the diff after every run. ## Read-only second opinions `--read-only` doubles as a clean way to get an adversarial second opinion with no write risk: dispatch a brief that lists the agreed points, then each contested point with both positions, and ask Cursor to defend or concede each — deliverable in its final message, touching no files. ## Authorization model Delegation is something the human opts into. Once they have ("run this queue", "proceed"), committing verified, gate-passing work is the agreed contract. Two limits remain: **surface, don't absorb** (report Cursor's design decisions, defensible-but-unasked turns, and non-blocking nitpicks) and **stop for scope changes** (if correct completion needs going beyond the brief, ask instead of expanding the mandate). See [references/review-and-land.md](references/review-and-land.md). ## References - [references/writing-the-brief.md](references/writing-the-brief.md) — structure, report contract, real gates, and delta briefs. - [references/dispatch-and-poll.md](references/dispatch-and-poll.md) — flags, artifacts, `result.json`, polling, and failure recovery. - [references/review-and-land.md](references/review-and-land.md) — review checklist, commit boundary, and rework through Cursor sessions. - [references/multi-task-queues.md](references/multi-task-queues.md) — sequential queues, constraint carry-forward, progress tracking, and the final coherence pass.

相关技能

Agent 工作流

Skill Creator

创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.

Agent 工作流

Clawdhub

使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.

Agent 工作流

Agent Team Orchestration

管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.

Agent 工作流

Superpowers

Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…