cursor-setup

GitHub

配置并验证Cursor后端,支持检查、设置用户/项目默认值及重置。确保仅修改本地环境,不改变分发默认配置,通过脚本自动解析路径并验证代理可用性。

opencode/skills/cursor-setup/SKILL.md Chachamaru127/claude-code-harness

Trigger Scenarios

用户请求配置Cursor作为默认后端 检查Cursor插件或代理就绪状态 调用cursor:setup命令

Install

npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -g -y
More Options

Non-standard path

npx skills add https://github.com/Chachamaru127/claude-code-harness/tree/main/opencode/skills/cursor-setup -g -y

Use without installing

npx skills use Chachamaru127/claude-code-harness@cursor-setup

指定 Agent (Claude Code)

npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -a claude-code -g -y

安装 repo 全部 skill

npx skills add Chachamaru127/claude-code-harness --all -g -y

预览 repo 内 skill

npx skills add Chachamaru127/claude-code-harness --list

SKILL.md

Frontmatter
{
    "name": "cursor-setup",
    "description": "Configure and verify the Cursor backend for Claude Code Harness. Use when user invokes cursor:setup, wants Cursor as the local default implementation backend, or asks to check Cursor plugin\/agent readiness. Distribution default remains opt-in; only local env\/user settings are changed when explicitly requested."
}

cursor:setup - Cursor Backend Setup

Cursor backend の setup / verification 用 skill。配布 plugin の fallback は claude のままにし、現在の repo / user 環境だけ cursor default にする時に使う。

Quick Reference

cursor:setup --check
cursor:setup --user-default
cursor:setup --project-default
cursor:setup --unset

Rules

  • Do not change distribution defaults or plugin manifests to make Cursor the shipped fallback.
  • Use scripts/resolve-impl-backend.sh / scripts/set-impl-backend.sh; do not infer from HARNESS_IMPL_BACKEND alone.
  • Treat ~/.cursor/permissions.json, .cursorignore, and Claude sandbox allowlists as manual/user-owned setup surfaces unless the user explicitly asks to edit a local file.

Flow

First resolve the Harness helper root. Keep the current working directory as the target project so project-scoped env.local writes still land in the user's repo:

HARNESS_PLUGIN_ROOT="${HARNESS_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
if [ -z "$HARNESS_PLUGIN_ROOT" ] && [ -n "${CLAUDE_SKILL_DIR:-}" ]; then
  probe="$(cd "${CLAUDE_SKILL_DIR}" && pwd)"
  while [ "$probe" != "/" ] && [ ! -d "$probe/scripts" ]; do
    probe="$(cd "$probe/.." && pwd)"
  done
  [ -d "$probe/scripts" ] && HARNESS_PLUGIN_ROOT="$probe"
fi
if [ -z "$HARNESS_PLUGIN_ROOT" ]; then
  echo "ERROR: HARNESS_PLUGIN_ROOT is not set and could not be derived from CLAUDE_PLUGIN_ROOT or CLAUDE_SKILL_DIR" >&2
  exit 2
fi
  1. For --check, run:

    bash "${HARNESS_PLUGIN_ROOT}/scripts/setup-cursor.sh" --check
    bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" --show
    bash "${HARNESS_PLUGIN_ROOT}/scripts/resolve-impl-backend.sh" --role worker
    CURSOR_AGENT_BIN="${CURSOR_AGENT_BIN:-}"
    if [ -z "$CURSOR_AGENT_BIN" ]; then
      # `agent`(公式の新表記)→ `cursor-agent`(legacy alias)の順に探す。
      # `agent` は汎用的な名前なので、symlink 解決後の実パスの「成分」に
      # cursor-agent が完全一致で現れる場合だけ採用する(部分文字列一致だと
      # /x/cursor-agent-not-really/agent のようなディレクトリ名で突破される)。
      for _c in agent cursor-agent; do
        _p="$(command -v "$_c" 2>/dev/null)" || continue
        [ -n "$_p" ] || continue
        _r="$(realpath "$_p" 2>/dev/null || readlink -f "$_p" 2>/dev/null || echo "$_p")"
        case "/$_r/" in */cursor-agent/*) CURSOR_AGENT_BIN="$_p"; break ;; esac
      done
      if [ -z "$CURSOR_AGENT_BIN" ] && [ -x "$HOME/.local/bin/cursor-agent" ]; then
        CURSOR_AGENT_BIN="$HOME/.local/bin/cursor-agent"
      fi
    fi
    if [ -z "$CURSOR_AGENT_BIN" ]; then
      echo "ERROR: cursor-agent not found in PATH or $HOME/.local/bin" >&2
      exit 3
    fi
    "$CURSOR_AGENT_BIN" --version
    
  2. For --user-default, run:

    bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" --user cursor
    bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" --show
    
  3. For --project-default, run:

    bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" cursor
    bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" --show
    
  4. For --unset, ask whether the target is user or project scope if not clear from the request, then run exactly one matching unset command:

    Project scope:

    bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" --unset
    

    User scope:

    bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" --unset --user
    

Output

Report three facts only:

  • resolved backend (claude / codex / cursor)
  • Cursor package readiness (setup-cursor.sh --check)
  • next manual step if Cursor is not ready

Version History

  • 94b0cdd Current 2026-08-17 04:17

    更新cursor-agent二进制探测逻辑,优先查找'agent'并按严格路径成分校验以防冲突;新增对Grok执行后端的兼容处理及修复循环状态外部化机制。

  • bfc2090 2026-07-19 18:12
  • c220671 2026-07-05 14:46

Same Skill Collection

codex/.codex/skills/agent-browser/SKILL.md
codex/.codex/skills/auth/SKILL.md
codex/.codex/skills/breezing/SKILL.md
codex/.codex/skills/cc-cursor-cc/SKILL.md
codex/.codex/skills/cc-update-review/SKILL.md
codex/.codex/skills/ci/SKILL.md
codex/.codex/skills/crud/SKILL.md
codex/.codex/skills/cursor-do/SKILL.md
codex/.codex/skills/cursor-rescue/SKILL.md
codex/.codex/skills/cursor-review/SKILL.md
codex/.codex/skills/cursor-setup/SKILL.md
codex/.codex/skills/deploy/SKILL.md
codex/.codex/skills/failure-codifier/SKILL.md
codex/.codex/skills/generate-slide/SKILL.md
codex/.codex/skills/generate-video/SKILL.md
codex/.codex/skills/gogcli-ops/SKILL.md
codex/.codex/skills/harness-loop/SKILL.md
codex/.codex/skills/harness-orchestration/SKILL.md
codex/.codex/skills/harness-plan/SKILL.md
codex/.codex/skills/harness-progress/SKILL.md
codex/.codex/skills/harness-release/SKILL.md
codex/.codex/skills/harness-review/SKILL.md
codex/.codex/skills/harness-setup/SKILL.md
codex/.codex/skills/harness-sync/SKILL.md
codex/.codex/skills/harness-work/SKILL.md
codex/.codex/skills/maintenance/SKILL.md
codex/.codex/skills/memory/SKILL.md
codex/.codex/skills/notebookLM/SKILL.md
codex/.codex/skills/principles/SKILL.md
codex/.codex/skills/session-control/SKILL.md
codex/.codex/skills/session-init/SKILL.md
codex/.codex/skills/session-memory/SKILL.md
codex/.codex/skills/session-state/SKILL.md
codex/.codex/skills/session/SKILL.md
codex/.codex/skills/ui/SKILL.md
codex/.codex/skills/vibecoder-guide/SKILL.md
codex/.codex/skills/workflow-guide/SKILL.md
opencode/skills/agent-browser/SKILL.md
opencode/skills/auth/SKILL.md
opencode/skills/breezing/SKILL.md
opencode/skills/cc-cursor-cc/SKILL.md
opencode/skills/ci/SKILL.md
opencode/skills/crud/SKILL.md
opencode/skills/cursor-do/SKILL.md
opencode/skills/cursor-rescue/SKILL.md
opencode/skills/cursor-review/SKILL.md
opencode/skills/deploy/SKILL.md
opencode/skills/failure-codifier/SKILL.md
opencode/skills/generate-slide/SKILL.md

Metadata

Files
0
Version
94b0cdd
Hash
ae570e97
Indexed
2026-07-05 14:46

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-18 07:56
浙ICP备14020137号-1 $방문자$