chachamaru127/claude-code-harness/cursor-do
Claude Code and agent skill by chachamaru127/claude-code-harness
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
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).
Install
npx vskill@latest install chachamaru127/claude-code-harness/cursor-doSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as chachamaru127/claude-code-harness/cursor-do.
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)。専用 `.git` を持つ worktree + Lead diff review + cherry-pick (R01-R13 経路) の 3 点だけが実効的な境界。cursor の出力は Lead レビューまで untrusted として扱う。
Step 0 — NARRATION RULES (UX Contract)
敵は 冗長さ であって進捗報告ではない。breezing と同じ契約。起動時に banner + 実行計画を簡潔に明示してから実行する。見やすい進捗報告は歓迎、冗長な繰り返しのみ禁止。
起動時に必ず出すもの (banner + plan、合計 5 行以内)
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 回のみ
違反例 (冗長):
正常例 (簡潔 + 計画明示):
Step 1 — banner + plan を出し切る (1 秒以内)
引数 $ARGUMENTS をタスク説明として受ける。空なら直前の明示依頼と選択済み Plans.md を読み、対象を回収する。 それでも対象を特定できない場合だけ、以下のマーカーを出力してユーザーに 1 行タスクを要求し、入力後に Step 2 へ進む:
引数があれば、即 1 行 echo:
<current-branch> は Step 2 で取得する値だが、Step 1 では未取得のため … でも可。Step 2 直後に確定値を 1 行で再出力する。Step 0 の banner + 実行計画 (5 行以内) はここで出し切り、以降は各ステップの 1 行ステータスで進捗を見せる。冗長な繰り返しのみ避ける。
Step 2 — 並列 pre-check (1 bash)
1 つの bash 呼び出しで以下を並列に取り、結果だけを 1 ブロックで受ける。個別の説明は出さない。
判定:
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 パターンで堅牢に解決する。
返却値: PLUGIN_ROOT (Step 5 で使う) / BACKEND (必ず cursor) / MODEL (通常 composer-2.5-fast)。BACKEND または MODEL が空なら ERROR: backend/model resolution failed を 1 行で出して終了。PLUGIN_ROOT 解決失敗は上記スクリプトが exit 2 で報告する。
Step 4 — 専用 worktree 作成
衝突しない id を作って worktree を切る。main tree や `$HOME` を指してはならない (companion 側 guard で exit 2 になる)。WT_DIR は絶対パスで作る (Step 5 の --workspace は companion の is not a directory ガードで相対パスを exit 2 にすることがあるため、Issue #193 §4)。
返却された WT_DIR / WT_BRANCH / BASE_REF / BASE_BRANCH を以降の Step で使う。失敗時 (branch 名衝突等) は ID を作り直して 1 回だけ retry。2 回連続失敗で ERROR: worktree creation failed を出し終了。
Step 5 — cursor-companion.sh task --write で委譲
Lead が直接 companion を呼ぶ (references/cursor-cli-only.md Topology 節 — 非 claude backend では Worker 介在なし)。プロンプトは引数の task そのまま + 必要な追補のみ。冗長な前置きは付けない。
判定:
- exit 0 + result text → Step 6 へ
- exit 1 (result-error) → companion stderr を 1 行要約して
ERROR: cursor returned is_error/empty resultを出し終了。worktree は Step 8 のクリーンアップで削除 - exit 2 (bad-guard) → 設定不備。原因 (workspace 指定誤り等) を 1 行で示し終了
- exit 3 (not-found) → Step 2 で検出済みのはずだが、再度遭遇したら同様に終了
Step 6 — Lead diff review
worktree 内で Composer が作成した変更を読み、目視レビュー + contract grep の二段ゲートを通す (harness-work 「Lead の cherry-pick 前ゲート」と同じ契約)。
注意 (Issue #193 §1): Cursor Composer は --write でファイル編集を行うが commit は作らないことがある。worktree が dirty なまま放置すると Step 7 の cherry-pick 対象から漏れ、ユーザー視点で「完了したのに main に何も入らない」状態になる。本 Step 冒頭で dirty なら、既存 commit がある場合は amend、commit がない場合は Lead 側で 1 commit にまとめる。
TASK_SUMMARY は引数 task の先頭 60 文字以内に圧縮した文字列を Lead が事前に export しておく (例: TASK_SUMMARY="Add login form validation")。未設定なら fallback メッセージ cursor-do delegated change を使う。--no-verify を付けるのは worktree 内の編集を「Lead レビュー前の中間 commit」として扱うため (cherry-pick 後の main commit で R01-R13 と pre-commit hook を通す)。
Lead は diff 全文を Read し、以下を確認する:
- 変更が依頼タスクの範囲内か (関係ないファイルを触っていないか)
- protected path (
.claude-plugin/settings*,.eslintrc*, etc.) を変更していないか - secret /
.env/ 認証情報を含まないか - 公開 support tier 表記を破壊していないか。contract gates は必ず candidate worktree (
WT_DIR) 内で実行する:
``bash [ ! -f "${WT_DIR}/tests/test-support-claim-wording.sh" ] || (cd "${WT_DIR}" && bash tests/test-support-claim-wording.sh) [ ! -f "${WT_DIR}/scripts/ci/check-consistency.sh" ] || (cd "${WT_DIR}" && bash scripts/ci/check-consistency.sh) [ ! -f "${WT_DIR}/tests/validate-plugin.sh" ] || (cd "${WT_DIR}" && bash tests/validate-plugin.sh) ``
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cursor-do/SKILL.md
Popularity
- Repository stars
- 2,979
- Repository forks
- 289
- 7-day trend score
- 40
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/chachamaru127/claude-code-harness/cursor-do)