Configure human-in-the-loop gating for AI agent review
review-agent-governance — Setup

Configure human-in-the-loop gating for AI agent review actions in Claude Code. Use when setting up a project where an agent may post PR reviews, comments, merges, or edit CI configuration, and you want a cryptographically auditable…
--- name: review-agent-setup description: Configure human-in-the-loop gating for AI agent review actions in Claude Code. Use when setting up a project where an agent may post PR reviews, comments, merges, or edit CI configuration, and you want a cryptographically auditable approval trail with Cedar-enforced gates. --- # review-agent-governance — Setup Gate AI agent review actions (PR reviews, comments, merges, CI edits) behind explicit human approval. Every attempt, approved or denied, produces an Ed25519-signed receipt. ## When to use this plugin Install it in projects where a Claude Code agent: - Reviews, comments on, or merges pull requests (`gh pr review`, `gh pr merge`) - Triages issues (`gh issue comment`, `gh issue close`) - Publishes releases (`gh release create`)
Overview
Gate AI agent review actions (PR reviews, comments, merges, CI edits) behind explicit human approval. Every attempt, approved or denied, produces an Ed25519-signed receipt.
Manual install (npx, ZIP)
npx skills add wshobson/agents --skill review-agent-setup -g -a claude-codemkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \
| tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/review-agent-governance/skills/review-agent-setupNew-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/8d89931500a281de856b/review-agent-setup.zip" -OutFile "$env:TEMP\review-agent-setup.zip"; Expand-Archive "$env:TEMP\review-agent-setup.zip" -DestinationPath "$HOME\.claude\skills" -ForceConnects with Agent Alley MCP · agentalley.io/mcp
Files included
SKILL.md5.1 KB
Read the files here
wshobson/
Shared references3SKILL.md reads these from elsewhere in the repo. Not in the ZIP.
- evaluate.shplugins/protect-mcp/hooks/1.5 KB
- hooks.jsonplugins/protect-mcp/hooks/459 B
- review-policy-author.mdplugins/review-agent-governance/agents/5.6 KB
Show the full text171 lines
review-agent-governance — Setup
Gate AI agent review actions (PR reviews, comments, merges, CI edits) behind explicit human approval. Every attempt, approved or denied, produces an Ed25519-signed receipt.
When to use this plugin
Install it in projects where a Claude Code agent:
- Reviews, comments on, or merges pull requests (
gh pr review,gh pr merge) - Triages issues (
gh issue comment,gh issue close) - Publishes releases (
gh release create) - Modifies CI configuration (
.github/workflows/,.gitlab-ci.yml) - Pushes to protected branches (
main,master,release,production) - Posts to external notification surfaces (Slack webhooks, Discord)
If the agent is only doing local file edits and running tests, this plugin is
overkill. Use protect-mcp for general tool-call policy enforcement and skip
this one.
One-time setup
1. Install the plugin
claude plugin install wshobson/agents/review-agent-governance
2. Copy the default policy to your project
cp .claude/plugins/review-agent-governance/policies/review-agent-governance.cedar \
./review-governance.cedar
You can edit this file to match your project's specific rules. See
../agents/review-policy-author.md for guidance on authoring review
policies.
3. Create a receipts directory and sign key
mkdir -p ./review-receipts
echo "./review-receipts/" >> .gitignore
echo "./review-governance.key" >> .gitignore
echo "./.review-approved" >> .gitignore
The first invocation of protect-mcp sign will create the key. Commit the
public key from the first receipt so auditors can verify later.
Per-session workflow
The Cedar policy denies review-surface actions unconditionally. To approve a specific action, open an approval window before it and close it after.
Flag file (simplest)
# Before the action you want to approve
touch ./.review-approved
# Let Claude Code run the review / comment / merge
# Immediately after
rm ./.review-approved
Slash command (from within Claude Code)
/approve-review "Reviewing PR #123 authored by contributor X"
This creates ./.review-approved with the given reason embedded as a note,
and writes a human-approved receipt to the chain. A follow-up rm is still
needed to close the window.
Dry-run everything (force full policy evaluation)
If you want every tool call to go through Cedar with no approval bypass:
export REVIEW_APPROVAL_FLAG=./.never-approve
Any tool call matching a forbid rule will be denied; approved windows have no effect. Useful for CI or for a locked-down audit run.
Verifying the chain
List all receipts:
ls -la ./review-receipts/
Verify the entire chain offline:
npx @veritasacta/verify ./review-receipts/*.json
Exit 0 means every receipt is authentic and the chain is intact. Exit 1 means one receipt has been tampered with. Exit 2 means a receipt is malformed.
Look at recent denials:
/list-pending
Within Claude Code this slash command walks the receipt chain and prints
any recent decision: deny entries with the tool name, command pattern,
and timestamp.
Example: approving a PR review
# 1. Human reviews the agent's proposed comment
$ /list-pending
Recent denials:
- 2026-04-17T14:23:01Z Bash "gh pr review 42 --approve --body 'LGTM'"
- 2026-04-17T14:23:02Z Bash "gh pr comment 42 --body 'Looking good'"
# 2. Human decides the first one is appropriate, approves it
$ /approve-review "Approving LGTM on PR 42 after visual inspection"
./.review-approved created
# 3. Agent retries the action; this time it succeeds
$ agent: gh pr review 42 --approve --body "LGTM"
[receipt: rec_XXX, decision=allow, reason=human_approved]
# 4. Human closes the window
$ rm ./.review-approved
Every step is in the receipt chain. The chain is offline-verifiable for regulators, counterparties, or downstream auditors who want to confirm that no review action bypassed the human gate.
Composing with protect-mcp
If both plugins are installed, each plugin's hooks/hooks.json registers its
own PreToolUse hook, and Claude Code runs both on every tool call:
{ "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT}\"/hooks/evaluate.sh" }
Each evaluate.sh reads tool_name and tool_input from the hook payload on
stdin (Claude Code sets no TOOL_NAME variable) and evaluates its own policy:
./protect.cedar for protect-mcp and ./review-governance.cedar here.
Both hooks must pass for the tool call to proceed. Cedar deny in either policy blocks it.
Standards
- Ed25519 — RFC 8032 (digital signatures)
- JCS — RFC 8785 (deterministic JSON canonicalization)
- Cedar — AWS's open authorization policy language
- IETF draft — draft-farley-acta-signed-receipts
| 1 | |
| 2 | name review-agent-setup |
| 3 | description Configure human-in-the-loop gating for AI agent review actions in Claude Code. Use when setting up a project where an agent may post PR reviews, comments, merges, or edit CI configuration, and you want a cryptographically auditable approval trail with Cedar-enforced gates. |
| 4 | |
| 5 | |
| 6 | # review-agent-governance — Setup |
| 7 | |
| 8 | Gate AI agent review actions (PR reviews, comments, merges, CI edits) behind |
| 9 | explicit human approval. Every attempt, approved or denied, produces an |
| 10 | Ed25519-signed receipt. |
| 11 | |
| 12 | ## When to use this plugin |
| 13 | |
| 14 | Install it in projects where a Claude Code agent: |
| 15 | |
| 16 | Reviews, comments on, or merges pull requests (`gh pr review`, `gh pr merge`) |
| 17 | Triages issues (`gh issue comment`, `gh issue close`) |
| 18 | Publishes releases (`gh release create`) |
| 19 | Modifies CI configuration (`.github/workflows/`, `.gitlab-ci.yml`) |
| 20 | Pushes to protected branches (`main`, `master`, `release`, `production`) |
| 21 | Posts to external notification surfaces (Slack webhooks, Discord) |
| 22 | |
| 23 | If the agent is only doing local file edits and running tests, this plugin is |
| 24 | overkill. Use `protect-mcp` for general tool-call policy enforcement and skip |
| 25 | this one. |
| 26 | |
| 27 | ## One-time setup |
| 28 | |
| 29 | ### 1. Install the plugin |
| 30 | |
| 31 | |
| 32 | claude plugin install wshobson/agents/review-agent-governance |
| 33 | |
| 34 | |
| 35 | ### 2. Copy the default policy to your project |
| 36 | |
| 37 | |
| 38 | cp .claude/plugins/review-agent-governance/policies/review-agent-governance.cedar \ |
| 39 | ./review-governance.cedar |
| 40 | |
| 41 | |
| 42 | You can edit this file to match your project's specific rules. See |
| 43 | `../agents/review-policy-author.md` for guidance on authoring review |
| 44 | policies. |
| 45 | |
| 46 | ### 3. Create a receipts directory and sign key |
| 47 | |
| 48 | |
| 49 | mkdir -p ./review-receipts |
| 50 | echo "./review-receipts/" >> .gitignore |
| 51 | echo "./review-governance.key" >> .gitignore |
| 52 | echo "./.review-approved" >> .gitignore |
| 53 | |
| 54 | |
| 55 | The first invocation of `protect-mcp sign` will create the key. Commit the |
| 56 | public key from the first receipt so auditors can verify later. |
| 57 | |
| 58 | ## Per-session workflow |
| 59 | |
| 60 | The Cedar policy denies review-surface actions unconditionally. To approve |
| 61 | a specific action, open an approval window before it and close it after. |
| 62 | |
| 63 | ### Flag file (simplest) |
| 64 | |
| 65 | |
| 66 | # Before the action you want to approve |
| 67 | touch ./.review-approved |
| 68 | |
| 69 | # Let Claude Code run the review / comment / merge |
| 70 | |
| 71 | # Immediately after |
| 72 | rm ./.review-approved |
| 73 | |
| 74 | |
| 75 | ### Slash command (from within Claude Code) |
| 76 | |
| 77 | |
| 78 | /approve-review "Reviewing PR #123 authored by contributor X" |
| 79 | |
| 80 | |
| 81 | This creates `./.review-approved` with the given reason embedded as a note, |
| 82 | and writes a human-approved receipt to the chain. A follow-up `rm` is still |
| 83 | needed to close the window. |
| 84 | |
| 85 | ### Dry-run everything (force full policy evaluation) |
| 86 | |
| 87 | If you want every tool call to go through Cedar with no approval bypass: |
| 88 | |
| 89 | |
| 90 | export REVIEW_APPROVAL_FLAG=./.never-approve |
| 91 | |
| 92 | |
| 93 | Any tool call matching a forbid rule will be denied; approved windows have |
| 94 | no effect. Useful for CI or for a locked-down audit run. |
| 95 | |
| 96 | ## Verifying the chain |
| 97 | |
| 98 | List all receipts: |
| 99 | |
| 100 | |
| 101 | ls -la ./review-receipts/ |
| 102 | |
| 103 | |
| 104 | Verify the entire chain offline: |
| 105 | |
| 106 | |
| 107 | npx @veritasacta/verify ./review-receipts/*.json |
| 108 | |
| 109 | |
| 110 | Exit 0 means every receipt is authentic and the chain is intact. Exit 1 |
| 111 | means one receipt has been tampered with. Exit 2 means a receipt is |
| 112 | malformed. |
| 113 | |
| 114 | Look at recent denials: |
| 115 | |
| 116 | |
| 117 | /list-pending |
| 118 | |
| 119 | |
| 120 | Within Claude Code this slash command walks the receipt chain and prints |
| 121 | any recent `decision: deny` entries with the tool name, command pattern, |
| 122 | and timestamp. |
| 123 | |
| 124 | ## Example: approving a PR review |
| 125 | |
| 126 | |
| 127 | # 1. Human reviews the agent's proposed comment |
| 128 | $ /list-pending |
| 129 | Recent denials: |
| 130 | - 2026-04-17T14:23:01Z Bash "gh pr review 42 --approve --body 'LGTM'" |
| 131 | - 2026-04-17T14:23:02Z Bash "gh pr comment 42 --body 'Looking good'" |
| 132 | |
| 133 | # 2. Human decides the first one is appropriate, approves it |
| 134 | $ /approve-review "Approving LGTM on PR 42 after visual inspection" |
| 135 | ./.review-approved created |
| 136 | |
| 137 | # 3. Agent retries the action; this time it succeeds |
| 138 | $ agent: gh pr review 42 --approve --body "LGTM" |
| 139 | [receipt: rec_XXX, decision=allow, reason=human_approved] |
| 140 | |
| 141 | # 4. Human closes the window |
| 142 | $ rm ./.review-approved |
| 143 | |
| 144 | |
| 145 | Every step is in the receipt chain. The chain is offline-verifiable for |
| 146 | regulators, counterparties, or downstream auditors who want to confirm |
| 147 | that no review action bypassed the human gate. |
| 148 | |
| 149 | ## Composing with protect-mcp |
| 150 | |
| 151 | If both plugins are installed, each plugin's `hooks/hooks.json` registers its |
| 152 | own PreToolUse hook, and Claude Code runs both on every tool call: |
| 153 | |
| 154 | |
| 155 | { "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT}\"/hooks/evaluate.sh" } |
| 156 | |
| 157 | |
| 158 | Each `evaluate.sh` reads `tool_name` and `tool_input` from the hook payload on |
| 159 | stdin (Claude Code sets no `TOOL_NAME` variable) and evaluates its own policy: |
| 160 | `./protect.cedar` for protect-mcp and `./review-governance.cedar` here. |
| 161 | |
| 162 | Both hooks must pass for the tool call to proceed. Cedar deny in either |
| 163 | policy blocks it. |
| 164 | |
| 165 | ## Standards |
| 166 | |
| 167 | **Ed25519** — RFC 8032 (digital signatures) |
| 168 | **JCS** — RFC 8785 (deterministic JSON canonicalization) |
| 169 | **Cedar** — AWS's open authorization policy language |
| 170 | **IETF draft** — [draft-farley-acta-signed-receipts] |
| 171 |
Details
- Updated
- Sep 21, 2026
- License
- MIT
- Stars on the repo
- ★ 39,857
- Checked
- Source
- wshobson/agents ↗
- Creator
- wshobson · 179 listings
Similar skills
See all →
SkillTests in real browsers via Chrome DevTools MCPBrowser testing with devtools
MCPThis MCP server attempts to exercise all the featuresEverything MCP Server
MCPA Model Context Protocol server that provides web contentFetch MCP Server
MCPNode.js server implementing Model Context ProtocolFilesystem MCP Server
SkillAbout libraries, frameworks, API referencesContext7 MCP
SkillUses Chrome DevTools via MCP for efficient debuggingMore from wshobson
SkillMaster C/.NET backend development patterns for building
SkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliance
SkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Design
SkillMigrate from AngularJS to Angular using hybrid modeAngular migration
SkillUnderstand anti-reversing, obfuscationAnti reversing techniques
SkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patterns