Skip to content
Agentmart
Submit a tool

cursor-agent

Run Cursor Agent CLI as an independent coding agent for implementation, investigation, planning, or review in a local workspace.

Skill by ejarmand

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/ejarmand-cursor-agent

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Run Cursor Agent CLI as an independent coding agent for implementation, investigation, planning, or review in a local workspace. Use when asked to delegate work to Cursor, automate cursor-agent in headless mode, capture a Cursor session ID, or resume and continue an earlier Cursor chat.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Shell scripts

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/cursor-agent

What's inside

Skill name
cursor-agent
Description
Run Cursor Agent CLI as an independent coding agent for implementation, investigation, planning, or review in a local workspace. Use when asked to delegate work to Cursor, automate cursor-agent in headless mode, capture a Cursor session ID, or resume and continue an earlier Cursor chat.
License
MIT
Instructions
94 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (5)

  • SKILL.md
  • openai.yaml · agents/
  • cli.json · profiles/github-pr-reviewer/
  • sandbox.json · profiles/github-pr-reviewer/
  • run-profiled.sh · scripts/

SKILL.md (first lines)

# Cursor Agent

Run `cursor-agent` from the intended workspace, give it a concrete outcome, monitor it at the task's time scale, and preserve its session ID whenever follow-up work is likely.

Read `/cross-provider-agent` first and apply its doctrine to the whole dispatch; this skill is only the Cursor transport.

## Check the CLI and authentication

Treat the installed CLI help as authoritative because Cursor Agent is evolving:

```bash
cursor-agent --version
cursor-agent --help
cursor-agent status --format json
```

If authentication is missing, ask the user to run `cursor-agent login`, or use `CURSOR_API_KEY` when the user has already arranged it. Never print or embed an API key in a command.

## agent permissions

Use the least authority suitable for the task:

- Add `--mode plan` for read-only analysis and planning.
- Add `--mode ask` for read-only questions.
- Prefer `--auto-review` for ordinary agent work.
- Add `--force` only when the user authorized changes and unattended command execution is necessary.
- Use `--sandbox enabled` when the task can run within Cursor's sandbox.

## Start a worker

Run from the repository checkout or pass `--workspace /absolute/path`. For a headless task with structured progress:

```bash
cursor-agent -p --output-format stream-json --auto-review --trust \
  "[message]"
```

Drop `-p --output-format stream-json` for an interactive task.

Every `-p` run requires `--trust`, including `--mode plan` and `--mode ask`; without it the run aborts immediately with `Workspace Trust Required`.

`--auto-review` prompts for tool calls its classifier does not deem safe, and in `-p` mode no one can answer, so the run can stall. For genuinely unattended work that must run any command, add `--force` instead.

## Capture the session ID

When the ID must be known even if the first turn is interrupted, allocate it up front with `cursor-agent create-chat` and pass `--resume="$cursor_chat_id"` from the first run onward. 
Otherwise capture `session_id` from the stream's `system`/`init` event or the terminal result object.

## Resume a session

Resume with `--resume="$cursor_chat_id"` from the same workspace used to create the chat — chat discovery is workspace-scoped. Recover an unrecorded ID interactively with `cursor-agent ls` or `cursor-agent resume`.

## Monitor and verify

Poll the NDJSON log often enough to surface approval prompts promptly. On completion require
a clean exit and a successful terminal result event.

A `cursor-agent` or `gh` failure with transport errors naming the URL is the sandbox denying network, not bad credentials; rerun with the environment's required network escalation.

## Profiled dispatch

Cursor takes permission and sandbox policy only from configuration files, so 
profiled dispatch runs through the skill's transactional runner:
`/absolute/path/to/cursor-agent/scripts/run-profiled.sh`

The runner stages the profile for exactly one invocation, supervises the child, and restores the workspace byte-for-byte:

```bash
/absolute/path/to/cursor-agent/scripts/run-profiled.sh \
  --workspace /absolute/path/to/workspace \
  --profile github-pr-reviewer \
  -- -p --output-format stream-json --trust "REVIEW_TASK"
```

Use `stream-json` for unattended runs. A long review with plain `json` prints nothing until the terminal result, so the caller can't tell progress, a tool denial, or a stall apart.

While the child runs, the workspace holds the staged `.cursor/` files and the runner's `.cursor-profile-txn/` lock and journal. That has two separate effects:

- A second Cursor runner on the same workspace hits the lock and exits 75. Give each Cursor dispatch its own workspace.
- Other providers are not locked out, but their clean-tree or diff checks in that workspace see the staged state: `git status --porcelain` lists `.cursor-profile-txn/` and any staged `.cursor/` file the repo doesn't track, such as `.cursor/sandbox.json`, and shows a tracked `.cursor/cli.json` as an edit. Run them in a separate checkout, or before or after the Cursor run.

The staging has to stay in the workspace. Cursor reads the user `sandbox.json` from `~/.cursor/` regardless of `CURSOR_CONFIG_DIR`, and the workspace's own `.cursor/sandbox.json` takes priority over it, so overwriting the workspace copy is the only per-run way to stop a reviewed branch's Cursor config from widening the profile.

Run profiled dispatches with plain `-p --trust` (deny-unless-allowed), so the profile's allowlist is the whole command surface; the runner allowlists child arguments and rejects everything else.

### available profiles
**github-pr-reviewer** : `profiles/github-pr-reviewer/` encodes the profile from
`/cross-provider-agent` with `cli.json` as the canonical permissions object:
multi-word `Shell(...)` allows — live-verified but undocumented — for exactly
the profile's `gh` surface, paired with a `sandbox.json` GitHub-only network
allowlist as defense in depth.
The allowlist covers git only as `git diff`, `git log`, `git show`, and `git status`. `git rev-parse` has no allow entry, so the profile denies it.

From ejarmand/skills, MIT.

More from ejarmand/skills

Signals

Stars
1
Forks
0
Open issues
20
Last commit (this folder)
Sep 25, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ejarmand

Cite this page

cursor-agent skill. Agent Mart. https://agentmart.dev/skills/ejarmand-cursor-agent (last updated 2026-10-24)