Agent skill

Install Hooks

by sd0xdev in sd0xdev/sd0x-harness

Install plugin hooks into project .claude/ for persistent use without plugin loaded

MITAuto-check passedDevelopment

Install Install Hooks

skills CLI
$ npx skills add sd0xdev/sd0x-harness --skill install-hooks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sd0xdev/sd0x-harness install-hooks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/install-hooks .claude/skills/install-hooks && rm -rf skills-src

Use ~/.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/

Facts

Skill name
install-hooks
GitHub stars
192
Token cost
~1.1k tokens
SKILL.md length
366 words
Files
1
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

Install plugin hooks into project .claude/ for persistent use without plugin loaded

  • Development work in your project
  • SKILL.md covers Trigger, When NOT to Use, Workflow and Output
  • Calls node and git

What it does

Install Hooks is an agent skill from sd0xdev/sd0x-harness. Install plugin hooks into project .claude/ for persistent use without plugin loaded

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The repository describes itself as: The harness layer for Claude Code — a reference implementation of harness engineering with hook-enforced dual review, state-machine gates that survive context compaction, and… The licence is MIT.

When your agent uses it

  • Development work in your project

Example prompts

  • “/install-hooks”

Requirements

  • Pre-approved tools (allowed-tools): Read, Grep, Glob, Write, AskUserQuestion, Bash(mkdir:*), Bash(diff:*), Bash(git:*), Bash(ls:*), Bash(chmod:*), Bash(jq:*), Bash(node:*)

What it can do on your machine

Read from SKILL.md and the folder at commit c9a2036. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob
    • Write
    • AskUserQuestion
    • Bash(mkdir:*)
    • Bash(diff:*)
    • Bash(git:*)
    • Bash(ls:*)
    • Bash(chmod:*)

    …and 2 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Install Hooks loads about 1.1k tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 366 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

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.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

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

SKILL.md

The full file from sd0xdev/sd0x-harness at commit c9a2036, republished under its MIT licence (© sd0xdev). 366 words, ~1,059 tokens.

Download SKILL.mdSave it as .claude/skills/install-hooks/SKILL.md (or your agent's skills folder).
name
install-hooks
description
Install plugin hooks into project .claude/ for persistent use without plugin loaded
allowed-tools
Read, Grep, Glob, Write, AskUserQuestion, Bash(mkdir:*), Bash(diff:*), Bash(git:*), Bash(ls:*), Bash(chmod:*), Bash(jq:*), Bash(node:*)

Install Hooks

Trigger

  • Keywords: install hooks, setup hooks, copy hooks, install-hooks

When NOT to Use

  • Installing rules (use /install-rules)
  • Installing scripts (use /install-scripts)
  • Full project setup (use /project-setup)

Workflow

Phase 0: Resolve mode; obsolete-set migration (first for non-list invocations; --dry-run forwarded)
Phase 1: Locate plugin hooks dir
Phase 2: Enumerate hook scripts
Phase 3: Determine install set (--all, specific names, or interactive)
Phase 4a: Copy scripts to .claude/hooks/
Phase 4b: Merge hook definitions into settings.json
Phase 4c: Update manifest
Phase 4.5: Backfill CLAUDE.md references
Phase 5: Output report
Phase 0: Obsolete-Set Migration

Resolve the invocation mode first — Phase 0 mutates settings and deletes files, so the non-mutating modes must never reach it live: with --list, skip Phase 0 entirely (listing is read-only); with --dry-run, forward the flag so the migration also only reports:

bash
# --list        → skip this phase
# --dry-run     → append --dry-run to the command below
node "${CLAUDE_PLUGIN_ROOT}/scripts/migrate-hook-lightweighting.js" --repo "$(git rev-parse --show-toplevel)"

Otherwise run the shared migration before any copy or merge — it is what removes the retired enforcement-layer files and their registrations (hook-lightweighting § 3.6), and running it first is what prevents the dangerous half-state (scripts-new + hooks-old).

Ordering inside the script is fixed: it deregisters settings entries first and deletes files only after the settings writes succeed; a failed settings write aborts (exit 1) before any deletion. On exit 1, stop the install and surface the report — installing on top of a repo whose deregistration failed reproduces the half-state the migration exists to prevent. Modified obsolete files are kept on disk (registration disabled) and named in the report; include those lines in Phase 5's output.

Arguments
$ARGUMENTS
ArgumentDescription
--allInstall all available hooks
--listList available hooks without installing
--dry-runShow what would be installed, no changes
--forceOverwrite existing hooks with different content
--localWrite to settings.local.json instead of settings.json
hook-names...Specific hooks to install
Show full SKILL.md (138 more words)Show less
Two-Layer Install
LayerTargetContent
Scripts.claude/hooks/*.shExecutable hook scripts
Definitionssettings.json hooks entriesEvent → script path mapping

Script dependencies: a locally installed hook resolves its helper scripts beside its own copy (.claude/scripts/…), never from the plugin. The whole dependency surface is one checker — scripts/review-state.js (which requires scripts/lib/tree-digest.js) — read by stop-guard.sh, user-prompt-review-guard.sh and post-compact-auto-loop.sh (post-skill-auto-loop.sh is deliberately zero-read: it prints one static gate-order line and consumes nothing). Missing → every hook still runs and still reminds: it reports change-class facts from live git and claims no verdict (nothing blocks — the hooks are reminders, hook-lightweighting § 3.2). Installing the checker via /install-scripts --all (or /project-setup) is what upgrades the reminders from "changed, verdict unknown" to "changed, reviewed at this tree".

Conflict Handling
Script StatusSettings StatusAction
MissingMissingInstall both
IdenticalPresentSkip (up to date)
DifferentPresentAskUserQuestion

Output

markdown
## Install Hooks Report

| Hook | Script | Settings | Status |
|------|--------|----------|--------|
| post-edit-format | ✅ | ✅ | installed |
| stop-guard | ✅ | ⏭️ | skipped (identical) |

Scripts: N installed | Settings entries: M merged

© sd0xdev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/install-hooks of sd0xdev/sd0x-harness.

Open the folder on GitHubat commit c9a2036

Compare with similar skills

Install Hooks 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.

Install Hooks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Install Hooks this skillsd0xdev/sd0x-harness192—~1.1kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k24 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Greplooponyx-dot-app/onyx32k4 repos~3.3kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 24 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed
  • Guidelines

    akash-network/node

    Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.

    1.1k GitHub starsUsed in 22 repos~577 tokens
    DevelopmentAuto-check passed

More from sd0xdev/sd0x-harness

All 91 skills in this repo
  • Adr

    sd0xdev/sd0x-harness

    Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as docs/features/<feature/adr-<NNN-<title.md with a 3-digit zero-padded…

    192 GitHub stars~4.8k tokensUpdated yesterday
    Auto-check passed
  • Load PR Review

    sd0xdev/sd0x-harness

    Load GitHub PR review comments into AI session — analyze, triage, plan.

    192 GitHub stars~4.4k tokensUpdated yesterday
    Auto-check passed
  • Next Step

    sd0xdev/sd0x-harness

    Change-aware next step advisor. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Obsidian CLI

    sd0xdev/sd0x-harness

    Obsidian vault integration via official CLI. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Orchestrate

    sd0xdev/sd0x-harness

    Agent-driven workflow orchestration (v1 report-only). An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • PR Comment

    sd0xdev/sd0x-harness

    Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.

    192 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Install Hooks

What does Install Hooks do?

Install plugin hooks into project .claude/ for persistent use without plugin loaded. Install Hooks is an agent skill from sd0xdev/sd0x-harness.

When should I use Install Hooks?

Install Hooks fits situations like: development work in your project.

How do I install Install Hooks in Claude Code?

Run `npx skills add sd0xdev/sd0x-harness --skill install-hooks -a claude-code`. Or copy the skill folder (skills/install-hooks in sd0xdev/sd0x-harness) into .claude/skills/install-hooks in your project. Claude Code loads it when a task matches its description.

How do I install Install Hooks in Codex?

Run `npx skills add sd0xdev/sd0x-harness --skill install-hooks -a codex`. Or copy the skill folder (skills/install-hooks in sd0xdev/sd0x-harness) into .agents/skills/install-hooks in your project. Codex loads it when a task matches its description.

Can I use Install Hooks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sd0xdev/sd0x-harness --skill install-hooks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/install-hooks, .gemini/skills/install-hooks, .github/skills/install-hooks and .opencode/skills/install-hooks in your project.

What does Install Hooks need to run?

Going by SKILL.md and its folder, Install Hooks needs the command-line tools its instructions call (node and git). Its frontmatter pre-approves these tools: Read, Grep, Glob, Write, AskUserQuestion, Bash(mkdir:*), Bash(diff:*), Bash(git:*), Bash(ls:*), Bash(chmod:*), Bash(jq:*), Bash(node:*).

Does Install Hooks access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Install Hooks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Install Hooks use?

Install Hooks is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Install Hooks use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Install Hooks?

Skills that share tags, products or a category with Install Hooks: Finishing a Development Branch (obra/superpowers, 296k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars), PR Babysitter (openinterpreter/openinterpreter, 69k stars) and Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Install Hooks?

sd0xdev (a GitHub user) maintains it in sd0xdev/sd0x-harness, which has 192 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 6, 2026.

Source: sd0xdev/sd0x-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.