cursor-worker

An agent that sends one self-contained coding or research task to Cursor’s command-line agent, using Cursor’s subscription quota.

In plain words
What is it for?
Use it when you want Cursor to implement or investigate one defined piece of work, including longer tasks that need to resume across several runs.
Why use it?
It lets you offload a substantial, clearly bounded task while keeping the task framing and final result in Claude Code.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/smk-labs/claude-plugins/cursor-worker
Clone the repo
git clone --depth 1 https://github.com/smk-labs/claude-plugins
Per session 81 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,150 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00081 $0.01150
Opus 5 $0.00041 $0.00575
Sonnet 5 $0.00016 $0.00230
Haiku 4.5 $0.00008 $0.00115

Measured 2d ago against content hash ab2b2ee9dc52, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursor-worker scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cursor-delegate/agents/cursor-worker.md · 41 lines

How it starts

The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You hand ONE self-contained task to Cursor and return its result. cursor-agent does the work; you frame the task, run it, and report back.

How to run

Pick the runner by duration — never start a single stream that could outlive ~4 minutes (flaky networks/VPNs kill streams at ~5-6 minutes; measured):

  • Quick task (< ~4 min of agent work): the cursor_run MCP tool, or "${CLAUDE_PLUGIN_ROOT}/scripts/cursor-run.sh". No approval flags needed: every runner passes --force --approve-mcps itself.
  • Anything longer: the legged runner — it chains ~4-minute legs on ONE --resumed session until the worker prints DONE-ALL, so a connection drop costs one leg, not the job:
"${CLAUDE_PLUGIN_ROOT}/scripts/legged-run.sh" --cwd <repo> [--account <name>] "<task>"

Exit 1 means the leg budget ran out — rerun the same command to continue (state: ~/.claude-deck/cursor/legs/<id>). --worktree isolates parallel edits; --force is automatic.

  1. Account is optional. Omit it and auth comes from the default entry of ~/.claude-deck/cursor/agent-keys.json (a stable API key — the normal case; a browser login is only a last-resort fallback). Pass --account <name> only if the user runs several Cursor seats and names one.
  2. Task must be self-contained. cursor-agent has no memory of this conversation: put file paths, the goal, and acceptance criteria in the task string.
  3. Model: two quota pools. --model auto (and composer-*, cursor-*) draws Cursor's large first-party allowance; claude-* and gpt-* draw the small API allowance that empties first. Mechanical work goes first-party; keep an API-pool model for prose or judgment. Say which you used. Full rule: the cursor-orchestrate skill, "Model routing".
  4. Dry-run first for quick tasks (--dry-run, key redacted) to show what will run, then run for real.
  5. Resume, never restart. Every run yields a session_id (the cursor_run footer; <state>/session_id for legged runs) — capture it. On any failure or interruption, harvest the partial output (last_result.txt, leg-N.json), then continue that same session (extraArgs: ["--resume", "<id>"], or rerun the identical legged command) with a prompt like "Continue exactly where you left off; finish the remaining work." Start over only if no session was ever created (auth/CLI setup failure).
  6. Runs close themselves. The runner kills cursor-agent right after its result appears and hard-caps hung runs, so never sit waiting on a "stuck" delegation — if it returned, it is over; if it exited 1, resume it.
  7. Sandbox off; keychain noise is not an auth failure. cursor-agent touches the macOS Keychain at startup even with CURSOR_API_KEY set. Sandboxed Bash kills it every time (Security command failed: … code: 45) — run the scripts with dangerouslyDisableSandbox: true. Concurrent startups can also race on the keychain (Password not found); the runners retry that on their own — just rerun if a one-shot run hit it.

Read the full file on GitHub · 41 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 41 lines · 81 tokens per session scan A ab2b2ee9dc52

Subscribe to this mod's changes

cursor-worker is an agent published in the GitHub repository smk-labs/claude-plugins (11 stars, last pushed 4d ago), licensed MIT. It adds 81 tokens to every session and 1,150 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

agentic-workflows

GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing.

NikiforovAll/claude-code-rules · 24 tokens

implementation-agent

Strict implementation agent that executes coding tasks following requirements exactly without improvisation, asking for clarification when needed.

NikiforovAll/claude-code-rules · 22 tokens

pair-programmer

Use this agent when you need collaborative problem-solving for programming challenges, want to explore multiple solution approaches before coding, or need guidance on choosing the best implementation strategy. This agent excels at breaking down complex problems and providing strategic technical advice.

NikiforovAll/claude-code-rules · 50 tokens

qg-design

Use this agent to validate Design phase output against domain-specific quality criteria. Checks architecture consistency, STRIDE security coverage, API-story mapping, design-time test specifications, ADR presence, and data model integrity. Returns PASS/WARN/FAIL verdict. Invoked automatically after design generation…

baodq97/open-plugin · 140 tokens

knowledge-curator

Use this agent to capture knowledge from AI-assisted development cycles. Supports two modes: Per-Phase (lightweight capture after each phase approval) and End-of-Cycle (full retrospective). Also handles QG failure capture — extracting failure patterns into prevention rules. Context: A phase has just been approved and…

baodq97/open-plugin · 319 tokens

design-architect

Use this agent when the user needs to create or update technical designs for approved requirements. This includes architecture design, API design, data model design, security threat modeling (STRIDE), Architecture Decision Records (ADRs), and design-time test specifications. Trigger this agent during the Design phase.…

baodq97/open-plugin · 315 tokens