Back to list
b-open-io

hook-manager

by b-open-io

prompts for generating powerful code using open-protocols

6🍴 2📅 Jan 24, 2026

SKILL.md


name: hook-manager description: Discover and install Claude Code hooks from bopen-tools. This skill should be used when users ask to "list hooks", "install a hook", "show available hooks", "enable hook", "what hooks are available", or need help managing Claude Code automation hooks.

Hook Manager

Discover, install, and manage Claude Code hooks from the bopen-tools collection.

Available Hooks

HookEventDescriptionAuto-install
protect-env-filesPreToolUseBlocks edits to .env files (security)Recommended
uncommitted-reminderStopShows uncommitted changes when Claude stopsOptional
auto-git-addPostToolUseAuto-stages files after editsOptional
time-dir-contextUserPromptSubmitAdds timestamp/dir/branch to promptsOptional
lint-on-savePostToolUseRuns lint:fix after file editsOptional
lint-on-startSessionStartRuns linting on session startOptional
auto-test-on-savePostToolUseRuns tests after file editsOptional
protect-shadcn-componentsPreToolUseProtects shadcn UI componentsOptional

Installing a Hook

Hooks are installed by copying the JSON config to ~/.claude/hooks/:

# Create hooks directory if needed
mkdir -p ~/.claude/hooks

# Copy hook from plugin cache
cp ~/.claude/plugins/cache/bopen-tools/user/.claude/hooks/<hook-name>.json ~/.claude/hooks/

Then restart Claude Code to load the hook.

Hook Details

Security hook - Prevents accidental edits to environment files containing secrets.

  • Blocks: .env, .env.local, .env.production, .env.staging
  • Prompts for confirmation if edit attempted
  • No performance impact

uncommitted-reminder

Shows git status when Claude finishes responding if there are uncommitted changes.

  • Helps prevent forgotten commits
  • Exit code 2 feeds back to Claude

auto-git-add

Automatically runs git add -A after Write/Edit/MultiEdit operations.

  • Only stages, never commits
  • 5 second timeout

time-dir-context

Adds context line to every prompt: timestamp, working directory, git branch.

  • Example: Context: 2025-01-24 14:32:15 | /Users/you/project | Branch: main

lint-on-save

Runs bun lint:fix after file edits.

  • Requires project with lint:fix script in package.json
  • Requires bun and jq
  • Works with statusline for lint count display

lint-on-start

Runs linting when session starts.

  • Same requirements as lint-on-save

auto-test-on-save

Runs tests after file edits.

  • Can be slow on large test suites
  • Consider project-specific setup

protect-shadcn-components

Prevents edits to shadcn/ui component files.

  • Only relevant for projects using shadcn/ui

Uninstalling a Hook

rm ~/.claude/hooks/<hook-name>.json

Restart Claude Code.

Listing Installed Hooks

ls ~/.claude/hooks/

Quick Install Commands

# Security (recommended)
cp ~/.claude/plugins/cache/bopen-tools/user/.claude/hooks/protect-env-files.json ~/.claude/hooks/

# Workflow helpers
cp ~/.claude/plugins/cache/bopen-tools/user/.claude/hooks/uncommitted-reminder.json ~/.claude/hooks/
cp ~/.claude/plugins/cache/bopen-tools/user/.claude/hooks/auto-git-add.json ~/.claude/hooks/

# Context enrichment
cp ~/.claude/plugins/cache/bopen-tools/user/.claude/hooks/time-dir-context.json ~/.claude/hooks/

# Development automation
cp ~/.claude/plugins/cache/bopen-tools/user/.claude/hooks/lint-on-save.json ~/.claude/hooks/
cp ~/.claude/plugins/cache/bopen-tools/user/.claude/hooks/lint-on-start.json ~/.claude/hooks/

Verifying Installation

After installing and restarting Claude Code:

claude --debug

Look for hook registration messages in the debug output.

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon