blue/.claude/hooks/guard-write.sh
Eric Garcia f5d3621495 feat: RFC 0052 blue install command - implemented
Adds unified installation management for Claude Code integration:

  blue install      - Install hooks, skills, MCP server
  blue uninstall    - Remove Blue from Claude Code
  blue doctor       - Check installation health

Components managed:
- Hooks: session-start.sh (PATH), guard-write.sh (guard)
- Skills: Symlinks to ~/.claude/skills/
- MCP Server: Configuration in ~/.claude.json

Features:
- --hooks-only, --skills-only, --mcp-only flags
- --force to overwrite existing files
- Managed files tagged with "# Managed by: blue install"
- Idempotent - safe to run repeatedly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:02:37 -05:00

11 lines
231 B
Bash
Executable file

#!/bin/bash
# Managed by: blue install
# Blue PreToolUse hook - enforces RFC 0038 worktree protection
FILE_PATH=$(jq -r '.tool_input.file_path // empty')
if [ -z "$FILE_PATH" ]; then
exit 0
fi
blue guard --path="$FILE_PATH"