一键导入
cursor-subagent
Alpha and unstable. Cursor CLI currently shows anomalies in subagent workflows, so this skill is not recommended for normal use.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Alpha and unstable. Cursor CLI currently shows anomalies in subagent workflows, so this skill is not recommended for normal use.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run Claude Code CLI as a subagent for code tasks, review, validation, and implementation. Supports sync, async, parallel, and resume workflows with tiered output management.
Run OpenAI Codex CLI as a subagent for code tasks, review, validation, and implementation. Supports sync, async, parallel, and resume workflows with tiered output management.
Run GitHub Copilot CLI as a subagent for code tasks, validation, review, and implementation. Works with enterprise Copilot subscriptions. Multi-model access including Claude, GPT, and Gemini.
| name | cursor-subagent |
| description | Alpha and unstable. Cursor CLI currently shows anomalies in subagent workflows, so this skill is not recommended for normal use. |
Alpha and unstable.
Cursor CLI currently shows anomalies in subagent workflows. Prefer Claude, Codex, or Copilot subagent skills instead. Do not recommend this skill for normal use unless you are explicitly testing Cursor-specific behavior.
Run Cursor Agent (cursor-agent -p) as a subagent for code-related tasks.
Avoid for:
cursor-agent CLI installedcursor-agent whoami)jq installed--trustThis skill does not hard-code expected model or mode defaults.
Cursor config can vary by machine and account state. Treat the installed Cursor CLI as the source of truth and pass flags explicitly when you need a specific model, execution mode, or autonomy level.
Always write full stream JSONL for each run. Only read into context what you need.
cursor-result exec runs Cursor with --output-format stream-json, saves the full event stream beside the saved Cursor transcript, and returns only the final assistant text by default.
cd /path/to/project && cursor-result exec "prompt"
cursor-result messages
cursor-result session-id
cursor-result usage
cursor-result commands
cursor-result tools
cursor-result reasoning
cursor-result summary
Use ~/.claude/skills/cursor-subagent/scripts/cursor-result for all operations:
cursor-result exec "prompt"
cursor-result --json exec "prompt"
cursor-result last [session-id]
cursor-result messages [session-id]
cursor-result session-id [session-id]
cursor-result tools [session-id]
cursor-result commands [session-id]
cursor-result reasoning [session-id]
cursor-result usage [session-id]
cursor-result summary [session-id]
For automated callers, prefer cursor-result --json exec ... and carry the returned session_id
forward explicitly. Treat cursor-result session-id as a convenience for human workflows.
For machine-readable workflows, the safest pattern is to redirect --json exec output to a file and
then read fields with jq. Tool-using Cursor sessions can still emit PTY-dependent noise in some
caller setups, and file redirect remains the most reliable pattern.
# Safe pattern
cursor-result --json exec "prompt" > /tmp/cursor-result.json 2>/dev/null
SID="$(jq -r '.session_id' /tmp/cursor-result.json)"
RESULT="$(jq -r '.result' /tmp/cursor-result.json)"
# Less reliable for tool-using sessions in PTY-heavy wrappers
json="$(cursor-result --json exec 'prompt' 2>/dev/null)"
cd /path/to/project && cursor-result exec "your prompt"
If you're calling this from an outer Bash tool that already supports run_in_background, do not also add shell &.
Use one backgrounding mechanism, not both.
cd /path/to/project && cursor-result exec "your prompt" > /tmp/cursor-async.txt 2>/dev/null &
echo "PID=$!"
Check completion and retrieve result:
jobs -l
cat /tmp/cursor-async.txt
cursor-result last
cd /path/to/project
cursor-result exec "task A" > /tmp/cursor-a.txt 2>/dev/null &
PID_A=$!
cursor-result exec "task B" > /tmp/cursor-b.txt 2>/dev/null &
PID_B=$!
wait $PID_A $PID_B
cat /tmp/cursor-a.txt
cat /tmp/cursor-b.txt
Cursor parallelism is runtime-dependent. In testing, same-cwd concurrent runs usually worked, but some environments appear to serialize or hang when two Cursor agents start against the same working directory at once. If parallel work matters, prefer separate working directories or worktrees and treat same-cwd parallel runs as best-effort rather than guaranteed.
cd /path/to/project && cursor-result exec "follow-up prompt" --resume "$(cursor-result session-id)"
Cursor does not expose the same fine-grained tool allowlist model as Claude Code or Copilot CLI.
Use --mode plan or --mode ask when you want to bias the runtime away from edits.
cd /path/to/project && cursor-result exec "Plan how to add rate limiting" --mode plan
cd /path/to/project && cursor-result exec "Implement the requested fix and update tests" --trust
If you need more aggressive command execution:
cd /path/to/project && cursor-result exec "Run the tests, fix failures, and summarize the result" --trust --force
Pass these after the prompt when using cursor-result exec:
# Different model
cursor-result exec "prompt" --model sonnet-4
# Planning / read-only-ish mode
cursor-result exec "prompt" --mode plan
# Resume a specific session
cursor-result exec "prompt" --resume <session-id>
# Workspace override
cursor-result exec "prompt" --workspace /path/to/project
# More autonomous execution
cursor-result exec "prompt" --trust --force
cursor-result exec "your prompt here"
cursor-result exec "$(cat <<'EOF'
Task: Review authentication module
Scope: src/auth/
Constraints: No changes, analysis only
Report issues with severity [P1], [P2], [P3].
EOF
)"
Let Cursor read files itself:
cursor-result exec "Read src/auth/login.ts and identify security issues"
Cursor persists transcripts at:
~/.cursor/projects/<cwd-with-leading-slash-removed-and-slashes-replaced-by-dashes>/agent-transcripts/<session-id>/<session-id>.jsonl
cursor-result exec also saves the richer stream JSONL beside the transcript as:
<session-id>.stream.jsonl
For automation, prefer explicit session IDs captured from --json exec instead of resolving the latest session by cwd.
cursor-agent -p --output-format json returns a final result object, but it can concatenate intermediate assistant text in ways that are less useful for subagent extraction.cursor-result uses stream-json by default so it can reliably capture tool calls, command attempts, and the final result.cursor-result reasoning returns text only if the runtime emits it.