Skip to main content
skill CX Codex

cursor-agent — Claude Code skill: run and install

A skill for Claude Code, Codex, and Cursor runs the local cursor-agent CLI and checks its outcome. It handles tasks involving CLI modes, sessions, and worktrees.

MIT 347 installs ★ 6 updated 2026-11-10

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add prathamdby/skills --skill cursor-agent -a claude-code
Open on GitHub

What cursor-agent does

The skill checks whether cursor-agent is available and authenticated, builds a command for the chosen workspace, then inspects status and changes after the process exits. For edited executable code, it runs the narrowest relevant tests.

Requests select the mode: planning and Q&A avoid writes, while interactive mode leaves the dialog to the user. The skill can select a model or JSON output, resume a session, or create a worktree. It waits for exit or the recorded deadline; quiet output alone does not mean the process is stuck.

If the CLI needs authentication, execution is blocked unless login was requested. Plan and ask runs must leave the tree unchanged. On failure, the skill captures stderr and inspects the files.

What it helps with

  • run local cursor-agent in a specified workspace
  • resume a CLI session by ID or continue the current one
  • request a plan or Q&A run without changing files
  • create a worktree for parallel work and record its path
  • inspect the diff and run relevant tests after a CLI task

Example prompts for the agent

  • Run cursor-agent in this workspace and fix the error handling.
  • Resume session abc123, then inspect the changes and run tests.
  • Create a worktree for the authentication task and record the path returned by the CLI.

How to install cursor-agent

1Skills CLI (Vercel)

npx skills add prathamdby/skills --skill cursor-agent -a claude-code

2Manually: put the files in place

~/.claude/skills/cursor-agent/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/cursor-agent/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about cursor-agent

How do I install cursor-agent in Claude Code?

Run npx skills add prathamdby/skills --skill cursor-agent -a claude-code. The skill file is at ~/.claude/skills/cursor-agent/SKILL.md.

What does cursor-agent do?

It manages local cursor-agent CLI runs, choosing options for the requested mode and task. Afterward, it checks status and diffs, and runs relevant tests for changed executable code.

Can cursor-agent run without changing files?

Yes. Planning uses --plan, while Q&A uses --mode ask; both omit --yolo. The skill also verifies that the workspace tree stayed unchanged.

Source text

SKILL.md · MIT
---
name: cursor-agent
description: >
  When the user wants the local cursor-agent CLI run, its installation or login changed, its connected tools changed, or a Cursor worker started.
---

# Cursor Agent

## Options and boundaries

Default: `cursor-agent --print --trust --yolo --workspace <abs-dir> "<prompt>"`,
mode/model omitted, text output, parent wait 15m. Calling this skill authorizes
that run: pass `--trust` and `--yolo` without asking. Print alone can write.
"Plan" / "read-only plan" adds `--plan` and omits `--yolo`. "Ask" / "Q&A" adds
`--mode ask` and omits `--yolo`. Both stay read-only, still pass `--trust`, and
wait until exit. "Use <model>" adds `--model`. "Interactive" / "TUI" omits
print, `--trust`, and `--yolo`; the user owns that dialog.
"Resume <id>" adds `--resume`; "continue" adds `--continue`; both wait until
exit and keep the same trust/yolo choice as the selected mode.
"Worktree [name]" adds `--worktree [name]`; record the printed path.
"JSON" / "stream-json" selects that print format. Ambiguity is `BLOCKED`.

Add sandbox disabled, approve-mcps, or a worker desktop/credential flag only
when the user names that control. Auto-review is explicit opt-in. Do not stop
to confirm trust or yolo, and do not add those extra flags after a failure.

## 1. Resolve

Fix workspace, prompt, mode, session/worktree, output, and wait.
Check binary and `cursor-agent status --format json` without exposing secrets.
Missing binary → follow `references/install.md`; missing auth → `BLOCKED`
unless login was requested.
Record `cmd | workspace | mode | session | worktree | wait | evidence | terminal`.
Done when target, binary, auth, and the trust/yolo choice are fixed.

## 2. Run

Build argv and quote the prompt literally. Text/json may be quiet until
exit; silence is not a hang. Wait until exit or the recorded deadline;
kill only this run's PID at that deadline. Nonzero exit: capture stderr,
inspect the tree, report `BLOCKED`. On `Workspace Trust Required` for a
print run, rerun that argv with `--trust` if it was missing. Leave a TUI
on its user-owned dialog. Do not ask the user and do not add sandbox, MCP,
or worker flags.

For JSON/stream output, follow `references/streaming.md`.
For resume, continue, or persist, follow `references/sessions.md`.
For worktrees/parallel runs, follow `references/worktrees.md`.
For a TUI or other command syntax, follow `references/management.md`.
For login, MCP, plugins, workers, or Bedrock, apply the matching branch in
`references/integrations.md`. On rejected syntax, use scoped `--help`.
Done when the process exits, an intended live session is recorded, or a
failure is reported.

## 3. Verify and report

Inspect status and diff; CLI text is unverified. Run the narrowest covering
tests for edited executable code. Plan/ask must leave the tree unchanged.
Check each worktree and any integrated tree. Clean up only sessions and clean
worktrees this run created unless kept; preserve shell integration, MCP,
plugins, and workers. Report command, mode, session/worktree, wait, and
outcome evidence. Done when each outcome is observed or blocked with evidence.

Terminals: `SUCCESS`, `NO_CHANGES`, `BLOCKED`.

© prathamdby · MIT · prathamdby/skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set19

The whole set →
fix-pr fix-pr — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode handles pull request review comments and failed checks. It traces each finding, applies supported fixes, and can push changes when enabled. CX Codex +1 621installs orchestrate The orchestrate skill for Claude Code splits work among subagents; the parent agent sets scope, verifies results, and integrates them without editing product files or delegating its duties. CX Codex +1 618installs recon The recon Claude Code skill reads, creates, or refreshes a saved repository map. It keeps that map outside the project and backs its claims with evidence. CX Codex +1 603installs gh The gh skill lets an agent inspect PRs, discussions, and CI, post replies, and handle GitHub commands that need more than a simple call. CX Codex +1 420installs codex Runs the local Codex CLI when the agent asks. Triggers when a task requires calling Codex CLI with specific flags and no manual approvals. CX Codex +1 331installs claude-code This Claude Code skill runs the local CLI with selected options and checks the result. It also handles requests to change installation, sign-in, or connected tools. CX Codex +1 329installs upfront-design upfront-design — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode that runs structured design sessions before any code is written. It pauses after each of five phases until the user approves the output. CX Codex +1 321installs todoist-task Creates Todoist tasks directly from your editor. Recognises task requests, resolves project and date details, shows a preview before creating, and verifies the result in Todoist. CX Codex +1 315installs

Project sponsors

Companies that keep this analytics open