Hook Development for Claude Code Plugins
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
Checks and configures Cursor as the implementation backend for Claude Code Harness, at user or project level, without touching shipped defaults.
$ npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Chachamaru127/claude-code-harness cursor-setup --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cursor-setup .claude/skills/cursor-setup && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "cursor-setup" agent skill from https://github.com/Chachamaru127/claude-code-harness/tree/main/skills/cursor-setup into .claude/skills/cursor-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cursor-setup", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Chachamaru127/claude-code-harness/tree/main/skills/cursor-setupType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Chachamaru127/claude-code-harness cursor-setup --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/cursor-setup .agents/skills/cursor-setup && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cursor-setup" agent skill from https://github.com/Chachamaru127/claude-code-harness/tree/main/skills/cursor-setup into .agents/skills/cursor-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cursor-setup", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Chachamaru127/claude-code-harness cursor-setup --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/cursor-setup .cursor/skills/cursor-setup && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cursor-setup" agent skill from https://github.com/Chachamaru127/claude-code-harness/tree/main/skills/cursor-setup into .cursor/skills/cursor-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cursor-setup", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Chachamaru127/claude-code-harness.git --path skills/cursor-setup--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Chachamaru127/claude-code-harness cursor-setup --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/cursor-setup .gemini/skills/cursor-setup && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cursor-setup" agent skill from https://github.com/Chachamaru127/claude-code-harness/tree/main/skills/cursor-setup into .gemini/skills/cursor-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cursor-setup", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Chachamaru127/claude-code-harness cursor-setupInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/cursor-setup .github/skills/cursor-setup && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cursor-setup" agent skill from https://github.com/Chachamaru127/claude-code-harness/tree/main/skills/cursor-setup into .github/skills/cursor-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cursor-setup", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Chachamaru127/claude-code-harness cursor-setup --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/cursor-setup .opencode/skills/cursor-setup && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cursor-setup" agent skill from https://github.com/Chachamaru127/claude-code-harness/tree/main/skills/cursor-setup into .opencode/skills/cursor-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cursor-setup", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cursor-setupChecks and configures Cursor as the implementation backend for Claude Code Harness, at user or project level, without touching shipped defaults.
Running `cursor:setup` works in one of four modes. `--check` reports which backend resolves and whether the Cursor package is ready, `--user-default` makes Cursor the default for the current user, `--project-default` does the same for the current project, and `--unset` removes the setting at either scope, asking which one when the request does not say. Each mode calls helper scripts such as `setup-cursor.sh`, `set-impl-backend.sh` and `resolve-impl-backend.sh` from the Harness plugin root.
Rules keep the change local. Distribution defaults and plugin manifests stay untouched so the shipped fallback remains `claude`, and files like `~/.cursor/permissions.json`, `.cursorignore` and the Claude sandbox allowlists are treated as the user's own unless they ask for a local edit. The reply is limited to three facts: the resolved backend (claude, codex or cursor), Cursor package readiness, and the next manual step if Cursor is not ready.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 2b2b748. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadBashFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
bashFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cursor Backend Setup loads about 1.1k tokens when it runs. Until then it costs about 81 tokens; SKILL.md has 160 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Read, BashAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Chachamaru127/claude-code-harness at commit 2b2b748, republished under its MIT licence (© Chachamaru127). 160 words, ~1,141 tokens.
.claude/skills/cursor-setup/SKILL.md (or your agent's skills folder).Cursor backend の setup / verification 用 skill。配布 plugin の fallback は claude のままにし、現在の repo / user 環境だけ cursor default にする時に使う。
cursor:setup --check
cursor:setup --user-default
cursor:setup --project-default
cursor:setup --unsetscripts/resolve-impl-backend.sh / scripts/set-impl-backend.sh; do not infer from HARNESS_IMPL_BACKEND alone.~/.cursor/permissions.json, .cursorignore, and Claude sandbox allowlists as manual/user-owned setup surfaces unless the user explicitly asks to edit a local file.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
fiFor --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" --versionFor --user-default, run:
bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" --user cursor
bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" --showFor --project-default, run:
bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" cursor
bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" --showFor --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" --unsetUser scope:
bash "${HARNESS_PLUGIN_ROOT}/scripts/set-impl-backend.sh" --unset --userReport three facts only:
claude / codex / cursor)setup-cursor.sh --check)© Chachamaru127, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/cursor-setup of Chachamaru127/claude-code-harness.
Open the folder on GitHubat commit 2b2b748
Cursor Backend Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cursor Backend Setup this skillChachamaru127/claude-code-harness | 3.2k | — | ~1.1k | Automated safety check: Notes | MIT | |
| Hook Development for Claude Code Pluginsanthropics/claude-plugins-official | 37k | 11 repos | ~4.1k | Automated safety check: Notes | Apache-2.0 | |
| Claude Code Agent Developmentanthropics/claude-plugins-official | 37k | 8 repos | ~2.8k | Automated safety check: Pass | Apache-2.0 | |
| Claude Code Skill Developer Guidediet103/claude-code-infrastructure-showcase | 10k | 10 repos | ~3.5k | Automated safety check: Pass | MIT | |
| Plugin Settings Patternanthropics/claude-plugins-official | 37k | 7 repos | ~3k | Automated safety check: Pass | Apache-2.0 | |
| MCP Integration for Pluginsanthropics/claude-plugins-official | 37k | 11 repos | ~3.1k | Automated safety check: Pass | Apache-2.0 |
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
diet103/claude-code-infrastructure-showcase
A guide to creating and managing Claude Code skills with auto-activation: skill-rules.json triggers, hooks, enforcement levels, YAML frontmatter and progressive disclosure.
anthropics/claude-plugins-official
Shows how Claude Code plugins keep per-project settings and state in .claude/plugin-name.local.md files with YAML frontmatter and a markdown body.
anthropics/claude-plugins-official
Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.
anthropics/claude-plugins-official
Explains how to write Claude Code slash commands: Markdown files with YAML frontmatter, arguments, file references, bash context and interactive prompts.
Chachamaru127/claude-code-harness
Diagnoses failing CI pipelines and tests, deciding first whether the test or the implementation is at fault, and hands hard cases to a dedicated fixer subagent.
Chachamaru127/claude-code-harness
Hands one implementation task to Cursor Composer in an isolated git worktree, then reviews its diff and cherry-picks the result into the main branch.
Chachamaru127/claude-code-harness
Renders a single HTML page showing each acceptance criterion as verified or not, with a ship, wait, or reject recommendation for non-engineers.
Chachamaru127/claude-code-harness
Repeats a long task as a series of scheduled wake-ups, each re-entering with fresh context and calling harness-work for one task per cycle.
Chachamaru127/claude-code-harness
Creates and maintains Plans.md task plans with a spec delta, updates task markers and syncs plan progress with the implementation.
Chachamaru127/claude-code-harness
Runs a release for any project that keeps a Keep a Changelog file on GitHub, from version bump to merge, tag and GitHub Release after a single approval.
Categories
Checks and configures Cursor as the implementation backend for Claude Code Harness, at user or project level, without touching shipped defaults. Running `cursor:setup` works in one of four modes. `--check` reports which backend resolves and whether the Cursor package is ready, `--user-default` makes Cursor the default for the current user, `--project-default` does the same for the current project, and `--unset` removes the setting at either scope, asking which one when the request does not say.
Cursor Backend Setup fits situations like: making Cursor the default implementation backend for your user account; checking whether the Cursor plugin and agent are ready for the Harness; setting or removing a project-level Cursor backend override.
Run `npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -a claude-code`. Or copy the skill folder (skills/cursor-setup in Chachamaru127/claude-code-harness) into .claude/skills/cursor-setup in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -a codex`. Or copy the skill folder (skills/cursor-setup in Chachamaru127/claude-code-harness) into .agents/skills/cursor-setup in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Chachamaru127/claude-code-harness --skill cursor-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cursor-setup, .gemini/skills/cursor-setup, .github/skills/cursor-setup and .opencode/skills/cursor-setup in your project.
Going by SKILL.md and its folder, Cursor Backend Setup needs the command-line tools its instructions call (bash). Our summary lists: Claude Code Harness plugin with its setup-cursor.sh and set-impl-backend.sh scripts; Bash. Its frontmatter pre-approves these tools: Read, Bash.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Cursor Backend Setup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cursor Backend Setup: Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 37k stars), Claude Code Agent Development (anthropics/claude-plugins-official, 37k stars), Claude Code Skill Developer Guide (diet103/claude-code-infrastructure-showcase, 10k stars) and Plugin Settings Pattern (anthropics/claude-plugins-official, 37k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Chachamaru127 (a GitHub user) maintains it in Chachamaru127/claude-code-harness, which has 3,153 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 5, 2026.
Source: Chachamaru127/claude-code-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.