Skip to main content
skill Claude Code CX Codex Cursor

review-agent-setup — Claude Code skill: what it does, how to install

This skill gates AI review actions behind manual human approval before pull requests or CI pipelines change. Every attempt generates an Ed25519-signed receipt for offline auditing.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add wshobson/agents
/plugin install review-agent-governance@claude-code-workflows
Open on GitHub

What review-agent-setup does

The skill sets up Cedar authorization policies and a PreToolUse hook to intercept agent commands. By default, access is blocked. It denies critical operations such as gh pr merge or modifications to .github/workflows/. The agent cannot approve pull requests or publish releases on its own until a human grants permission.

Approvals work through a temporary flag file touch ./.review-approved or the /approve-review slash command. Signing requires an Ed25519 key created with npx [email protected] init. Every allowed action records a signed entry in ./review-receipts/receipts.jsonl. You can verify this audit trail offline with @veritasacta/[email protected]. If an action gets rejected, run /list-pending to see what was stopped.

Installing this workflow makes sense only if the agent touches PRs or branches like main. When Claude Code only edits local files and runs tests, this setup is overkill. Use protect-mcp instead for basic tool calls.

What it helps with

  • block automated gh pr review and gh pr merge execution
  • gate modifications to .github/workflows/ behind manual approval
  • produce cryptographically verifiable Ed25519 receipts for compliance
  • inspect blocked tool calls in the current session using /list-pending

Example prompts for the agent

  • /approve-review "Reviewing PR #123 authored by contributor X"
  • /list-pending
  • Set up review-agent-governance policies and generate the signing key in ./review-governance.key

How to install review-agent-setup

1Plugin marketplace

/plugin marketplace add wshobson/agents
/plugin install review-agent-governance@claude-code-workflows

This installs the whole review-agent-governance plugin with all its skills

2Skills CLI (Vercel)

npx skills add wshobson/agents --skill review-agent-setup -a claude-code

3Manually: put the files in place

~/.claude/skills/review-agent-setup/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/review-agent-setup/

From the same set213

The whole set →
typescript-advanced-types Seth Hobson Guides an agent through advanced TypeScript types, from generics to conditional and mapped types. Use it for typed libraries, API clients, or strict configuration objects. Claude Code CX Codex Cursor 92,169installs tailwind-design-system Seth Hobson Helps build design systems with Tailwind CSS v4, from theme tokens to component variants. Use it when a project needs shared UI patterns. Claude Code CX Codex Cursor 70,180installs brand-landingpage Travis D. Elliott This skill interviews you about the product and its visual direction, then builds a landing page through Stitch. Use it when there’s no established design yet. Claude Code CX Codex Cursor 39,476installs python-testing-patterns Seth Hobson This skill guides Python testing with pytest, fixtures and mocks. Use it when building a test suite or tracking down failing checks. Claude Code CX Codex Cursor 36,943installs python-performance-optimization Seth Hobson This skill profiles Python code to locate CPU and memory bottlenecks. Use it when an application responds slowly or consumes too many resources. Claude Code CX Codex Cursor 35,675installs nextjs-app-router-patterns Seth Hobson This skill covers Next.js App Router patterns for rendering, routing, and data fetching. Use it when starting an App Router project or moving from Pages Router. Claude Code CX Codex Cursor 32,529installs api-design-principles Seth Hobson Use this skill to plan or review REST and GraphQL APIs. It helps when writing a specification or setting API conventions for a team. Claude Code CX Codex Cursor 30,348installs code-review-excellence Seth Hobson This skill guides pull request reviews, catches logic and security issues, and helps teams give specific feedback. Use it for review standards or developer mentoring. Claude Code CX Codex Cursor 30,193installs

Similar

github-actions-hardening official github Reviews .github/workflows/*.yml against the Actions threat model linters miss: attacker-controlled text pasted into run:, privileged triggers running fork code, unpinned actions. GitHub Copilot 2,200installs codeql official github Walks you through CodeQL code scanning: Actions workflows, CLI commands, SARIF output, and fixing failed analyses. GitHub Copilot 2,000installs google-cloud-filestore-log-troubleshooting official google Diagnoses Google Cloud Filestore mount failures, access errors, and network timeouts. Use it when an NFS share stops mounting from a VM, GKE pod, or another supported workload. Claude Code Gemini CLI CX Codex 1,600installs sandbox-npm-install official github This skill installs npm dependencies on Docker's local ext4 filesystem and symlinks node_modules back into the workspace. Use it with virtiofs mounts. GitHub Copilot 1,700installs gdpr-compliant official github This skill guides GDPR-aware work with APIs, user data, logs, retention, and deletion. Use it when a code task involves personal data. GitHub Copilot 1,700installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. Claude Code 499,069installs ponytail-review DietrichGebert ponytail-review reviews a change beyond the diff, checking connected code, bugs, risks, load, tests, speed, and unnecessary code. Use it for PRs and commits. Claude Code CX Codex Cursor +1 56,300installs ponytail-audit DietrichGebert It audits a repository and ranks bugs, risks, and redundant code in a one-shot report. Use it when you need a review without code changes. Claude Code CX Codex Cursor +1 44,800installs

Questions about review-agent-setup

How to install review-agent-setup in Claude Code?

Add the plugin source with /plugin marketplace add wshobson/agents and run /plugin install review-agent-governance@claude-code-workflows, or use npx skills add wshobson/agents --skill review-agent-setup -a claude-code.

What does review-agent-setup do?

It enforces human approval before an AI agent can merge pull requests, triage issues, or edit CI workflows. Every executed command appends an Ed25519-signed receipt to a local log.

How do you verify the audit receipts?

Extract the public key from ./review-governance.key and run npx @veritasacta/[email protected] --replay-chain ./review-receipts/receipts.jsonl --key "$PUB". Exit code 0 indicates every entry passed validation.

Source text

SKILL.md · MIT
---
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`)
- 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

```bash
claude plugin install wshobson/agents/review-agent-governance
```

### 2. Copy the default policy to your project

```bash
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

```bash
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
```

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)

```bash
# 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:

```bash
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:

```bash
ls -la ./review-receipts/
```

Verify every receipt offline with the public key:

```bash
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

```bash
# 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:

```json
{ "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](https://datatracker.ietf.org/doc/draft-farley-acta-signed-receipts/)

© Tom Farley · MIT · wshobson/agents

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor