Cursor Agent logo

Cursor Agent

Community
kunwl123456
cursor-agent

A comprehensive skill for using the Cursor CLI agent for various software engineering tasks (updated for 2026 features, includes tmux automation guide).

Overview

Publisherkunwl123456
Repositoryzeroclaw-skills-collection
Skill namecursor-agent
Stars
27
Forks
5
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by kunwl123456 on GitHub. Read the source before you install it.

Installation

Install the Cursor Agent AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/kunwl123456/zeroclaw-skills-collection/tree/main/cursor-agent
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kunwl123456/zeroclaw-skills-collection.git /tmp/zeroclaw-skills-collection
mkdir -p .claude/skills
cp -r /tmp/zeroclaw-skills-collection/cursor-agent .claude/skills/cursor-agent
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cursor Agent in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cursor Agent on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cursor Agent is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Cursor CLI Agent Skill

This skill provides a comprehensive guide and set of workflows for utilizing the Cursor CLI tool, including all features from the January 2026 update.

Installation

Standard Installation (macOS, Linux, Windows WSL)

bash
curl https://cursor.com/install -fsS | bash

Homebrew (macOS only)

bash
brew install --cask cursor-cli

Post-Installation Setup

macOS:

  • Add to PATH in ~/.zshrc (zsh) or ~/.bashrc (bash):
    bash
    export PATH="$HOME/.local/bin:$PATH"
  • Restart terminal or run source ~/.zshrc (or ~/.bashrc)
  • Requires macOS 10.15 or later
  • Works on both Intel and Apple Silicon Macs

Linux/Ubuntu:

  • Restart your terminal or source your shell config
  • Verify with agent --version

Both platforms:

  • Commands: agent (primary) and cursor-agent (backward compatible)
  • Verify installation: agent --version or cursor-agent --version

Authentication

Authenticate via browser:

bash
agent login

Or use API key:

bash
export CURSOR_API_KEY=your_api_key_here

Update

Keep your CLI up to date:

bash
agent update
# or
agent upgrade

Commands

Interactive Mode

Start an interactive session with the agent:

bash
agent

Start with an initial prompt:

bash
agent "Add error handling to this API"

Backward compatibility: cursor-agent still works but agent is now the primary command.

Model Switching

List all available models:

bash
agent models
# or
agent --list-models

Use a specific model:

bash
agent --model gpt-5

Switch models during a session:

/models

Session Management

Manage your agent sessions:

  • List sessions: agent ls
  • Resume most recent: agent resume
  • Resume specific session: agent --resume="[chat-id]"

Context Selection

Include specific files or folders in the conversation:

@filename.ts
@src/components/

Slash Commands

Available during interactive sessions:

  • /models - Switch between AI models interactively
  • /compress - Summarize conversation and free up context window
  • /rules - Create and edit rules directly from CLI
  • /commands - Create and modify custom commands
  • /mcp enable [server-name] - Enable an MCP server
  • /mcp disable [server-name] - Disable an MCP server

Keyboard Shortcuts

  • Shift+Enter - Add newlines for multi-line prompts
  • Ctrl+D - Exit CLI (requires double-press for safety)
  • Ctrl+R - Review changes (press i for instructions, navigate with arrow keys)
  • ArrowUp - Cycle through previous messages

Non-interactive / CI Mode

Run the agent in a non-interactive mode, suitable for CI/CD pipelines:

bash
agent -p 'Run tests and report coverage'
# or
agent --print 'Refactor this file to use async/await'

Output formats:

bash
# Plain text (default)
agent -p 'Analyze code' --output-format text

# Structured JSON
agent -p 'Find bugs' --output-format json

# Real-time streaming JSON
agent -p 'Run tests' --output-format stream-json --stream-partial-output

Force mode (auto-apply changes without confirmation):

bash
agent -p 'Fix all linting errors' --force

Media support:

bash
agent -p 'Analyze this screenshot: screenshot.png'

⚠️ Using with AI Agents / Automation (tmux required)

CRITICAL: When running Cursor CLI from automated environments (AI agents, scripts, subprocess calls), the CLI requires a real TTY. Direct execution will hang indefinitely.

The Solution: Use tmux

bash
# 1. Install tmux if not available
sudo apt install tmux  # Ubuntu/Debian
brew install tmux      # macOS

# 2. Create a tmux session
tmux kill-session -t cursor 2>/dev/null || true
tmux new-session -d -s cursor

# 3. Navigate to project
tmux send-keys -t cursor "cd /path/to/project" Enter
sleep 1

# 4. Run Cursor agent
tmux send-keys -t cursor "agent 'Your task here'" Enter

# 5. Handle workspace trust prompt (first run)
sleep 3
tmux send-keys -t cursor "a"  # Trust workspace

# 6. Wait for completion
sleep 60  # Adjust based on task complexity

# 7. Capture output
tmux capture-pane -t cursor -p -S -100

# 8. Verify results
ls -la /path/to/project/

Why this works:

  • tmux provides a persistent pseudo-terminal (PTY)
  • Cursor's TUI requires interactive terminal capabilities
  • Direct agent calls from subprocess/exec hang without TTY

What does NOT work:

bash
# ❌ These will hang indefinitely:
agent "task"                    # No TTY
agent -p "task"                 # No TTY  
subprocess.run(["agent", ...])  # No TTY
script -c "agent ..." /dev/null # May crash Cursor

Rules & Configuration

The agent automatically loads rules from:

  • .cursor/rules
  • AGENTS.md
  • CLAUDE.md

Use /rules command to create and edit rules directly from the CLI.

MCP Integration

MCP servers are automatically loaded from mcp.json configuration.

Enable/disable servers on the fly:

/mcp enable server-name
/mcp disable server-name

Note: Server names with spaces are fully supported.

Workflows

Code Review

Perform a code review on the current changes or a specific branch:

bash
agent -p 'Review the changes in the current branch against main. Focus on security and performance.'

Refactoring

Refactor code for better readability or performance:

bash
agent -p 'Refactor src/utils.ts to reduce complexity and improve type safety.'

Debugging

Analyze logs or error messages to find the root cause:

bash
agent -p 'Analyze the following error log and suggest a fix: [paste log here]'

Git Integration

Automate git operations with context awareness:

bash
agent -p 'Generate a commit message for the staged changes adhering to conventional commits.'

Batch Processing (CI/CD)

Run automated checks in CI pipelines:

bash
# Set API key in CI environment
export CURSOR_API_KEY=$CURSOR_API_KEY

# Run security audit with JSON output
agent -p 'Audit this codebase for security vulnerabilities' --output-format json --force

# Generate test coverage report
agent -p 'Run tests and generate coverage report' --output-format text

Multi-file Analysis

Use context selection to analyze multiple files:

bash
agent
# Then in interactive mode:
@src/api/
@src/models/
Review the API implementation for consistency with our data models

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Cursor Agent AI skill do?

A comprehensive skill for using the Cursor CLI agent for various software engineering tasks (updated for 2026 features, includes tmux automation guide).

Why use Cursor Agent on TypingMind?

Because you install it once and use it with any model. Cursor Agent is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cursor Agent in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/kunwl123456/zeroclaw-skills-collection/tree/main/cursor-agent. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Cursor Agent?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cursor Agent?

As many as you like. As long as a model supports skills, you can use Cursor Agent with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cursor Agent AI skill free?

It is published on GitHub by kunwl123456. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇