agent

agent is a command for Claude Code from felipeinf/cursor-for-claude. It costs 16 tokens per session (1,043 once invoked), scanned A, original, MIT.

A command that sends a task to Cursor's coding subagent, which works in the background by default.

In plain words
What is it for?
Use it to forward a coding request to the cursor-agent subagent, optionally including a short summary of the current session.
Why use it?
It lets you delegate coding work to Cursor while preserving the command's supplied task and optional session context.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the cursor plugin — 2 skills, 5 commands, 1 agent shipped together

Good fit Use it to forward a coding request to the cursor-agent subagent, optionally including a short summary of the current session.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add felipeinf/cursor-for-claude
Claude Code
/plugin install cursor

Made for: Claude Code.

Or install cursor, the plugin that ships this one along with the rest of its 2 skills, 5 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent

README.md
[![agentmods](https://agentmods.dev/badge/commands/felipeinf/cursor-for-claude/agent/github.svg)](https://agentmods.dev/commands/felipeinf/cursor-for-claude/agent)
Your own site
<a href="https://agentmods.dev/commands/felipeinf/cursor-for-claude/agent"><img src="https://agentmods.dev/badge/commands/felipeinf/cursor-for-claude/agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent

Your own site · 80×15
<a href="https://agentmods.dev/commands/felipeinf/cursor-for-claude/agent"><img src="https://agentmods.dev/badge/commands/felipeinf/cursor-for-claude/agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 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,043 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00016 $0.01043
Opus 5.5 $0.00006 $0.00417
Sonnet 5.5 $0.00003 $0.00209
Haiku 4.5 $0.00002 $0.00104

Measured 3mo ago against content hash 502aca3e0f1a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent 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 3mo 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.

plugins/cursor/commands/agent.md · 68 lines

How it starts

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

Invoke the cursor:cursor-agent subagent via the Agent tool (subagent_type: "cursor:cursor-agent"), forwarding the natural-language prompt as described below (raw task text with routing flags stripped, or the combined context-plus-task string when --context was used). The final user-visible response must be Cursor's output verbatim.

Raw user request: $ARGUMENTS

Context flag:

  • If the request includes --context, handle it only in this command. Do not forward --context to the subagent or to task.
  • Before anything else below, if --context was present: build a short (~5 lines, one per field) context block from this Claude session’s recent conversation and prepend it to the user’s task text. Use that combined string as the natural-language prompt passed to the subagent. Remove --context from both routing flags and task text.
  • Fixed template:
## Context (from Claude session)
- Goal: <one line>
- Recent decisions: <one line>
- Files touched: <comma-separated paths, or "n/a">
- Current state: <one line>
- Open question / blocker: <one line, or "none">

## Task
<original user task text>
  • Block rules: facts already stated in the conversation only; no invention. No literal transcript, no code snippets, no secrets, keys, or tokens. If a field does not apply, use n/a or none. If nothing concrete exists to summarize (e.g. first message in session), omit the context block and tell the user briefly before continuing.
  • If the user combines --context with --continue or --resume, still prepend the block as above.
  • --context is exclusive to this slash command and is never a cursor-agent or companion flag.

Execution mode:

  • If the request includes --wait, run the cursor:cursor-agent subagent in the foreground.
  • Otherwise (no flag or explicit --background), run the cursor:cursor-agent subagent in the background. Background is the default.
  • --background and --wait are execution flags for Claude Code. Do not forward them to task, and do not treat them as part of the natural-language task text.
  • --model, --mode, and --read-only are runtime flags. Preserve them for the forwarded task call, but do not treat them as part of the natural-language task text.
  • --context is handled only here (see Context flag); never forward it to task.
  • If the request includes --continue, --resume <id>, or --fresh, do not ask whether to continue. The user already chose.
  • Otherwise, before starting Cursor, check for a resumable thread from this Claude session by running:
node "${CLAUDE_PLUGIN_ROOT}/scripts/cursor-companion.mjs" task-resume-candidate --json
  • If that helper reports available: true, use AskUserQuestion exactly once to ask whether to continue the current Cursor thread or start a new one.
  • The two choices must be:
    • Continue current Cursor thread
    • Start a new Cursor thread
  • If the user is clearly giving a follow-up instruction such as "continue", "keep going", "resume", "apply the top fix", or "dig deeper", put Continue current Cursor thread (Recommended) first.
  • Otherwise put Start a new Cursor thread (Recommended) first.
  • If the user chooses continue, add --continue before routing to the subagent.
  • If the user chooses a new thread, add --fresh before routing to the subagent.
  • If the helper reports available: false, do not ask. Route normally.

Operating rules:

  • The subagent is a thin forwarder only. It should use one Bash call to invoke node "${CLAUDE_PLUGIN_ROOT}/scripts/cursor-companion.mjs" task ... and return that command's stdout as-is.
  • Return the Cursor companion stdout verbatim to the user.
  • Do not paraphrase, summarize, rewrite, or add commentary before or after Cursor’s stdout (except building the optional session context block when --context was requested).
  • Default to write-capable runs. --read-only suppresses --force.
  • If the helper reports that Cursor is missing or unauthenticated, stop and tell the user to run /cursor:setup.
  • If the user did not supply a request, ask what Cursor should investigate or fix.

Read the full file on GitHub · 68 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. 3mo ago First seen · 68 lines · 16 tokens per session scan A 502aca3e0f1a

Subscribe to this mod's changes

agent is a command published in the GitHub repository felipeinf/cursor-for-claude (7 stars, last pushed 7mo ago), licensed MIT. It adds 16 tokens to every session and 1,043 once invoked, about $0.0001 per session on Opus 5.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-31.

Related

agent compared with commands from other repositories

agent next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agentfelipeinf/cursor-for-claudeCommand77mo agoMITA16Claude Code
postspencermarx/open-code-reviewCommand39621d agoApache-2.0A11Claude Code
showspencermarx/open-code-reviewCommand39621d agoApache-2.0A7Claude Code
historyspencermarx/open-code-reviewCommand39621d agoApache-2.0A6Claude Code
ocrMidnightDarling/collateCommand103d agoApache-2.0A15Claude Code
rfcluca-mastrostefano/agent-native-setupCommand7todayMITA12Claude Code
pn-delightperniemann/pnCoreCommand0yesterdayMITA30Claude Code, Cursor