2.5k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill cursor-cli-agent- _meta.json282 B
- SKILL.md9.0 KB
Overview
This skill delegates complex coding tasks to the Cursor Agent CLI, running interactive agent sessions to implement, refactor, or review code. It is built for multi-file, iterative work and supports background sessions, isolated git worktrees, and non-interactive print mode for scripting. PTY access is required for correct operation.
How this skill works
The skill invokes the Cursor CLI via a bash tool with pty:true so the interactive terminal behaves correctly. You provide a workdir and a command (or run background:true for long jobs); the skill can monitor sessions via the process tool, send stdin, and kill or poll sessions. It supports modes like --plan (read-only), --yolo (auto-approve), --print (non-interactive/JSON), and worktree isolation for parallel tasks.
When to use it
- Building or creating new features or applications that need file edits and iterative exploration.
- Reviewing pull requests in a temporary clone or temp directory (use plan mode for read-only reviews).
- Refactoring large codebases where the agent needs to open, edit, and commit multiple files.
- Long-running or parallel tasks that you want to run in background with session monitoring.
- Scripting or CI tasks that need parseable, non-interactive output via --print.
Best practices
- Always set pty:true on the bash tool — Cursor will hang without a PTY.
- Specify workdir so the agent is scoped to the intended project; never spawn agents in the ~/.openclaw/ or ~/clawd workspace.
- Use --plan for reviews and safety when you want read-only analysis before applying changes.
- Use background:true for lengthy tasks and monitor with the process tool (list, log, poll, submit, kill).
- Use -w (worktree) to isolate parallel jobs and avoid interfering with each other.
- Prefer --print for CI/CD or automation where machine-readable output is required.
Example use cases
- Refactor the auth module across multiple files using background mode and --yolo for fast execution.
- Batch-review several PRs by cloning into a temp directory and running agent --plan for each PR.
- Run a non-interactive codebase summary in CI: agent --print --output-format json 'List all API endpoints'.
- Create parallel issue branches with git worktree and launch an agent in each worktree to fix and push changes.
- Start a long-running feature build in background and receive a notification or poll logs until completion.
FAQ
Cursor is an interactive CLI and will hang or produce garbled output without a PTY. Always include pty:true when invoking the bash tool.
Can I review PRs directly in my main project directory?
No. Clone the repo to a temporary directory or worktree and run the agent there. Never review in the primary OpenClaw project or the ~/.openclaw/ workspace.
When should I use --print vs --plan vs --yolo?
Use --print for non-interactive, parseable results (CI/scripts). Use --plan for read-only analysis and safety in reviews. Use --yolo to auto-approve and execute changes quickly when you trust the agent.