cursor-rescue
cursor-rescue diagnoses and resolves Cursor backend failures in Harness workflows by checking HARNESS_PLUGIN_ROOT resolution, backend configuration, cursor-agent installation, and model routing settings. Use this skill when Cursor delegation fails, cursor-agent is missing, setup-cursor encounters errors, or the backend unexpectedly falls back to Claude instead of resolving to the Cursor implementation.
git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness /tmp/cursor-rescue && cp -r /tmp/cursor-rescue/opencode/skills/cursor-rescue ~/.claude/skills/cursor-rescueSKILL.md
# cursor:rescue - Cursor Backend Recovery
Cursor backend の failure path を短く切り分ける skill。変更は最小限にし、破壊的操作はしない。
## Quick Reference
```bash
cursor:rescue "breezing fell back to claude"
cursor:rescue "cursor-agent not found"
```
## Diagnosis Order
Run one compact diagnostic block:
```bash
set +e
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
echo "==RESOLVED_BACKEND=="
bash "${HARNESS_PLUGIN_ROOT}/scripts/resolve-impl-backend.sh" --role worker
echo "==USER_OR_PROJECT_DEFAULT=="
bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" --show
echo "==CURSOR_MODEL=="
bash "${HARNESS_PLUGIN_ROOT}/scripts/model-routing.sh" --host cursor --role worker --field model
echo "==CURSOR_AGENT=="
CURSOR_AGENT_BIN="${CURSOR_AGENT_BIN:-}"
if [ -z "$CURSOR_AGENT_BIN" ]; then
if command -v cursor-agent >/dev/null 2>&1; then
CURSOR_AGENT_BIN="$(command -v cursor-agent)"
elif [ -x "$HOME/.local/bin/cursor-agent" ]; then
CURSOR_AGENT_BIN="$HOME/.local/bin/cursor-agent"
fi
fi
if [ -z "$CURSOR_AGENT_BIN" ]; then
echo "NOT_INSTALLED: cursor-agent not found in PATH or $HOME/.local/bin"
else
"$CURSOR_AGENT_BIN" --version
fi
echo "==CURSOR_PACKAGE_CHECK=="
bash "${HARNESS_PLUGIN_ROOT}/scripts/setup-cursor.sh" --check
```
## Common Fixes
| Symptom | Fix |
|---|---|
| `cursor-agent` missing | Install / sign in to Cursor CLI, then rerun `cursor:setup --check`. |
| backend resolves to `claude` unexpectedly | Run `bash scripts/set-impl-backend.sh --show`; set user default with `cursor:setup --user-default` or project default with `cursor:setup --project-default`. |
| `setup-cursor.sh --check` fails | Report the first failing `[ERR]` line and the missing file path. |
| companion exits 2 | Workspace guard or forbidden path. Recreate an isolated worktree and retry. |
| companion exits 3 | `cursor-agent` not found in PATH or `$HOME/.local/bin`. |
## Output
Return:
- root cause candidate
- exact failing command
- minimal fix command
- whether retrying the original workflow is safeexecutor が返した advisor-request.v1 に対して方針だけ返す非実行 advisor
Browser automation through the repo agent-browser CLI. Explicit helper for navigation, forms, screenshots, scraping, and web-app checks. Prefer Browser Use or Playwright when available. Do NOT load for: sharing URLs, embedding links, or editing screenshot files.
Explicit helper for authentication and payment implementation with Clerk, Supabase Auth, or Stripe. Do NOT load for: general UI work, database design, or non-auth features.
Team execution mode — backward-compatible alias for harness-work with team orchestration. Composer/composer 2.5 maps to the cursor backend.
Validates brainstormed ideas with Cursor PM, updates Plans.md, then handoff back. Cursor ↔ Claude Code 2-Agent workflow support. Use when user mentions Cursor PM handoff, 2-agent plan validation, CC-Cursor round trip, or brainstorm review. Do NOT load for: implementation work, single-agent tasks, or direct coding.
Quality guardrail for Claude/Codex update integration. Detects doc-only Feature Table additions and requires implementation or explicit planning. Internal use only.
CI red? Call us. Pipeline fire brigade deploys. Use when user mentions CI failures, build errors, test failures, or pipeline issues. Do NOT load for: local builds, standard implementation work, reviews, or setup.
Explicit helper for CRUD scaffolding and API endpoint generation. Do NOT load for: UI components, form design, database schema discussion, or general implementation.