Generated banner for Review Agent Setup
Generated logo for Review Agent Setup

Review Agent Setup

Seth HobsonCommunityCreated by Tom FarleyDistributed by Seth Hobson

  • Skill
  • Workflow
  • Security
  • MIT
  • No issues found

From the author

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.
— the description by Tom Farley

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a framework for implementing human-in-the-loop governance for AI agents operating within Claude Code. It uses Cedar authorization policies to gate sensitive actions such as pull request management, CI configuration changes, and issue triaging. The system generates cryptographically signed Ed25519 receipts for every action, providing an auditable trail of approvals and denials.

What it does

  • Enforces human approval gates for specific agent commands using Cedar policies.
  • Generates cryptographically signed receipts for all approved actions.
  • Supports manual approval windows via flag files or slash commands.
  • Provides tools for offline verification of action receipts.
  • Allows for dry-run modes to force full policy evaluation without bypasses.
  • Integrates with other security plugins to require multiple policy checks.

When to use it

  • When an agent is authorized to modify pull requests, CI configurations, or protected branches.
  • When you need a verifiable, auditable record of agent actions.
  • When you want to restrict agent autonomy for specific high-impact tasks.
  • When working in environments requiring strict command-level authorization.

Advantages

  • Provides a clear, cryptographically verifiable audit trail.
  • Uses industry-standard Cedar policies for flexible authorization logic.
  • Allows for granular control over agent capabilities.
  • Supports offline verification of action history.

Usage examples

“/approve-review "Approving PR merge for feature branch"”
Creates an approval flag file and logs the reason, allowing the agent to proceed with the merge command.
“npx @veritasacta/[email protected] --replay-chain ./review-receipts/receipts.jsonl --key "$PUB"”
Verifies the integrity and authenticity of the agent's action history using the provided public key.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/wshobson/review-agent-setup/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip review-agent-setup.zip -d .agents/skills

Documentation by Tom Farley

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), once you add a rule for the command that posts (the default policy does not gate them)

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
if [ ! -e ./review-governance.key ]; then
  d=$(mktemp -d) && npx [email protected] init --dir "$d" && mv "$d/keys/gateway.json" ./review-governance.key
fi
chmod 600 ./review-governance.key

protect-mcp 0.7.4 sign does not create the key, so the last command creates it, and it never replaces an existing key. Without a key, the receipts are unsigned. To rotate the key, archive ./review-governance.key and ./review-receipts/receipts.jsonl first, then run the command again. Give auditors the publicKey value from ./review-governance.key. Do not commit the file, because it also holds the private key.

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 records the reason in an unsigned approval log under ./review-receipts/approvals/. 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 receipts

List all receipts:

ls -la ./review-receipts/

Verify every receipt offline with the public key:

PUB=$(node -p 'JSON.parse(require("fs").readFileSync("./review-governance.key")).publicKey')
npx @veritasacta/[email protected] --replay-chain ./review-receipts/receipts.jsonl --key "$PUB"

Exit 0 means every receipt verified. Exit 1 means a receipt failed verification, because it was tampered with, the key is wrong, or a line is malformed. Exit 2 means the receipts file could not be read.

A denied call never runs, so it has no receipt. To see what the policy blocked, run this inside Claude Code:

/list-pending

It lists the tool calls that the PreToolUse hook blocked in the current session, with the tool name and the command or path.

Example: approving a PR review

# 1. Human reviews the agent's proposed comment
$ /list-pending
  Blocked in this session:
  - Bash "gh pr review 42 --approve --body 'LGTM'"
  - 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 appended to ./review-receipts/receipts.jsonl, decision=allow]

# 4. Human closes the window
$ rm ./.review-approved

The allowed call has a signed receipt that anyone with the public key can verify offline. The denied attempt has no receipt, and the approval log is not signed, so keep both in mind when you show the trail to an auditor.

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

Files

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Node.js

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Tom Farley
Publisher
Seth Hobson (Community)
Distributed by
Seth Hobson
Source
wshobson/agents · plugins/review-agent-governance/skills/review-agent-setup · commit 4bde316
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Tom Farley or Seth Hobson.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download review-agent-setup.zip