openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > Cursor Agent for OpenClaw

Run Cursor Agent CLI for coding tasks — writing, editing, refactoring, reviewing, or planning code — without spending OpenClaw API credits. Use when the user...

开发与 DevOps

作者:Luis Albinati @albinati

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v1.0.2

统计:⭐ 0 · 210 · 0 current installs · 0 all-time installs

0

安装量(当前) 0

🛡 VirusTotal :可疑 · OpenClaw :可疑

Package:albinati/cursor-agent-openclaw

安全扫描(ClawHub)

  • VirusTotal :可疑
  • OpenClaw :可疑

OpenClaw 评估

The skill appears to do what it says (wrap the Cursor Agent CLI), but there are inconsistencies between the SKILL.md safety requirements and the declared metadata — and the script relies on a local CLI and uses flags that could apply changes — so proceed with caution.

目的

The SKILL.md and scripts clearly require the 'agent' CLI (Cursor Agent). However the registry 'Requirements' section in the provided metadata lists no required binaries or credentials, which is inconsistent. Requiring the Cursor CLI is reasonable for the stated purpose, but the metadata omission is a mismatch that could hide setup or permission expectations.

说明范围

The SKILL.md imposes strict user-consent rules (MUST NOT be invoked autonomously, always start read-only, ask before write/cloud/commit). The included run.sh implements read/ask/plan/write modes and defaults to read-only, which aligns in spirit, but the script itself does not enforce interactive confirmation — it trusts the caller to pass 'write' only after confirmation. That puts the burden on the platform/agent to follow the SKILL.md rules; …

安装机制

There is no install spec (instruction-only plus a small helper script). Nothing is downloaded or executed from remote URLs. This is low install risk.

证书

The skill does not request environment variables, secrets, or config paths. It only invokes a local CLI and operates on a user-supplied repo path, which is proportionate to the claimed purpose.

持久

The skill metadata allows autonomous invocation (disable-model-invocation is false) while the SKILL.md explicitly states the skill MUST NOT be invoked autonomously and requires explicit user consent before any write/cloud/commit actions. This mismatch is the main privilege/behavior concern. 'always' is false, so it won't be force-included, but the ability for the agent to call it autonomously contradicts the documented safety constraints.

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Cursor Agent for OpenClaw」。简介:Run Cursor Agent CLI for coding tasks — writing, editing, refactoring, reviewin…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/albinati/cursor-agent-openclaw/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: cursor-agent
description: >
  Run Cursor Agent CLI for coding tasks — writing, editing, refactoring, reviewing, or
  planning code — without spending OpenClaw API credits. Use when the user asks to
  write/fix/refactor/review code, a coding task would otherwise be done inline with
  Sonnet/Haiku, the user says "do this in cursor" or "use cursor for this", or any
  substantial file-editing task in a known repo. NOT for conversational questions about
  code (answer inline) or tiny one-liners that don't warrant a subprocess.
metadata:
  requiredBinaries: ["agent"]
---

# Cursor Agent

Cursor Agent CLI runs on the user's Cursor subscription — zero API cost. Always prefer it over inline code generation for any non-trivial coding task.

## Prerequisites

**Required binary: `agent`** (Cursor Agent CLI)

Install from the official site: https://cursor.com/docs/cli/overview — then verify with `agent --version`.
The helper script (`scripts/run.sh`) will exit with an error if `agent` is not found in PATH.

## User Consent Required — MANDATORY

This skill MUST NOT be invoked autonomously. Every invocation requires:

1. **State intent first** — tell the user: the repo, the task, the model, and whether files will be changed
2. **Wait for explicit "yes"** — do not proceed without clear user approval
3. **Default to read-only** — use `run.sh <repo> <task> <model> ask` unless the user explicitly asks for changes
4. **Before writing files** — run in `ask` mode first, show the user the plan, then ask: *"Apply these changes?"*
5. **Before `--cloud`** — explicitly warn: *"This will send repo contents to cursor.com. OK to proceed?"*
6. **Before committing** — show the diff and get confirmation

The helper script (`scripts/run.sh`) defaults to `ask` (read-only). Pass `write` as the mode argument only after the user has confirmed changes should be applied.

## Model Routing

| Task type | Model flag | Mode flag |
|---|---|---|
| Trivial / exploratory | *(omit — `auto`)* | *(omit)* |
| Bug fix / feature / refactor | `--model sonnet-4.6` | *(omit)* |
| Code review / explain (read-only) | `--model sonnet-4.6` | `--mode=ask` |
| Architecture / design planning | `--model opus-4.6-thinking` | `--mode=plan` |
| Long background task | `--model sonnet-4.6` | use `--cloud` instead of `-p` |

## Headless Commands

**Read-only first** — always start with `--mode=ask` to review before applying changes:
```bash
cd <repo> && agent -p "<task>" --model sonnet-4.6 --mode=ask --output-format text --trust
```

**Apply changes** — only after user confirms the plan:
```bash
cd <repo> && agent -p "<task>" --model sonnet-4.6 --force --output-format text --trust
```

**Cloud/background** — warn user that repo data goes to cursor.com:
```bash
cd <repo> && agent -c "<task>" --model sonnet-4.6 --trust
# Monitor at: cursor.com/agents
```

## Git Rule

Cursor sandbox blocks `git commit`. Always commit manually after Cursor edits:
```bash
cd <repo> && git add -A && git commit -m "<conventional commit message>" && git push
```

Show the diff to the user and confirm before committing if the change is large or touches sensitive areas.

## Repos & Workdirs

- Always `cd` to the correct repo before running
- Check for `.cursor/rules` and `AGENTS.md` in the repo root — Cursor loads these automatically for project context

## Context & Sessions

- Add `@<file>` in prompt to include specific files in context
- `--continue` or `--resume` to continue a previous session
- `agent ls` to list previous sessions

## Output Handling

- `--output-format text` → clean final answer, summarise key changes to the user
- `--output-format json` → structured, use for scripted parsing
- Always report back: what changed, what was committed, any issues found

## References

- Model list & details: `references/models.md`
- Slash commands (interactive mode): `references/slash-commands.md`