# Cursor Setup

Configure and verify the Cursor backend for Claude Code Harness.

- Repository: https://github.com/Chachamaru127/claude-code-harness (3190 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -g -a claude-code -y`
Codex: `npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -g -a codex -y`
Cursor: `npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -g -a cursor -y`
Gemini CLI: `npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Chachamaru127/claude-code-harness`

## 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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# cursor:setup - Cursor Backend Setup

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

## Quick Reference

```bash
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:

```bash
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:

The rest: https://github.com/Chachamaru127/claude-code-harness/blob/HEAD/codex/.codex/skills/cursor-setup/SKILL.md
