karanb192/claude-code-hooks

🪝 Claude Code hooks + an installable plugin marketplace: safety, cost, observability, productivity.

491Stars on the repository
29Mods indexed here, across every type
8d agoLast push, which is what freshness is scored on
MITLicence, which decides whether bodies are shown

auto-stage

02

karanb192/claude-code-hooks

Plugin Claude Code

Automatic git staging for Claude Code. A PostToolUse hook on Edit|Write runs git add on every file Claude modifies, so git status always shows exactly what Claude touched and pre-commit review needs no manual staging. Files outside a git repo are skipped, .gitignore is respected (ignored files fail to stage and the.

491 8d ago A tokens not measured original MIT

karanb192/claude-code-hooks

Plugin Claude Code

A PreToolUse guard for Bash that blocks dangerous shell commands before they execute: rm targeting home/root/system dirs, dd to disk devices, mkfs, fork bombs, curl|sh, force push to main, git reset --hard, chmod 777, docker volume rm, and more. Three safety levels (critical/high/strict, picked via HOOKSAFETYLEVEL) c.

491 8d ago B tokens not measured original MIT

bounty-board

04

karanb192/claude-code-hooks

Plugin Claude Code

Turns your repo's tech debt into an aging bounty economy. A SessionStart hook scans tracked files and prices each TODO/FIXME/HACK/skip as a wanted-poster bounty whose XP grows with its git-blame age, injects the top 3 as opportunistic side quests, and, via a PostToolUse hook, verifies and pays out bounties that…

491 8d ago A tokens not measured original MIT

karanb192/claude-code-hooks

Plugin Claude Code

Stops rm -rf content silently destroying Content on case-insensitive filesystems (APFS default, exFAT, NTFS). A PreToolUse hook on Bash that resolves the real target of destructive commands (rm, rmdir, mv, mkdir, touch, find -delete) through cd/pushd chains, quotes, subshells, and heredocs, and denies the ones that.

491 8d ago C tokens not measured original MIT

config-guard

06

karanb192/claude-code-hooks

Plugin Claude Code

Who guards the guards: a PreToolUse hook that blocks the agent from tampering with its own guardrail configuration. Deny-by-default protection for settings.json, hook scripts and hooks.json manifests, .mcp.json, plugin manifests, and (at strict level) CLAUDE.md and rules/agents/commands, across Bash, Edit, MultiEdit…

491 8d ago A tokens not measured original MIT

config-watch

07

karanb192/claude-code-hooks

Plugin Claude Code

Tripwire for out-of-band config changes in Claude Code. A ConfigChange hook fires whenever settings (user, project, local, policy) or skills change mid-session, from an installer script, an npm postinstall payload, or any other process rewriting settings while a session runs, and makes the change loudly visible via…

491 8d ago A tokens not measured original MIT

context-hogs

08

karanb192/claude-code-hooks

Plugin Claude Code

A per-file context-cost leaderboard for Claude Code. A PostToolUse hook (async, zero added latency) attributes every tool result's tokens to the file(s) it pulled into context; at SessionEnd (or on demand via /context-hogs:leaderboard) it renders your repo's most token-expensive files with estimated cost, so you know…

491 8d ago A tokens not measured original MIT

dead-end-registry

09

karanb192/claude-code-hooks

Plugin Claude Code

Approach-level negative-knowledge memory for Claude Code. Mines your transcripts (Stop/PreCompact, both async and zero added latency) for approaches you TRIED and then REVERTED (with the reason, date, and estimated token cost of the detour) into a per-repo registry. On UserPromptSubmit it injects a 'you already tried…

491 8d ago A tokens not measured original MIT

dead-rules-audit

10

karanb192/claude-code-hooks

Plugin Claude Code

A CLAUDE.md compliance flight-recorder for Claude Code. At SessionStart it parses CLAUDE.md into numbered atomic rules; on every Edit/MultiEdit/Write a PostToolUse hook (async, zero added latency) passively tallies how often each rule was relevant and whether it was followed or violated; at SessionEnd (or on demand…

491 8d ago A tokens not measured original MIT

format-code

11

karanb192/claude-code-hooks

Plugin Claude Code

Auto-formats files the moment Claude writes them. A PostToolUse hook on Write|Edit runs ruff (check --fix + format, via uv) on Python and prettier (via npx) on JS/TS/JSON/MD/YAML/HTML, resolving relative paths against the session cwd and passing file paths as argv so shell metacharacters in filenames can never inject…

491 8d ago A tokens not measured original MIT

git-safety

12

karanb192/claude-code-hooks

Plugin Claude Code

Branch-aware git guardrails for Claude Code. A PreToolUse hook on Bash that denies destructive git and gh CLI operations before they run: pushing to main/master, deleting protected branches, commit/merge/rebase/reset/push while on a protected branch, and gh pr merge/close, issue close, release delete, repo delete.…

491 8d ago A tokens not measured original MIT

guard-pack

13

karanb192/claude-code-hooks

Plugin Claude Code

All six guard hooks in one Node process: config-guard, block-dangerous-commands, protect-secrets, protect-tests, git-safety, and case-insensitive-guard, evaluated in that order with the first blocking verdict winning in that guard's own output format. Installing the guards individually costs six Node startups per…

491 8d ago A tokens not measured original MIT

instructions-audit

14

karanb192/claude-code-hooks

Plugin Claude Code

A prompt-injection tripwire for instruction files. An InstructionsLoaded hook audits CLAUDE.md / .claude/rules/.md content as it enters context and flags hidden or hostile directives: invisible Unicode smuggling (zero width characters, tag characters, variation-selector runs; the TrapDoor supply-chain signature), bidi.

491 8d ago A tokens not measured original MIT

nerf-receipts

15

karanb192/claude-code-hooks

Plugin Claude Code

A personal flight recorder for Claude Code quality. Background hooks (async, zero added latency) record your own per-session signals keyed by model id and Claude Code version: tool-failure rate, same-file edit churn, turn-end counts, and tokens-per-completed-task. At your next SessionStart (or on demand via…

491 8d ago A tokens not measured original MIT

notify-permission

16

karanb192/claude-code-hooks

Plugin Claude Code

Slack alerts when Claude Code needs you. A Notification hook on permissionprompt|idleprompt|elicitationdialog classifies each notification (from notificationtype when present, else from keywords in the message) and posts a Slack Block Kit card to your CCHSLAWEBHOOK: a tool-specific title (Bash/Write/Edit/Read per.

491 8d ago A tokens not measured original MIT

pr-provenance-stamp

17

karanb192/claude-code-hooks

Plugin Claude Code

Embeds a reviewer-facing provenance receipt into your PR body when Claude runs gh pr create (or glab mr create). A PostToolUse hook (async, zero added latency) records a per-session ledger: tool calls, agent-authored lines, and every test/typecheck command with its real exit code; a PreToolUse (Bash) hook then rewr.

491 8d ago A tokens not measured original MIT

protect-secrets

18

karanb192/claude-code-hooks

Plugin Claude Code

A secrets firewall for Claude Code. A PreToolUse hook screens every Read, Edit, Write, and Bash call against tiered patterns (critical/high/strict): sensitive files like .env, SSH keys, AWS/kube/gcloud/docker credentials, and keystores, plus shell commands that expose or exfiltrate them (cat .env, printenv, echo…

491 8d ago A tokens not measured original MIT

protect-tests

19

karanb192/claude-code-hooks

Plugin Claude Code

Stops the "fake green" failure mode for Claude Code. A PreToolUse guard on Bash|Edit|MultiEdit|Write that denies making a suite pass by deleting test files or directories (rm / git rm), renaming a test to a disabled name (.bak, .disabled, ...), or adding a skip/xfail/ignore marker to an existing test, across pytest…

491 8d ago A tokens not measured original MIT

session-logger

20

karanb192/claude-code-hooks

Plugin Claude Code

A durable, greppable markdown log of every Claude Code session. SessionStart seeds a note (timestamps, cwd, git repo/branch), an async PostToolUse hook appends every Edit/Write/Read/Bash with zero added latency (bash commands truncated and secret-redacted, concurrent writes serialized via a file lock), and SessionEnd…

491 8d ago A tokens not measured original MIT

standup-autopilot

21

karanb192/claude-code-hooks

Plugin Claude Code

Turns what your agents ACTUALLY did into a standup: captured from session transcripts (not commits/tickets, which miss uncommitted work, real test exit codes, and unresolved errors) and rolled up cross-repo. Stop/SessionEnd snapshot each session's outcome (task, branch + diffstat, tests + exit codes, PRs, blockers) to.

491 8d ago A tokens not measured original MIT