AGENT SKILL

Cursor 后端配置与验证

cursor-setup

为 Claude Code Harness 配置并验证 Cursor 后端。当用户调用 cursor:setup、希望将 Cursor 作为本地默认实现后端,或要求检查 Cursor 插件/智能体就绪状态时使用。分发默认保持选择加入(opt-in);仅在用户明确请求时才更改本地环境/用户设置。

License 许可
MIT
最近更新
2026-11-11
Stars
★ 3.2k
Forks
306

01 前言 Front Matter

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.
allowed-tools
[ "Read", "Bash" ]
argument-hint
[--check | --user-default | --project-default | --unset]
description-en
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.
description-ja
Claude Code Harness の Cursor backend を設定・検証するスキル。cursor:setup、Cursor を現環境の default 実装 backend にしたい、Cursor plugin/agent readiness を確認したい時に使う。配布 plugin の default は opt-in のまま維持し、明示依頼がある場合だけ local env/user 設定を変更する。
user-invocable
true

03 SKILL.md 正文

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

04 同仓库更多 Skills

Chachamaru127
Chachamaru127/claude-code-harness

技能退出与切换

escape-skill

暂无简介

软件开发工程师插件与技能管理
★ 3.2k
Chachamaru127
Chachamaru127/claude-code-harness

空内容审查与复核

zz-review-empty

暂无简介

普通用户回答复核
★ 3.2k
Chachamaru127
Chachamaru127/claude-code-harness

跨会话消息通知与交接

session-send

当用户要求通知其他会话、请求会话交接、说'告诉其他智能体',或需要跨会话传递消息时使用此技能。

软件开发工程师会话上下文交接
★ 3.2k
Chachamaru127
Chachamaru127/claude-code-harness

记忆与 SSOT 管理

memory

管理 SSOT(单一事实来源)、记忆及跨工具记忆搜索。负责维护 decisions.md 和 patterns.md。当用户提到 memory、SSOT、decisions.md、patterns.md、合并、迁移、SSOT 提升、同步记忆、保存经验、记忆搜索、harness-mem、过往决策或记录此事时使用。请勿在以下场景加载:实现工作、评审、临时笔记或会话内日志记录。

软件开发工程师知识管理与沉淀
★ 3.2k
Chachamaru127
Chachamaru127/claude-code-harness

文件清理与归档

maintenance

文件清理与归档。整理臃肿的 Plans.md、session-log.md、旧日志和状态文件。触发词:/maintenance、cleanup、archive、organize、split session-log。请勿在以下场景加载:实现、评审、发布、新功能开发。

软件开发工程师文件系统操作与管理
★ 3.2k
Chachamaru127
Chachamaru127/claude-code-harness

日文写作规则提案起草

japanese-writing-drafter

检测操作员是否在对话中途纠正了智能体的日文措辞(重写句子、指出风格问题、说'这个措辞不好,改成 X 这样'),并将一条待定写作规则提案起草到 ~/.claude/writing-lint/proposals.jsonl 中,供人工后续审阅。本技能是 proposals.jsonl 的唯一写入者——它从不编辑 rules.jsonl,也从不将 status 设置为 pending 以外的任何值。将规则提升到 rules.jsonl 仅通过人工运行 scripts/writing-rule-approve.sh 完成。当用户提到 writing-rule proposal、表現を直して、文体を直して、その言い方はNG、writing lint 提案、指摘をルール化して时使用。不要为以下场景加载:批准或拒绝提案(使用 scripts/writing-rule-approve.sh)、列出资定提案(使用 scripts/writing-rule-list.sh)、或依据现有词典扫描文本(由 writinglint 引擎 / PostToolUse hook 完成)。

翻译回复风格与输出控制
★ 3.2k