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
npx skills add prathamdby/skills --skill cursor-agent -a claude-codeWhat 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-agentin 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-agentin 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-code2Manually: put the files in place
~/.claude/skills/cursor-agent/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cursor-agent/
1Skills CLI (Vercel)
npx skills add prathamdby/skills --skill cursor-agent -a codex2Manually: put the files in place
.agents/skills/cursor-agent/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add prathamdby/skills --skill cursor-agent -a cursor2Manually: put the files in place
.cursor/skills/cursor-agent/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install prathamdby/skills skills/engineering/cursor-agent2Manually: put the files in place
.github/skills/cursor-agent/SKILL.md1Skills CLI (Vercel)
npx skills add prathamdby/skills --skill cursor-agent -a gemini-cli2Platform CLI
gemini skills install https://github.com/prathamdby/skills --path skills/engineering/cursor-agentManually: put the files in place
.devin/skills/cursor-agent/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add prathamdby/skills --skill cursor-agent -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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