cursor-openclaw
2
总安装量
2
周安装量
#74009
全站排名
安装命令
npx skills add https://github.com/lalotrage/cursor-openclaw --skill cursor-openclaw
Agent 安装分布
trae
2
gemini-cli
2
antigravity
2
github-copilot
2
codex
2
kimi-cli
2
Skill 文档
cursor-openclaw (FREE)
A thin, safe integration layer for running Cursor Agent CLI from an OpenClaw/Clawdbot environment.
What you get:
- A single wrapper script:
scripts/cursor-openclaw.sh - 3 ready-to-run workflows:
scripts/workflow-debug.shscripts/workflow-refactor.shscripts/workflow-tests.sh
- Troubleshooting checklist
This skill is intentionally read/write capable (Cursor Agent can modify your repo), but includes no sensitive defaults.
Setup (zero-friction)
1) Install Cursor Agent CLI (required)
This skill expects Cursor Agent CLI to be installed and available at:
- default:
~/.local/bin/agent - override with:
AGENT_BIN=/path/to/agent
Install command:
curl -fsS https://cursor.com/install | bash
Quick sanity check:
~/.local/bin/agent --help
2) Configure Cursor auth (required)
If your environment uses an API key, export it:
export CURSOR_API_KEY="<your_key>"
Notes:
- This skill never includes or sets
CURSOR_API_KEY. - Use your shell profile (
~/.bashrc,~/.zshrc) or your secret manager.
Quick start
From this skill directory:
bash scripts/cursor-openclaw.sh "Refactor src/foo.ts to remove duplication"
Or pipe a multi-line prompt:
cat <<'PROMPT' | bash scripts/cursor-openclaw.sh -
Please read the failing logs below and fix the smallest thing that makes tests pass.
PROMPT
Common environment variables
WORKSPACE=/path/to/repo(default:/root/clawd)MODE=plan(planning only / no edits)MODE=ask(Q&A only / no edits)OUTPUT_FORMAT=text|json|stream-json(default:text)STREAM=true(only forOUTPUT_FORMAT=stream-json)AGENT_BIN=/custom/path/to/agent
Example:
WORKSPACE=/root/clawd-dev MODE=plan bash scripts/cursor-openclaw.sh "Propose a refactor plan for src/"
Ready workflows
1) Debug workflow
ERROR_FILE=./tmp/error.log WORKSPACE=/root/clawd-dev bash scripts/workflow-debug.sh
What it does:
- Builds a strong debugging prompt
- Includes the first
MAX_LINES(default: 200) lines of your log file - Delegates to Cursor Agent
2) Refactor workflow
TARGET_PATH=src WORKSPACE=/root/clawd-dev bash scripts/workflow-refactor.sh
Optional:
TARGET_PATH=src GOAL="reduce cyclomatic complexity in payment flow" bash scripts/workflow-refactor.sh
3) Tests workflow
TARGET_PATH=src/utils WORKSPACE=/root/clawd-dev bash scripts/workflow-tests.sh
Optional:
TARGET_PATH=src/utils TEST_FRAMEWORK=vitest bash scripts/workflow-tests.sh
Troubleshooting
Error: Cursor Agent CLI not found at ~/.local/bin/agent
- Install it:
curl https://cursor.com/install -fsS | bash - Or point to the correct binary:
AGENT_BIN=/path/to/agent bash scripts/cursor-openclaw.sh "..."
Auth errors / CURSOR_API_KEY missing
- Export your key in your environment:
export CURSOR_API_KEY="..." - Confirm it is visible to non-interactive shells (CI, cron, etc).
Wrong repo / Cursor edits the wrong folder
- Set
WORKSPACEexplicitly:WORKSPACE=/path/to/repo bash scripts/cursor-openclaw.sh "..."
Output too verbose / want JSON
- Use JSON output:
OUTPUT_FORMAT=json bash scripts/cursor-openclaw.sh "..."
Streaming output not working
- Streaming only applies to
OUTPUT_FORMAT=stream-json:OUTPUT_FORMAT=stream-json STREAM=true bash scripts/cursor-openclaw.sh "..."
Security / publishing notes
- This skill contains no tokens, no cookies, no auth.json.
- All credentials must be provided by the user environment (e.g.,
CURSOR_API_KEY). - The workflow scripts only read files you explicitly provide via env vars.