Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Run automatically on Claude Code events. Claude doesn't decide.
1 caution to review before installing
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
File protection hooks for Claude Code that guard against accidental overwrites and encourage modular code.
Unified entry point that runs all file protection checks:
Two-phase speed bump for edits outside a git worktree:
EnterWorktree)Flag validity is tied to the session_id from the hook's JSON stdin payload:
session_id gracefully allows the edit (speed bump, not security gate)Edits inside a worktree or outside a git repo are always allowed.
Headless sessions (claude -p / SDK, where CLAUDE_CODE_ENTRYPOINT starts with
sdk) skip the speed bump entirely — there's no human to answer the ask, so the
edit is allowed. Interactive terminals, IDEs, and Task-tool subagents keep the guard.
Uses a "speed bump" pattern:
No configuration required. The hooks are automatically loaded by Claude Code
when CLAUDE_HOOKS_DIR points to the parent claude-hooks directory.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub steeef/claude-hooks --plugin file-protectionPlugins from other owners that cover similar ground