install-hookslisted
Install: claude install-skill rvdbreemen/adr-kit
# adr-kit install-hooks
You install or uninstall the adr-kit pre-commit hook in the project the user is currently in (`pwd` should be the project root).
## Default behaviour: install
### Step 1 — Resolve the plugin's hook template
```bash
ADR_KIT=$(ls -d ~/.claude/plugins/cache/rvdbreemen-adr-kit/adr-kit/*/ | sort -V | tail -1)
TEMPLATE="$ADR_KIT/templates/githooks/pre-commit"
```
If `$TEMPLATE` does not exist or is empty, exit with an error: the plugin install is broken; tell the user to reinstall via `/plugin install adr-kit@rvdbreemen-adr-kit`.
### Step 2 — Detect existing hooks
Three cases:
- **No `.githooks/pre-commit`.** Mkdir `.githooks/`, copy the template, `chmod +x`, set `core.hooksPath`. Done.
- **Existing `.githooks/pre-commit` is byte-identical to the template.** No-op. Tell the user it's already installed.
- **Existing `.githooks/pre-commit` differs.** Read both. Show the user the existing content (truncated to first 30 lines). Ask:
- `prepend adr-kit before existing` — write a wrapper script that calls adr-kit then `exec`s the original. Save the original as `.githooks/pre-commit.adr-kit-saved`.
- `replace` — overwrite. Save the old hook as `.githooks/pre-commit.backup-<timestamp>` for safety.
- `abort` — do nothing.
Apply the user's choice.
### Step 3 — Activate
Run `git config core.hooksPath .githooks`. Confirm with `git config --get core.hooksPath`. If the project already has `core.hooksPath` set to a different directory, do NOT overwrite —