Skip to content
Agent Orchestration
Skill

/cursor-do

Delegate a single write task to Cursor Composer via cursor-companion.sh inside an isolated worktree, then Lead-review the diff and cherry-pick. Use when user invokes cursor:do, says delegate to cursor, have composer write it, refactor with cursor, hand a file edit to Composer.

BOOST
From plugin
claude-code-harness
3.2k23 skills5 agents5 commands
Install
$ npx -y skills add Chachamaru127/claude-code-harness --skill cursor-do --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/cursor-do

Context preview

The summary Claude sees to decide when to auto-load this skill.

Delegate a single write task to Cursor Composer via cursor-companion.sh inside an isolated worktree, then Lead-review the diff and cherry-pick. Use when user invokes cursor:do, says delegate to cursor, have composer write it, refactor with cursor, hand a file edit to Composer.

SKILL.md

cursor-do.SKILL.md
name: cursor-do
description: "Delegate a single write task to Cursor Composer via cursor-companion.sh inside an isolated worktree, then Lead-review the diff and cherry-pick. Use when user invokes cursor:do, says delegate to cursor, have composer write it, refactor with cursor, hand a file edit to Composer. Do NOT load for: planning, code review only, read-only investigation, or multi-task team runs (use breezing --cursor or cursor:ask instead)."
description-en: "Delegate a single write task to Cursor Composer via cursor-companion.sh inside an isolated worktree, then Lead-review the diff and cherry-pick. Use when user invokes cursor:do, says delegate to cursor, have composer write it, refactor with cursor, hand a file edit to Composer. Do NOT load for: planning, code review only, read-only investigation, or multi-task team runs (use breezing --cursor or cursor:ask instead)."
description-ja: "1 件の write タスクを Cursor Composer に委譲するスキル。専用 worktree (.claude/worktrees/cursor-do-<id>) を切って `cursor-companion.sh task --write --workspace <wt>` を直接呼び、Lead が diff レビュー → main へ cherry-pick → Plans.md `cc:done [hash]` 更新まで一気通貫する。Use when user mentions cursor:do, cursor で実装して, composer に書かせて, カーソルにやらせて, refactor を Cursor に, ファイル編集を Composer に. Do NOT load for: 計画 (harness-plan), レビューのみ (harness-review), 読み取り調査 (cursor:ask), 複数タスク並列 (breezing --cursor を使う)."
allowed-tools: ["Read", "Write", "Edit", "Bash", "Glob", "Grep"]
argument-hint: "[task-description]"
user-invocable: true

cursor:do — Single-Task Write Delegate to Cursor Composer

1 件の実装タスクを Cursor Composer (`composer-2.5-fast`) に専用 worktree 内で委譲し、Lead が diff をレビューしてから main へ cherry-pick する skill。breezing の team フローを起こさず、1 タスク 1 cherry-pick を最短経路で回す。

封じ込めは Cursor 側にはない ([references/cursor-cli-only.md](${CLAUDE_SKILL_DIR}/references/cursor-cli-only.md))。**専用 `.git` を持つ worktree + Lead diff review + cherry-pick (R01-R13 経路)** の 3 点だけが実効的な境界。cursor の出力は Lead レビューまで untrusted として扱う。

Step 0 — NARRATION RULES (UX Contract)

敵は **冗長さ** であって進捗報告ではない。breezing と同じ契約。**起動時に banner + 実行計画を簡潔に明示してから実行する**。見やすい進捗報告は歓迎、冗長な繰り返しのみ禁止。

起動時に必ず出すもの (banner + plan、合計 5 行以内)

🚀 cursor / composer-2.5-fast / feat/foo-bar / Add login form validation
これから:
1. pre-check (branch / cursor-agent) → 専用 worktree 作成
2. composer に実装委譲 (--write)
3. diff レビュー → cherry-pick → Plans.md 更新

banner 1 行 (`🚀 cursor / composer-2.5-fast / <branch> / <task>`) + 計画 2-4 行。1 秒以内に出し、即 Step 1 へ。

進捗報告は出してよい (見やすい範囲で)

  • 各ステップの開始・完了を 1 行ステータスで (`✓ worktree 作成: .claude/worktrees/cursor-do-...`)
  • pre-check / resolve の要点、cherry-pick した SHA
  • なぜこの分岐を取るかの理由を 1 行で

禁止 (= 冗長さ)

  • **同じ事実の 2 回言い換え**: pre-check 結果を後段で再説明しない
  • **中身のない前置き**: tool call で自明な宣言だけの行
  • **3 行以上の経緯振り返り**: 必要なら 1 行に圧縮
  • **起動シーケンス中の ★ Insight ブロック**: Insight は最終 report で 1 回のみ

違反例 (冗長):

× 「composer 2.5 で実装する流れですね、まず確認します」(中身のない前置き)
× 「Cursor を呼ぶ前に branch を見ます」 → bash → 「branch を確認しました」(言い換え)
× ★ Insight ──── Cursor の強みは…

正常例 (簡潔 + 計画明示):

🚀 cursor / composer-2.5-fast / feat/foo-bar / Add login form validation
これから: worktree 作成 → composer に実装委譲 → diff レビュー → cherry-pick

Step 1 — banner + plan を出し切る (1 秒以内)

引数 `$ARGUMENTS` をタスク説明として受ける。空なら直前の明示依頼と選択済み Plans.md を読み、対象を回収する。 それでも対象を特定できない場合だけ、以下のマーカーを出力してユーザーに 1 行タスクを要求し、入力後に Step 2 へ進む:

CURSOR_DO_AWAITING_TASK: provide a one-line task description as $ARGUMENTS

引数があれば、即 1 行 echo:

🚀 cursor / composer-2.5-fast / <current-branch> / <task-first-60-chars>

`<current-branch>` は Step 2 で取得する値だが、Step 1 では未取得のため `…` でも可。Step 2 直後に確定値を 1 行で再出力する。Step 0 の banner + 実行計画 (5 行以内) はここで出し切り、以降は各ステップの 1 行ステータスで進捗を見せる。冗長な繰り返しのみ避ける。

Step 2 — 並列 pre-check (1 bash)

1 つの bash 呼び出しで以下を並列に取り、結果だけを 1 ブロックで受ける。個別の説明は出さない。

bash -c '
  set +e
  echo "==BRANCH=="; git branch --show-current
  echo "==VERSION=="; cat VERSION 2>/dev/null
  echo "==PLANS_TAIL=="; tail -n 12 Plans.md 2>/dev/null
  echo "==CURSOR_AGENT=="
  CURSOR_AGENT_BIN="${CURSOR_AGENT_BIN:-}"
  if [ -z "$CURSOR_AGENT_BIN" ]; then
    # `agent`(公式の新表記)→ `cursor-agent`(legacy alias)の順に探す。
    # `agent` は汎用的な名前なので、symlink 解決後の実パスの「成分」に
    # cursor-agent が完全一致で現れる場合だけ採用する(部分文字列一致だと
    # /x/cursor-agent-not-really/agent のようなディレクトリ名で突破される)。
    for _c in agent cursor-agent; do
      _p="$(command -v "$_c" 2>/dev/null)" || continue
      [ -n "$_p" ] || continue
      _r="$(realpath "$_p" 2>/dev/null || readlink -f "$_p" 2>/dev/null || echo "$_p")"
      case "/$_r/" in */cursor-agent/*) CURSOR_AGENT_BIN="$_p"; break ;; esac
    done
    if [ -z "$CURSOR_AGENT_BIN" ] && [ -x "$HOME/.local/bin/cursor-agent" ]; then
      CURSOR_AGENT_BIN="$HOME/.local/bin/cursor-agent"
    fi
  fi
  if [ -z "$CURSOR_AGENT_BIN" ]; then
    echo "NOT_INSTALLED"
  else
    "$CURSOR_AGENT_BIN" --version 2>/dev/null || echo "NOT_INSTALLED"
  fi
'

判定:

  • `CURSOR_AGENT=NOT_INSTALLED` → `ERROR: cursor-agent not found (exit 3 expected from companion). Install via setup-cursor.sh.` を出し終了。
  • `BRANCH` が `main` / `master` → `WARN: on protected branch — cherry-pick target is HEAD of this branch. Confirm intent or switch.` を出し継続。

Step 3 — plugin root + backend + model resolve (1 bash)

`HARNESS_PLUGIN_ROOT` / `CLAUDE_PLUGIN_ROOT` が未設定だと `:-.` fallback が consumer repo の cwd に解決し、`scripts/cursor-companion.sh` が見えず起動不能になる (Issue #193 §2)。hooks.json と同じ `valid_root` パターンで堅牢に解決する。

bash -c '
  set -euo pipefail
  valid_root() {
    [ -n "${1:-}" ] && [ -f "$1/scripts/cursor-companion.sh" ] && { [ -f "$1/.claude-plugin/plugin.json" ] || [ -f "$1/.codex-plugin/plugin.json" ] || [ -f "$1/.cursor-plugin/plugin.json" ]; }
  }
  HARNESS_PLUGIN_ROOT="${HARNESS_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
  ROOT="$HARNESS_PLUGIN_ROOT"
  if ! valid_root "$ROOT"; then
    ROOT=""
    if [ -n "${CLAUDE_SKILL_DIR:-}" ]; then
      probe="$(cd "${CLAUDE_SKILL_DIR}" && pwd)"
      while [ "$probe" != "/" ] && ! valid_root "$probe"; do
        probe="$(cd "$probe/.." && pwd)"
      done
      valid_root "$
Read more
Ships withclaude-code-harness

Plan. Work. Review. Ship. A disciplined delivery loop for Claude Code, Codex CLI, Cursor, and Grok.

Get the whole plugin

Other skills on claude-code-harness.