cursor

A specialized coding agent that connects to the Cursor command-line tool for code generation, analysis, refactoring, reviews, testing, bug fixing, and Git workflows. It can retain sessions so ongoing conversations can continue.

In plain words
What is it for?
Use it for advanced code generation, multi-step analysis, security or quality reviews, refactoring, test creation, bug fixing, and Git-related work.
Why use it?
It gives complex coding tasks a dedicated workflow with context across steps, instead of treating each request as a separate one-off operation.

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/ruizrica/toolkit/cursor
Clone the repo
git clone --depth 1 https://github.com/ruizrica/toolkit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 689 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00000 $0.00689
Opus 5 $0.00000 $0.00345
Sonnet 5 $0.00000 $0.00138
Haiku 4.5 $0.00000 $0.00069

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

Security

Grade C, and why

cursor scanned grade C with 2 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- **Cursor CLI** - Auto-installed if missing: `curl https://cursor.com/install -fsS | bash`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Cursor CLI** - Auto-installed if missing: `curl https://cursor.com/install -fsS | bash`
docs/agents/cursor.md · 106 lines

How it starts

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

Cursor Agent

A specialized agent that interfaces with Cursor CLI to provide advanced code analysis and generation capabilities. Excels at leveraging Cursor's optimized default model for sophisticated code tasks with session continuity.

When to Use

  • Advanced code generation beyond simple templates
  • Complex code analysis requiring deep understanding
  • Multi-step reasoning tasks with context retention
  • Session continuity for ongoing work
  • Intelligent refactoring with pattern recognition
  • Comprehensive code reviews with multiple aspects
  • Git workflow integration

Capabilities

  • Advanced Code Generation - Sophisticated code creation using Cursor's models
  • Comprehensive Code Review - Security, performance, and quality analysis
  • Intelligent Refactoring - Smart code improvements following best practices
  • Session Management - Resume and continue previous AI conversations
  • Git Integration - Seamless workflow with version control
  • Test Generation - Creating comprehensive test suites
  • Bug Fixing - Identifying and resolving complex issues

Invocation

/toolkit:cursor-agent Review the authentication module for security vulnerabilities

Examples

Code Review:

Prompt: "Review this code for security vulnerabilities, performance issues, code quality, best practices, and potential bugs"

Refactoring:

Prompt: "Refactor this code to follow SOLID principles, improve readability, optimize performance, and add proper error handling"

Session Continuation:

Prompt: "Continue working on the payment integration we discussed in the previous session"

Command Patterns

Basic Analysis

cursor-agent -p "analyze this codebase for security vulnerabilities"

Session Management

# Resume latest conversation
cursor-agent resume

# List sessions
cursor-agent ls

# Continue specific session
cursor-agent --resume="session-id"

Read the full file on GitHub · 106 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 · 106 lines · 0 tokens per session scan C 92f95c0a8a9e

Subscribe to this mod's changes

cursor is an agent published in the GitHub repository ruizrica/toolkit (5 stars, last pushed 17d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 689 tokens. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.