skills/cursor-composer-delegation/SKILL.md
Delegate coding tasks to Cursor IDE's Composer agent via the macOS Accessibility API (cursor-compose) while acting as PM: write specs, dispatch prompts, then verify results from the working tree.
npx skillsauth add lilpacy/dotfiles cursor-composer-delegationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Act as the PM: plan and review in this session (works from any PM agent
-- Codex, Claude Code, etc.), and delegate the actual code editing to
Cursor's Composer agent (Composer model) running in the Cursor IDE.
Dispatch is done with the cursor-compose CLI, which writes directly
into the Composer textarea via the macOS Accessibility API — it does
NOT steal focus, send global keystrokes, or touch the clipboard, so the
user can keep working in other apps while prompts are dispatched.
Cursor.app is running with the Composer pane open.cursor-compose is on PATH (~/dotfiles/bin/cursor-compose), with
its compiled helper cursor-compose-ax next to it. Rebuild after
editing the source:
swiftc -O ~/dotfiles/bin/src/cursor-compose.swift -o ~/dotfiles/bin/cursor-compose-axcursor-compose-status is on PATH (~/dotfiles/bin/cursor-compose-status),
a compiled Swift helper that reports whether Composer is generating.
Rebuild after editing the source:
swiftc -O ~/dotfiles/bin/src/cursor-compose-status.swift -o ~/dotfiles/bin/cursor-compose-statusOpen the target repo in Cursor once per task:
cursor-compose --dir /path/to/repo --new "<task prompt>"
--dir opens the directory in Cursor first; --new starts a fresh
Composer chat so context from prior tasks does not leak.
Write the prompt like a work order, not a conversation:
Wait for Composer to finish, then verify from the filesystem.
Cursor edits the working tree directly. Instead of blind
fixed-interval sleep, block on the generation state:
cursor-compose-status # prints "busy" (exit 0) or "idle" (exit 1)
cursor-compose-status --wait 1200 # poll every 5s until idle (or timeout seconds)
--wait detects generation by finding Composer's inline "Stop
generation" AXButton; it requires 2 consecutive idle reads so a
brief gap between tool-calls is not mistaken for completion.
CRITICAL: dispatch is asynchronous — cursor-compose returns before
Composer starts generating. Calling cursor-compose-status --wait
too fast can observe the pre-generation idle state and return
instantly with zero diff. After dispatching, either sleep 30-45
first, or confirm cursor-compose-status prints busy before you
--wait. Once idle, verify with:
git -C /path/to/repo status --porcelain
git -C /path/to/repo diff
Run the project's tests/linters yourself to accept or reject the work. If no diff appeared, the prompt may have queued behind a still-running task (see Notes on queuing) or landed in the wrong Cursor window.
If the result is wrong, send a follow-up in the same chat
(omit --new):
cursor-compose "The test X still fails with Y. Fix it without touching Z."
When accepted, commit via the normal git-commit-workflow skill.
Control the editor state from the shell — never via UI automation:
git switch <branch> in the repo. Cursor follows
the working tree automatically (file watcher); no IDE interaction
needed and no focus is taken.cursor-compose --dir <path> (wraps
cursor <path>). An already-open worktree reuses its window.$vars, and literal \n are all safe. No shell-escaping gymnastics
needed beyond normal quoting of the argument.cursor-compose-status matches the exact AXButton description
Stop generation (Cursor's inline stop control). If a Cursor update
renames that control, --wait will report idle while Composer is
still generating. To re-derive the current name, dump Composer's
AXButton descriptions while a generation is in flight (a small Swift
walker over the Cursor AX tree filtering role == "AXButton"), find
the stop/cancel control, and update the needle list in
~/dotfiles/bin/src/cursor-compose-status.swift, then rebuild.~/dotfiles/docs/cursor-compose-ax-architecture.md.--dir runs cursor <dir>, which briefly activates Cursor (the one
focus-affecting step). Dispatching to an already-open repo is fully
interference-free.data-ai
ユーザー向けの回答、要件整理、説明、計画、レビュー、仕様、要約を作成するときに使う。自然言語だけでは条件、状態、多重度、期間、時刻、境界値、制約、推論、計算が曖昧になりうる場合、表、デシジョンテーブル、Mermaid 図、計算式、境界値表で一意化する。推測で補った図表要素は必ず明示する。
tools
Cross-agent messaging via SQLite. Send messages between Claude Code, Codex, Gemini CLI, and other agents. No daemon, no network, no dependencies beyond bash and sqlite3.
development
Anti-AI-slop design skill for greenfield pages, audits, redesigns, and design extraction from URLs or screenshots. Use when the user asks to build a new app or landing page, wants to redesign something, invokes Hallmark by name, or uses audit/redesign/study.
development
Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned.