aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile19
1 files changed, 16 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c368e2f..8fb9750 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,10 @@ CLAUDE_DIR := $(HOME)/.claude
SKILLS := $(patsubst %/SKILL.md,%,$(wildcard */SKILL.md))
RULES := $(wildcard claude-rules/*.md)
HOOKS := $(wildcard hooks/*.sh hooks/*.py)
+# Opt-in hooks: present in the repo but not installed by default. Users link
+# them manually if they want the behavior. Add new opt-ins to this list.
+OPTIN_HOOKS := hooks/destructive-bash-confirm.py
+DEFAULT_HOOKS := $(filter-out $(OPTIN_HOOKS),$(HOOKS))
CLAUDE_CONFIG := $(wildcard .claude/*.json) $(wildcard .claude/.*.json)
LANGUAGES := $(notdir $(wildcard languages/*))
@@ -252,10 +256,10 @@ list: ## Show global install status
echo " - commands"; \
fi
-install-hooks: ## Symlink global hooks into ~/.claude/hooks/ + print settings.json snippet
+install-hooks: ## Symlink default hooks into ~/.claude/hooks/ + print settings.json snippet (opt-in hooks excluded)
@mkdir -p $(HOOKS_DIR)
- @echo "Hooks:"
- @for hook in $(HOOKS); do \
+ @echo "Hooks (default):"
+ @for hook in $(DEFAULT_HOOKS); do \
name=$$(basename $$hook); \
if [ -L "$(HOOKS_DIR)/$$name" ]; then \
echo " skip $$name (already linked)"; \
@@ -266,6 +270,15 @@ install-hooks: ## Symlink global hooks into ~/.claude/hooks/ + print settings.js
echo " link $$name → $(HOOKS_DIR)/$$name"; \
fi \
done
+ @if [ -n "$(strip $(OPTIN_HOOKS))" ]; then \
+ echo ""; \
+ echo "Opt-in hooks (not installed by default — link manually if you want them):"; \
+ for hook in $(OPTIN_HOOKS); do \
+ name=$$(basename $$hook); \
+ echo " - $$name"; \
+ echo " ln -s $(CURDIR)/$$hook $(HOOKS_DIR)/$$name"; \
+ done; \
+ fi
@echo ""
@echo "Merge this into ~/.claude/settings.json (preserve any existing hooks arrays):"
@echo ""