Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

cursor-agent-cli

Cursor Agent CLI integration - AI-powered coding agent for terminal. Use when user mentions Cursor Agent, agent CLI, AI coding, code generation, refactoring,...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 211 · 2 current installs · 2 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description match the declared requirements (the skill needs the 'agent' and 'cursor' CLI tools). The included helper scripts and examples only call the agent binary and refer to workspace/git operations appropriate for a coding assistant.
Instruction Scope
SKILL.md and the scripts direct the agent CLI to analyze and modify code, use cloud/background execution, and accept API keys/custom headers. These are in-scope for a coding agent, but several examples (--force / --yolo / --trust, cloud mode) can cause the agent to make automated changes or send tasks to Cursor's cloud — users should understand these behaviors before using them.
Install Mechanism
There is no install spec; SKILL.md recommends installing via curl https://cursor.com/install | bash, which is an expected vendor install URL (cursor.com). The recommendation to pipe a remote install script to a shell is common but carries the usual risk of running remote code—this is a vendor-provided URL, not an unknown shortener or IP.
Credentials
The manifest does not require env vars, but SKILL.md shows examples using CURSOR_API_KEY and custom headers. This is reasonable for a CLI that connects to a cloud service, but providing such keys grants the Cursor service access to your account and possibly to code/data sent to the cloud — only supply keys you trust and scope them appropriately.
Persistence & Privilege
always is false and the skill does not request to be forcibly installed or to modify other skills/configs. Helper scripts are local wrappers that invoke the agent binary; they don't change system-wide settings.
Assessment
This skill appears to be what it says: a wrapper/integration for the Cursor 'agent' CLI. Before installing or using it: 1) Verify you obtain the 'agent' binary from the official Cursor site (https://cursor.com) rather than an untrusted source. 2) Be cautious with examples that use --force / --yolo / --trust or run cloud mode — those can make automated changes or send work to Cursor's servers and may expose code. 3) Only set CURSOR_API_KEY or Authorization headers if you understand the permissions of that key and trust the service. 4) Review the helper scripts (scripts/cursor-agent.sh) locally — they only call the agent binary but check they are unchanged. 5) If you need a higher-assurance install, prefer obtaining the CLI through official releases or package managers documented by Cursor rather than piping arbitrary install scripts into a shell.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk97cecttmftq22dsdrjervne4s82af6x

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

Binsagent, cursor

SKILL.md

Cursor CLI Integration Skill

🤖 Cursor Agent - AI-powered coding assistant directly in your terminal.

What is Cursor CLI?

Cursor provides two CLI tools:

  1. cursor - Editor launcher (like code for VS Code)
  2. agent ⭐ - Interactive AI coding assistant with full tool access

Installation

# macOS, Linux, WSL
curl https://cursor.com/install -fsS | bash

# Windows PowerShell
irm 'https://cursor.com/install?win32=true' | iex

# Verify installation
agent --version

Quick Start

Interactive Mode

# Start interactive session
agent

# Start with initial prompt
agent "refactor the auth module to use JWT tokens"

# Resume latest session
agent resume

# Continue previous session
agent --continue

# List all sessions
agent ls

Non-Interactive Mode (Scripts/CI)

# Run with specific prompt
agent -p "find and fix performance issues" --model "gpt-5.2"

# Code review
agent -p "review these changes for security issues" --output-format text

# JSON output for parsing
agent -p "analyze this codebase structure" --output-format json

Modes

ModeDescriptionUsage
AgentFull access - can modify codeDefault
PlanRead-only planning and analysis--plan or /plan
AskQ&A without making changes--mode=ask or /ask

Switch modes mid-conversation

/plan        # Switch to plan mode
/ask         # Switch to ask mode
Shift+Tab    # Toggle plan mode

Cloud Agent (Background Execution)

Run tasks in the cloud while you're away:

# Start in cloud mode
agent -c "refactor the auth module and add comprehensive tests"

# Send to cloud mid-conversation
& refactor the auth module and add comprehensive tests

Track at: cursor.com/agents

Models

# List available models
agent --list-models

# Use specific model
agent --model "gpt-5.2"
agent --model "sonnet-4"
agent --model "sonnet-4-thinking"

Advanced Options

Force Mode (Auto-approve)

# Auto-approve all commands
agent --force "build the feature"
agent --yolo "build the feature"  # Alias

Sandbox Control

# Enable/disable sandbox
agent --sandbox enabled
agent --sandbox disabled

# Interactive sandbox menu
/sandbox

Workspace & Worktree

# Specify workspace
agent --workspace /path/to/project

# Start in isolated git worktree
agent -w feature-branch
agent --worktree feature-branch --worktree-base main

Custom Headers & API Key

# Set API key
export CURSOR_API_KEY="your-key"
agent --api-key "your-key"

# Add custom headers
agent -H "X-Custom-Header: value"

Output Formats

# Text output (default)
agent -p "analyze code" --output-format text

# JSON output
agent -p "list functions" --output-format json

# Streaming JSON
agent -p "generate code" --output-format stream-json --stream-partial-output

Authentication

# Login
agent login

# Check status
agent status
agent whoami

# Logout
agent logout

Session Management

# Create new empty chat
agent create-chat

# Resume specific chat
agent --resume="chat-id-here"

# Resume latest
agent resume
agent --continue

Cursor Rules Generation

# Interactive rule generation
agent generate-rule
agent rule

MCP (Model Context Protocol) Management

# Manage MCP servers
agent mcp

# Auto-approve MCP servers
agent --approve-mcps

Shell Integration

# Install shell integration
agent install-shell-integration

# Uninstall
agent uninstall-shell-integration

Use Cases

1. Code Refactoring

agent "refactor the authentication module to use modern patterns"

2. Bug Fixing

agent -p "find and fix the memory leak in server.js"

3. Feature Development

agent "implement user profile editing with validation"

4. Code Review

# Review uncommitted changes
git diff | agent -p "review these changes for security issues"

# Review specific file
agent "review api/auth.js for security vulnerabilities"

5. Documentation

agent "add comprehensive JSDoc comments to all functions"

6. Testing

agent "generate unit tests for the auth module with 90% coverage"

7. Performance Optimization

agent "analyze and optimize database queries in user-service.js"

8. Migration

agent "migrate from Express to Fastify maintaining all functionality"

CI/CD Integration

#!/bin/bash
# .github/workflows/code-review.yml

# Automated code review on PR
agent -p "review changed files for security and performance issues" \
  --output-format json \
  --trust \
  > review-report.json

Best Practices

✅ Do

  • Use --plan mode first for complex changes
  • Review proposed changes before approving
  • Use --workspace to specify project directory
  • Save important sessions (they auto-save)
  • Use --force only in trusted environments

❌ Don't

  • Use --yolo on production code without review
  • Share your API key
  • Run in untrusted workspaces with --trust
  • Ignore security warnings

OpenClaw Integration

Call agent from OpenClaw

// Interactive session
exec({ command: "agent 'refactor auth module'", pty: true })

// Non-interactive
exec({ command: "agent -p 'analyze code' --output-format json" })

Use in subagents

When spawning coding agents, you can use Cursor agent as an alternative:

sessions_spawn({
  runtime: "acp",
  agentId: "cursor",  // If configured
  task: "Refactor authentication module"
})

Troubleshooting

Check version

agent --version

Update to latest

agent update

View system info

agent about

Authentication issues

# Re-authenticate
agent logout
agent login

Workspace trust

If prompted about workspace trust in headless mode:

agent --trust -p "your prompt"

Configuration

Cursor agent reads from:

  • ~/.cursor/ - Configuration and cache
  • ~/.cursor/worktrees/ - Git worktrees
  • Environment variables: CURSOR_API_KEY, NO_OPEN_BROWSER

Keyboard Shortcuts (Interactive Mode)

ShortcutAction
Shift+TabToggle plan mode
/planSwitch to plan mode
/askSwitch to ask mode
/sandboxOpen sandbox menu
/max-mode onEnable max mode
& <prompt>Send to Cloud Agent

Resources

Version

Current Version: 2026.02.27-e7d2ef6

Check for updates: agent update


Examples

Example 1: Interactive Refactoring

$ agent "refactor the user authentication system"

Agent will:

  1. Analyze current auth code
  2. Propose refactoring plan
  3. Show file changes
  4. Ask for approval
  5. Execute changes

Example 2: Automated Testing

$ agent -p "generate comprehensive tests for src/api/*.js" --force

Non-interactive, auto-approved test generation.

Example 3: Code Review in CI

# .github/workflows/review.yml
- name: AI Code Review
  run: |
    agent -p "review changes for security issues" \
      --output-format json \
      --trust \
      > review.json

Example 4: Cloud Background Task

$ agent -c "implement payment gateway integration with Stripe"
# Go do other work, check back later at cursor.com/agents

Pro Tip: Use agent ls frequently to review and resume past sessions. Context is preserved across sessions!

Files

6 total
Select a file
Select a file to preview.

Comments

Loading comments…