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 uses the Bash tool
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.
Keeps a session's work from being left unfinished: runs the pre-commit workflow before commits, and checks at session end that the work is committed, pushed, and proposed.
All features are individually toggleable via configuration.
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
No hook in this plugin calls an LLM.
/plugin install guardian@werdnum-plugins
Works out of the box with:
.pre-commit-config.yaml exists)stopValidation.enabled defaults to false)Runs before git commits and PR creation:
git add commands in the commit commandEvery gate here is deterministic — it either runs a real command or does nothing.
Note: This hook no longer runs an automatic LLM code review. The review shelled out to
review-changes.py(defaulting to Gemini) on every commit, and with no API key configured it failed open: the hook reported "no specific issues available" and let the commit through regardless of the diff, which reads like a review that passed. TheReviewed: cache-{id}andBypass-Review: {reason}commit-message sentinels went with it — there is nothing left to acknowledge or bypass.The review script itself was worth keeping and now lives outside the plugin, at
scripts/review-changes.pyin the marketplace repository. Run it by hand when you want a review, where a missing API key is a visible error rather than a silent pass.
Runs concrete quality checks against repository state before the session ends:
Regular Mode:
Levels: each check is configured as ignore, warn, or error.
| Level | Behaviour |
|---|---|
ignore | Check does not run |
warn | Issue is reported to you as a system message; the session still stops |
error | Stop is blocked and the issue is sent back to Claude to fix |
Only error blocks. uncommittedChanges, unpushedCommits and noPr all
default to warn, so out of the box stop validation reports but never blocks.
Raise a specific check to error if you want it enforced.
When the git checks stay quiet: these checks only fire when there is
genuinely something left to do, and stay silent whenever they cannot determine
the answer rather than guessing. Specifically, the "no PR created" check is
skipped on a detached HEAD, on the trunk/default branch, when the branch has no
commits ahead of its base branch, when HEAD has not yet reached its upstream —
whether never pushed or pushed and since added to (the unpushed-commits check
covers those instead, so you don't get told to push and to open a PR for the
same missing step) — and when the PR lookup itself fails: gh missing,
unauthenticated, no GitHub remote, or an API error.
"Has this been pushed?" is answered by asking whether HEAD is contained in any
remote-tracking ref — not by counting commits against the base branch, and not
by looking for tracking configuration. A base comparison misreads a local-only
main (the base ref is HEAD, so zero commits ahead reads as "already
pushed"), and an @{u} check misses git push origin HEAD:feature, which
publishes the branch without setting up tracking. Push advice names an existing
remote (origin when present, otherwise the first configured one) and says so
plainly when there is no remote at all.
Nothing assumes the remote is called origin or the trunk is called
main/master. The base branch resolves through each remote's recorded
default (refs/remotes/<remote>/HEAD) first, then conventional names on each
remote, then local ones — so an upstream/develop layout is handled.
A closed or merged PR only counts as "this branch has a PR" while its head commit is still the branch's head. That keeps a branch from being re-nagged once its PR lands, without letting a stale PR vouch for new commits pushed to a branch that was reused after its previous PR merged.
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 werdnum/claude-code-plugins --plugin guardianPlugins from other owners that cover similar ground