{
  "schemaVersion": "1.0",
  "item": {
    "slug": "cursor-agent",
    "name": "Cursor CLI Agent",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/swiftlysingh/cursor-agent",
    "canonicalUrl": "https://clawhub.ai/swiftlysingh/cursor-agent",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/cursor-agent",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cursor-agent",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "cursor-agent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-02T07:20:42.816Z",
      "expiresAt": "2026-05-09T07:20:42.816Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cursor-agent",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cursor-agent",
        "contentDisposition": "attachment; filename=\"cursor-agent-2.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "cursor-agent"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/cursor-agent"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/cursor-agent",
    "agentPageUrl": "https://openagent3.xyz/skills/cursor-agent/agent",
    "manifestUrl": "https://openagent3.xyz/skills/cursor-agent/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/cursor-agent/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Cursor CLI Agent Skill",
        "body": "This skill provides a comprehensive guide and set of workflows for utilizing the Cursor CLI tool, including all features from the January 2026 update."
      },
      {
        "title": "Standard Installation (macOS, Linux, Windows WSL)",
        "body": "curl https://cursor.com/install -fsS | bash"
      },
      {
        "title": "Homebrew (macOS only)",
        "body": "brew install --cask cursor-cli"
      },
      {
        "title": "Post-Installation Setup",
        "body": "macOS:\n\nAdd to PATH in ~/.zshrc (zsh) or ~/.bashrc (bash):\nexport PATH=\"$HOME/.local/bin:$PATH\"\n\n\nRestart terminal or run source ~/.zshrc (or ~/.bashrc)\nRequires macOS 10.15 or later\nWorks on both Intel and Apple Silicon Macs\n\nLinux/Ubuntu:\n\nRestart your terminal or source your shell config\nVerify with agent --version\n\nBoth platforms:\n\nCommands: agent (primary) and cursor-agent (backward compatible)\nVerify installation: agent --version or cursor-agent --version"
      },
      {
        "title": "Authentication",
        "body": "Authenticate via browser:\n\nagent login\n\nOr use API key:\n\nexport CURSOR_API_KEY=your_api_key_here"
      },
      {
        "title": "Update",
        "body": "Keep your CLI up to date:\n\nagent update\n# or\nagent upgrade"
      },
      {
        "title": "Interactive Mode",
        "body": "Start an interactive session with the agent:\n\nagent\n\nStart with an initial prompt:\n\nagent \"Add error handling to this API\"\n\nBackward compatibility: cursor-agent still works but agent is now the primary command."
      },
      {
        "title": "Model Switching",
        "body": "List all available models:\n\nagent models\n# or\nagent --list-models\n\nUse a specific model:\n\nagent --model gpt-5\n\nSwitch models during a session:\n\n/models"
      },
      {
        "title": "Session Management",
        "body": "Manage your agent sessions:\n\nList sessions: agent ls\nResume most recent: agent resume\nResume specific session: agent --resume=\"[chat-id]\""
      },
      {
        "title": "Context Selection",
        "body": "Include specific files or folders in the conversation:\n\n@filename.ts\n@src/components/"
      },
      {
        "title": "Slash Commands",
        "body": "Available during interactive sessions:\n\n/models - Switch between AI models interactively\n/compress - Summarize conversation and free up context window\n/rules - Create and edit rules directly from CLI\n/commands - Create and modify custom commands\n/mcp enable [server-name] - Enable an MCP server\n/mcp disable [server-name] - Disable an MCP server"
      },
      {
        "title": "Keyboard Shortcuts",
        "body": "Shift+Enter - Add newlines for multi-line prompts\nCtrl+D - Exit CLI (requires double-press for safety)\nCtrl+R - Review changes (press i for instructions, navigate with arrow keys)\nArrowUp - Cycle through previous messages"
      },
      {
        "title": "Non-interactive / CI Mode",
        "body": "Run the agent in a non-interactive mode, suitable for CI/CD pipelines:\n\nagent -p 'Run tests and report coverage'\n# or\nagent --print 'Refactor this file to use async/await'\n\nOutput formats:\n\n# Plain text (default)\nagent -p 'Analyze code' --output-format text\n\n# Structured JSON\nagent -p 'Find bugs' --output-format json\n\n# Real-time streaming JSON\nagent -p 'Run tests' --output-format stream-json --stream-partial-output\n\nForce mode (auto-apply changes without confirmation):\n\nagent -p 'Fix all linting errors' --force\n\nMedia support:\n\nagent -p 'Analyze this screenshot: screenshot.png'"
      },
      {
        "title": "⚠️ Using with AI Agents / Automation (tmux required)",
        "body": "CRITICAL: When running Cursor CLI from automated environments (AI agents, scripts, subprocess calls), the CLI requires a real TTY. Direct execution will hang indefinitely.\n\nThe Solution: Use tmux\n\n# 1. Install tmux if not available\nsudo apt install tmux  # Ubuntu/Debian\nbrew install tmux      # macOS\n\n# 2. Create a tmux session\ntmux kill-session -t cursor 2>/dev/null || true\ntmux new-session -d -s cursor\n\n# 3. Navigate to project\ntmux send-keys -t cursor \"cd /path/to/project\" Enter\nsleep 1\n\n# 4. Run Cursor agent\ntmux send-keys -t cursor \"agent 'Your task here'\" Enter\n\n# 5. Handle workspace trust prompt (first run)\nsleep 3\ntmux send-keys -t cursor \"a\"  # Trust workspace\n\n# 6. Wait for completion\nsleep 60  # Adjust based on task complexity\n\n# 7. Capture output\ntmux capture-pane -t cursor -p -S -100\n\n# 8. Verify results\nls -la /path/to/project/\n\nWhy this works:\n\ntmux provides a persistent pseudo-terminal (PTY)\nCursor's TUI requires interactive terminal capabilities\nDirect agent calls from subprocess/exec hang without TTY\n\nWhat does NOT work:\n\n# ❌ These will hang indefinitely:\nagent \"task\"                    # No TTY\nagent -p \"task\"                 # No TTY  \nsubprocess.run([\"agent\", ...])  # No TTY\nscript -c \"agent ...\" /dev/null # May crash Cursor"
      },
      {
        "title": "Rules & Configuration",
        "body": "The agent automatically loads rules from:\n\n.cursor/rules\nAGENTS.md\nCLAUDE.md\n\nUse /rules command to create and edit rules directly from the CLI."
      },
      {
        "title": "MCP Integration",
        "body": "MCP servers are automatically loaded from mcp.json configuration.\n\nEnable/disable servers on the fly:\n\n/mcp enable server-name\n/mcp disable server-name\n\nNote: Server names with spaces are fully supported."
      },
      {
        "title": "Code Review",
        "body": "Perform a code review on the current changes or a specific branch:\n\nagent -p 'Review the changes in the current branch against main. Focus on security and performance.'"
      },
      {
        "title": "Refactoring",
        "body": "Refactor code for better readability or performance:\n\nagent -p 'Refactor src/utils.ts to reduce complexity and improve type safety.'"
      },
      {
        "title": "Debugging",
        "body": "Analyze logs or error messages to find the root cause:\n\nagent -p 'Analyze the following error log and suggest a fix: [paste log here]'"
      },
      {
        "title": "Git Integration",
        "body": "Automate git operations with context awareness:\n\nagent -p 'Generate a commit message for the staged changes adhering to conventional commits.'"
      },
      {
        "title": "Batch Processing (CI/CD)",
        "body": "Run automated checks in CI pipelines:\n\n# Set API key in CI environment\nexport CURSOR_API_KEY=$CURSOR_API_KEY\n\n# Run security audit with JSON output\nagent -p 'Audit this codebase for security vulnerabilities' --output-format json --force\n\n# Generate test coverage report\nagent -p 'Run tests and generate coverage report' --output-format text"
      },
      {
        "title": "Multi-file Analysis",
        "body": "Use context selection to analyze multiple files:\n\nagent\n# Then in interactive mode:\n@src/api/\n@src/models/\nReview the API implementation for consistency with our data models"
      }
    ],
    "body": "Cursor CLI Agent Skill\n\nThis skill provides a comprehensive guide and set of workflows for utilizing the Cursor CLI tool, including all features from the January 2026 update.\n\nInstallation\nStandard Installation (macOS, Linux, Windows WSL)\ncurl https://cursor.com/install -fsS | bash\n\nHomebrew (macOS only)\nbrew install --cask cursor-cli\n\nPost-Installation Setup\n\nmacOS:\n\nAdd to PATH in ~/.zshrc (zsh) or ~/.bashrc (bash):\nexport PATH=\"$HOME/.local/bin:$PATH\"\n\nRestart terminal or run source ~/.zshrc (or ~/.bashrc)\nRequires macOS 10.15 or later\nWorks on both Intel and Apple Silicon Macs\n\nLinux/Ubuntu:\n\nRestart your terminal or source your shell config\nVerify with agent --version\n\nBoth platforms:\n\nCommands: agent (primary) and cursor-agent (backward compatible)\nVerify installation: agent --version or cursor-agent --version\nAuthentication\n\nAuthenticate via browser:\n\nagent login\n\n\nOr use API key:\n\nexport CURSOR_API_KEY=your_api_key_here\n\nUpdate\n\nKeep your CLI up to date:\n\nagent update\n# or\nagent upgrade\n\nCommands\nInteractive Mode\n\nStart an interactive session with the agent:\n\nagent\n\n\nStart with an initial prompt:\n\nagent \"Add error handling to this API\"\n\n\nBackward compatibility: cursor-agent still works but agent is now the primary command.\n\nModel Switching\n\nList all available models:\n\nagent models\n# or\nagent --list-models\n\n\nUse a specific model:\n\nagent --model gpt-5\n\n\nSwitch models during a session:\n\n/models\n\nSession Management\n\nManage your agent sessions:\n\nList sessions: agent ls\nResume most recent: agent resume\nResume specific session: agent --resume=\"[chat-id]\"\nContext Selection\n\nInclude specific files or folders in the conversation:\n\n@filename.ts\n@src/components/\n\nSlash Commands\n\nAvailable during interactive sessions:\n\n/models - Switch between AI models interactively\n/compress - Summarize conversation and free up context window\n/rules - Create and edit rules directly from CLI\n/commands - Create and modify custom commands\n/mcp enable [server-name] - Enable an MCP server\n/mcp disable [server-name] - Disable an MCP server\nKeyboard Shortcuts\nShift+Enter - Add newlines for multi-line prompts\nCtrl+D - Exit CLI (requires double-press for safety)\nCtrl+R - Review changes (press i for instructions, navigate with arrow keys)\nArrowUp - Cycle through previous messages\nNon-interactive / CI Mode\n\nRun the agent in a non-interactive mode, suitable for CI/CD pipelines:\n\nagent -p 'Run tests and report coverage'\n# or\nagent --print 'Refactor this file to use async/await'\n\n\nOutput formats:\n\n# Plain text (default)\nagent -p 'Analyze code' --output-format text\n\n# Structured JSON\nagent -p 'Find bugs' --output-format json\n\n# Real-time streaming JSON\nagent -p 'Run tests' --output-format stream-json --stream-partial-output\n\n\nForce mode (auto-apply changes without confirmation):\n\nagent -p 'Fix all linting errors' --force\n\n\nMedia support:\n\nagent -p 'Analyze this screenshot: screenshot.png'\n\n⚠️ Using with AI Agents / Automation (tmux required)\n\nCRITICAL: When running Cursor CLI from automated environments (AI agents, scripts, subprocess calls), the CLI requires a real TTY. Direct execution will hang indefinitely.\n\nThe Solution: Use tmux\n\n# 1. Install tmux if not available\nsudo apt install tmux  # Ubuntu/Debian\nbrew install tmux      # macOS\n\n# 2. Create a tmux session\ntmux kill-session -t cursor 2>/dev/null || true\ntmux new-session -d -s cursor\n\n# 3. Navigate to project\ntmux send-keys -t cursor \"cd /path/to/project\" Enter\nsleep 1\n\n# 4. Run Cursor agent\ntmux send-keys -t cursor \"agent 'Your task here'\" Enter\n\n# 5. Handle workspace trust prompt (first run)\nsleep 3\ntmux send-keys -t cursor \"a\"  # Trust workspace\n\n# 6. Wait for completion\nsleep 60  # Adjust based on task complexity\n\n# 7. Capture output\ntmux capture-pane -t cursor -p -S -100\n\n# 8. Verify results\nls -la /path/to/project/\n\n\nWhy this works:\n\ntmux provides a persistent pseudo-terminal (PTY)\nCursor's TUI requires interactive terminal capabilities\nDirect agent calls from subprocess/exec hang without TTY\n\nWhat does NOT work:\n\n# ❌ These will hang indefinitely:\nagent \"task\"                    # No TTY\nagent -p \"task\"                 # No TTY  \nsubprocess.run([\"agent\", ...])  # No TTY\nscript -c \"agent ...\" /dev/null # May crash Cursor\n\nRules & Configuration\n\nThe agent automatically loads rules from:\n\n.cursor/rules\nAGENTS.md\nCLAUDE.md\n\nUse /rules command to create and edit rules directly from the CLI.\n\nMCP Integration\n\nMCP servers are automatically loaded from mcp.json configuration.\n\nEnable/disable servers on the fly:\n\n/mcp enable server-name\n/mcp disable server-name\n\n\nNote: Server names with spaces are fully supported.\n\nWorkflows\nCode Review\n\nPerform a code review on the current changes or a specific branch:\n\nagent -p 'Review the changes in the current branch against main. Focus on security and performance.'\n\nRefactoring\n\nRefactor code for better readability or performance:\n\nagent -p 'Refactor src/utils.ts to reduce complexity and improve type safety.'\n\nDebugging\n\nAnalyze logs or error messages to find the root cause:\n\nagent -p 'Analyze the following error log and suggest a fix: [paste log here]'\n\nGit Integration\n\nAutomate git operations with context awareness:\n\nagent -p 'Generate a commit message for the staged changes adhering to conventional commits.'\n\nBatch Processing (CI/CD)\n\nRun automated checks in CI pipelines:\n\n# Set API key in CI environment\nexport CURSOR_API_KEY=$CURSOR_API_KEY\n\n# Run security audit with JSON output\nagent -p 'Audit this codebase for security vulnerabilities' --output-format json --force\n\n# Generate test coverage report\nagent -p 'Run tests and generate coverage report' --output-format text\n\nMulti-file Analysis\n\nUse context selection to analyze multiple files:\n\nagent\n# Then in interactive mode:\n@src/api/\n@src/models/\nReview the API implementation for consistency with our data models"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/swiftlysingh/cursor-agent",
    "publisherUrl": "https://clawhub.ai/swiftlysingh/cursor-agent",
    "owner": "swiftlysingh",
    "version": "2.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/cursor-agent",
    "downloadUrl": "https://openagent3.xyz/downloads/cursor-agent",
    "agentUrl": "https://openagent3.xyz/skills/cursor-agent/agent",
    "manifestUrl": "https://openagent3.xyz/skills/cursor-agent/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/cursor-agent/agent.md"
  }
}