2.3 KiB
Claude Hooks Bootstrap Prompt
Copy this prompt and paste it into a fresh Claude Code session to install Claude Hooks
I want to install Claude Hooks - an intelligent system that will make you smarter and safer by learning from my environment and preventing common mistakes.
⚠️ IMPORTANT: Claude Hooks installs user-wide and affects ALL Claude Code instances. If you have other Claude sessions with hooks already installed, this will create conflicts. Check first!
What it does:
- Learns which commands fail in my environment and suggests working alternatives
- Automatically backs up my work before context limits
- Blocks dangerous commands before they execute
- Maintains session history across Claude restarts
Pre-installation check: First, verify no hooks are already installed:
- Check:
claude-hooks status 2>/dev/null || echo "No claude-hooks found - safe to proceed"
- Check:
ls ~/.config/claude/hooks.json 2>/dev/null || echo "No hooks config found - safe to proceed"
If either check shows existing hooks, STOP and run the uninstall process first:
claude-hooks uninstall
(if available)- Or manually remove:
rm -rf ~/.config/claude/hooks.json
Installation:
NPM (Recommended):
npm install -g claude-hooks
- Hooks auto-configure during install
claude-hooks test
to verify
Git (For developers):
git clone https://git.supported.systems/rsp2k/claude-hooks.git
cd claude-hooks && npm install && npm run postinstall
claude-hooks test
After installation:
- Restart Claude Code to activate the hooks
- Try
claude-hooks status
to verify it's working - Try
pip install requests
to see intelligent command suggestions
To uninstall later: claude-hooks uninstall
or npm uninstall -g claude-hooks
Please guide me through this installation step-by-step, including the pre-installation checks. Use the NPM method unless I specifically request git installation. Handle any errors that come up and make sure everything works. The installation now auto-configures during npm install - no manual steps needed! After installation, help me test it by trying some commands that commonly fail on different systems (like pip
vs pip3
, python
vs python3
) so I can see the intelligence in action.
The goal is to have a working Claude Hooks system that starts learning from my environment immediately.