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.
By karanb192v1.4.0MITIn 1 marketplace
Blocks risky shell commands, secret reads, and edits to tests or config before Claude runs them, all in one hook process. Duplicates run twice if installed alongside the individual guard plugins.
Trending plugins
7-day copy clicks
Run automatically on Claude Code events. Claude doesn't decide.
Public GitHub repos that commit this plugin as enabled in their Claude Code settings
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
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.
All seven guard hooks in one Node process. Installing them individually costs seven Node startups per matching tool call; the pack pays one. Measured (bench/RESULTS.md): 38 ms median for the pack vs 199 ms for the six pattern guards separately on the same machine, before the spawn cap joined.
One PreToolUse registration on Bash|Read|Edit|MultiEdit|Write|Agent|Task|Grep evaluates, in order: subagent-spawn-cap, config-guard, block-dangerous-commands, protect-secrets, protect-tests, git-safety, case-insensitive-guard. The spawn cap goes first because its filter is one cached module load and a single tool-name compare and, on an Agent call, it is the only guard that applies; after it, cheap string checks run before the guards that touch the filesystem or spawn git. The first deny wins. An ask does not stop the pack: the remaining guards still run, and a later deny replaces the ask, the same deny-over-ask precedence Claude Code applies when the standalone hooks run side by side. The winning verdict is emitted in that guard's own format (same emoji, same [id], same reason text) with a (via guard-pack) suffix. A guard that throws is logged and skipped, so one broken guard can never switch off the other six.
The guard scripts in lib/ are byte-identical copies of the individual plugin scripts, pinned by a test, so the pack can never drift from the standalone guards.
Grep reaches protect-secrets through the same checks as the standalone plugin, including Windows paths and directory/filter combinations. Its search limitations also apply here; broad searches can still expose secrets.
/plugin marketplace add karanb192/claude-code-hooks
/plugin install guard-pack@claude-code-hooks
Restart Claude Code, done.
Do not install the pack alongside the individual guard plugins (or a manual settings.json registration of any of the seven): every duplicated guard runs twice on each matching tool call, with double latency, double denials, and for the spawn cap a double-counted budget. Pick one or the other.
From 1.3.0 the pack also runs in Codex CLI. Version 1.4.0 adds the spawn cap and Codex configuration protection; each of the seven guards also has its own Codex entry point.
codex plugin marketplace add karanb192/claude-code-hooks
codex plugin add guard-pack@claude-code-hooks
Then open /hooks in Codex and approve guard-pack. Codex skips a hook nobody has approved, and it skips the pack again after every update until you approve the new version.
What changes under Codex:
apply_patch input and checks each file as Claude Code's Write (new file), Edit (changed file) or a shell rm / mv (deleted or moved file). A patch it cannot read is blocked with [unreadable-patch]. A moved file also gets a destination Write check using its added lines; this conservative approximation can reject a move onto an existing test file.apply_patch <<'EOF' or applypatch <<'EOF', with the full patch and closing delimiter on separate lines. Multiple such commands on separate lines are supported. Detected patch calls using other forms, including wrappers, expansions, pipes and file redirection, are blocked. Detection recognises common command positions, quoting and wrappers; it is not a shell interpreter and cannot resolve aliases or dynamically constructed command names. Prefer the native patch tool.HOOK_ASK_*) blocks, and its reason says why.spawn_agent is counted without an ask tier: SPAWN_CAP_DENY=60 permits the first 59 calls and denies the 60th. Resuming a thread keeps its count; nested threads have separate budgets. Parallel calls can overshoot the threshold. See the cap's Codex policy.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 karanb192/claude-code-hooks --plugin guard-packPlugins from other owners that cover similar ground