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 dzianisvv0.5.0MITIn 1 marketplace
Stops Claude from finishing a turn while GitHub CI for commits it pushed this session is red or still running. A hook also sends each git or GitHub write to a judge model and blocks ones that break your plain-English rules.
Trending plugins
7-day copy clicks
Run automatically on Claude Code events. Claude doesn't decide.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
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
github-ci, ci-gate, git-hooks, pr-review, commit-review, stop-hook, guardrails
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Two guards for an agent that works through git and GitHub:
Before a git commit|push, gh stack push|submit|link, gh pr|issue write or a writing gh api call
(non-GET method, -f/-F fields, or a GraphQL mutation), the plugin runs
opencode run -m "$(< model)" with the rules and the command, and the judge answers ALLOW or
DENY: <reason>. A deny blocks the tool call and the reason goes back to the agent. Reads never reach
the judge.
Both files live in ~/.agents/plugins/gh-guard/ and are created with defaults on the first
session start or Bash call. An existing file is never overwritten, so edit them freely.
| File | Content |
|---|---|
model | One provider/model line, default fireworks-ai/accounts/fireworks/routers/deepseek-flash-latest |
rules | One plain-English rule per line (a directory of *.md files also works) |
Default rules:
- Plain english. Tldr, do not write a lot.
- Remove AI slop.
- To a change request reply with commit id where it is addressed.
- Do not resolve threads when replied
The review fails open: no opencode, a timeout (GH_GUARD_REVIEW_TIMEOUT, default 60 seconds) or an
unreadable verdict allows the command, shows a warning, and is logged with every verdict to
~/.agents/state/gh-guard/review.jsonl. When the review or the CI check cannot run, the user gets a desktop notification (and an opencode toast) through
packages/shared/notify; AGENTS_NOTIFY=0 turns it off. Missing API keys are read from ~/.env for the judge process
only. Set GH_GUARD_REVIEW=0 to turn the review off. Each review adds about 5 seconds to a write
command. Runs in Claude Code (PreToolUse) and both opencode entries (v1 src/opencode/plugin.ts, v2
server.ts).
Try it by hand:
bin/git-rules-review init
bin/git-rules-review check --command "gh api graphql -f query='mutation { resolveReviewThread(input:{threadId:\"x\"}) { thread { id } } }'"
gh pr|issue|release post, a
writing gh api) in this session arms the guard. A session that only reads code never runs git or
gh at stop time. A post records the current branch when refs/heads/<branch> equals
refs/remotes/origin/<branch>.git push, gh stack push|submit|link, git-sign-batch (without
--dry-run/--no-push), or a GitHub write command, record the branch and its SHA, but only when
refs/heads/<branch> equals refs/remotes/origin/<branch>. No fetch.stop_hook_active also stops a
repeat in the same turn). The commit is recorded in budget/, beside the state file, so a passing
gate that deletes the state cannot re-arm it; a later stop on the same commit only notifies. A
genuinely new commit blocks once more. Pending says "CI pending on <branch>@<sha7>". opencode and
the v2 server nudge the same way. Every nudge and every stop block starts with [gh-guard], so
the source is obvious. The rules behind this are in AGENTS.md, "Plugin loop safety".State lives in ~/.agents/state/gh-guard/<runtime>-<session_id>.json.
A gh call that returns Bad credentials (an exported GH_TOKEN that has expired) is retried once
with GH_TOKEN and GITHUB_TOKEN removed, so gh's own keyring auth is used and a stale token cannot
wedge a session. The judge subprocess retries once on a transport or socket drop.
Claude Code also runs src/claude/session-end.ts: when a session ends with CI still red or pending, it
sends a desktop notification, so an interrupted or abandoned turn is not silent. opencode has no
session-end event; its nudge is the equivalent.
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 dzianisv/agents-plugins --plugin gh-guardPlugins from other owners that cover similar ground