A skill that provides guidance on the Cursor ↔ Claude Code 2-agent workflow.
Trigger phrase
This skill is triggered by the following phrases:
- "Tell me about the workflow"
- "How do I collaborate with Cursor?"
- "Tell me the work flow"
- "How should I proceed?"
- "how does the workflow work?"
- "explain 2-agent workflow"
Overview
This skill explains the division of roles and collaboration method between Cursor (PM) and Claude Code (Worker).
2-agent workflow
Division of Roles
| Agent | Role | Responsibility |
|---|---|---|
| Cursor | PM (Project Manager) | Task assignment, review, production deployment decisions |
| Claude Code | Worker (worker) | Implementation, testing, CI fixes, staging deployment |
Workflow Diagram
┌─────────────────────────────────────────────────────────┐
│ Cursor (PM) │
│ ・タスクを Plans.md に追加 │
│ ・Claude Code に作業を依頼(/handoff-to-claude) │
│ ・完了報告をレビュー │
│ ・本番デプロイの判断 │
└─────────────────────┬───────────────────────────────────┘
│ タスク依頼
▼
┌─────────────────────────────────────────────────────────┐
│ Claude Code (Worker) │
│ ・/work でタスク実行(並列実行対応) │
│ ・実装 → テスト → コミット │
│ ・CI 失敗時は自動修正(3回まで) │
│ ・/handoff-to-cursor で完了報告 │
└─────────────────────┬───────────────────────────────────┘
│ 完了報告
▼
┌─────────────────────────────────────────────────────────┐
│ Cursor (PM) │
│ ・変更内容を確認 │
│ ・staging 動作確認 │
│ ・本番デプロイ実行(承認後) │
└─────────────────────────────────────────────────────────┘
Task Management with Plans.md
Marker List
| Marker | Meaning | Setter |
|---|---|---|
pm:依頼中 |
Requested by PM (compatible: cursor:依頼中) | PM(Cursor/PM Claude) |
cc:TODO |
Claude Code not started | Either |
cc:WIP |
Claude Code in progress | Claude Code |
cc:完了 |
Claude Code completed | Claude Code |
pm:確認済 |
PM confirmation completed (compatible: cursor:確認済) | PM(Cursor/PM Claude) |
cursor:依頼中 |
(compatible) synonymous with pm:依頼中 | Cursor |
cursor:確認済 |
(compatible) synonymous with pm:確認済 | Cursor |
blocked |
Blocked | Either |
Task State Transitions
pm:依頼中 → cc:WIP → cc:完了 → pm:確認済
Main Commands
Claude Code Side
| Command | Purpose |
|---|---|
/harness-init |
Project setup |
/plan-with-agent |
Planning / task decomposition |
/work |
Task execution (supports parallel execution) |
/handoff-to-cursor |
Completion report (to Cursor PM) |
/sync-status |
Status check |
Skills (auto-triggered in conversation)
| Skill | Trigger Examples |
|---|---|
handoff-to-pm |
"Report completion to PM" |
handoff-to-impl |
"Pass it to the implementer" |
Cursor Side (Reference)
| Command | Purpose |
|---|---|
/handoff-to-claude |
Request a task to Claude Code |
/review-cc-work |
Review of completion report |
CI/CD rules
Scope of Responsibility for Claude Code
- ✅ Up to staging deploy
- ✅ Automatic fixes when CI fails (up to 3 times)
- ❌ Production deployment is prohibited
The 3-Times Rule
If CI fails 3 times in a row:
- Stop automatic fixes
- Generate an escalation report
- Leave the decision to Cursor
Frequently Asked Questions
Q: What if Cursor is not available?
A: Even when working alone, it is recommended to manage tasks with Plans.md. Please perform production deployment manually and carefully.
Q: What if the task is unclear?
A: Ask Cursor to confirm, or/sync-status use this to organize the current situation.
Q: What if CI fails repeatedly?
A: Do not automatically fix it 3 or more times; escalate to Cursor.
Related Documents
- AGENTS.md - Detailed division of roles
- CLAUDE.md - Claude Code-specific settings
- Plans.md - Task management file