# script: install-hooks **Location:** `scripts/install-hooks.sh` ## Purpose Symlinks all hook scripts from `claude-foundations/hooks/` into `~/.claude/hooks/`, and symlinks skill-helper scripts from `claude-foundations/scripts/` into `~/.claude/scripts/`. Also prints the `settings.json` configuration to add. ## Usage ```bash cd ~/dev/claude/projects/claude-foundations scripts/install-hooks.sh ``` One-time setup. Re-run after adding new hooks or skill-helper scripts. ## How it works 1. Iterates over `hooks/*.sh`, creates symlinks in `~/.claude/hooks/` (force-overwrites) 2. Iterates over a curated list of skill-helper scripts, creates symlinks in `~/.claude/scripts/` 3. Prints the JSON config for `~/.claude/settings.json` covering PreCompact, PostToolUse, and PreToolUse matchers ## Skill-helper scripts vs regular scripts Not all `claude-foundations/scripts/` go into `~/.claude/scripts/`. Only scripts that skills reference via `~/.claude/scripts/` are installed there. The `SKILL_HELPERS` array in `install-hooks.sh` is the authoritative list. Currently: `extract-transcripts.py`, `list-transcripts-here.sh`. Regular scripts (`statusline.sh`, `set-topic.sh`, etc.) are accessed via their full path in `claude-foundations/scripts/`. ## Profile notes - Hooks: `~/.claude/hooks/` is referenced in all profile `settings.json` files — install once, works everywhere - Scripts: `~/.claude/scripts/` is the only location skills reference — no per-profile script dirs needed ## Gotchas - The printed JSON must be manually added to `settings.json` — the script doesn't edit it automatically. - Symlinks mean the hook/script code stays in the repo; updates take effect immediately without re-running the script. - Adding a new skill-helper script requires updating the `SKILL_HELPERS` array in `install-hooks.sh` and re-running it.