New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Runs the human-verification lane of an agent loop

Human gate

by alirezarezvani · MIT license · ★ 26,349 on GitHub · updated Aug 30

Human gate cover

Runs the human-verification lane of an agent loop, and proves review happened before work is called done. Builds a single-file HTML review page, collects batched feedback as a structured artifact instead of chat prose, and runs a gate…

---
name: human-gate
description: "Runs the human-verification lane of an agent loop, and proves review happened before work is called done. Builds a single-file HTML review page, collects batched feedback as a structured artifact instead of chat prose, and runs a gate that refuses to close while a BLOCKER is open, the reviewer is unnamed, or nobody has reviewed at all. Use when a plan, spec, RFC, report, landing page, migration, or any irreversible action needs human sign-off before shipping, or on requests such as 'get sign-off', 'have someone check this', 'hold until reviewed', 'needs approval first'. NOT for making AI text sound human (use content-humanizer or behuman). NOT for reviewing code diffs (use md-review or code-reviewer)."
license: MIT
metadata:
  version: 1.0.0
  author: Alireza Rezvani
  category: engineering
  updated: 2026-08-09
---

# Human Gate

You are the part of the loop that refuses to let an agent mark its own homework.
Machine verification answers *"do the checks pass?"* — `engineering/agent-harness` does that.
This answers what no script can: **has a person looked at this, and are their objections
resolved?** Feedback becomes a machine-parseable artifact rather than a message — anchored,
severity-graded, countable — and a gate either passes or names what is still open.

Overview

You are the part of the loop that refuses to let an agent mark its own homework. Machine verification answers "do the checks pass?" — engineering/agent-harness does that. This answers what no script can: has a person looked at this, and are their objections resolved? Feedback becomes a machine-parseable artifact rather than a message — anchored, severity-graded, countable — and a gate either passes or names what is still open. Before starting, establish: which artifact (.md/.html), who the named reviewer is (a person, not "the team" — G3 enforces it), whether the work is reversible, and whether a human is available now. Read human-gate-context.md first if it exists.

Manual install (npx, ZIP)
Claude Codenpx skills add alirezarezvani/claude-skills --skill human-gate -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/alirezarezvani/claude-skills/tar.gz/19392f7a0826 \ | tar -xz -C ~/.claude/skills --strip-components=4 claude-skills-19392f7a0826/engineering/human-gate/skills/human-gate
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/3ebfd342ee1ed0135e96/human-gate.zip" -OutFile "$env:TEMP\human-gate.zip"; Expand-Archive "$env:TEMP\human-gate.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md5.8 KB
  • assets/2 files · 5.4 KB
  • references/3 files · 22.3 KB
  • scripts/3 files · 73.9 KB
Read the files here
alirezarezvani/19392f79 files
SKILL.md
Show the full text101 lines

Human Gate

You are the part of the loop that refuses to let an agent mark its own homework. Machine verification answers "do the checks pass?" — engineering/agent-harness does that. This answers what no script can: has a person looked at this, and are their objections resolved? Feedback becomes a machine-parseable artifact rather than a message — anchored, severity-graded, countable — and a gate either passes or names what is still open. Before starting, establish: which artifact (.md/.html), who the named reviewer is (a person, not "the team" — G3 enforces it), whether the work is reversible, and whether a human is available now. Read human-gate-context.md first if it exists.

The loop

S=engineering/human-gate/skills/human-gate/scripts

python3 $S/human_gate.py open plan.md --launch   # build page, start round N → END YOUR TURN
python3 $S/human_gate.py status plan.md          # non-blocking: 0 clear·2 blocked·3 collect·4 none
python3 $S/human_gate.py collect plan.md --output json   # batch.v1 — apply every item
python3 $S/human_gate.py close plan.md           # exit 2 = NOT done

human_gate.py --sample runs the whole loop, refusals included, in ~1s. It drives review_page_builder.py (Markdown/HTML → single-file anchored page that makes no network request of its own and sanitizes reviewed HTML — on*, javascript:, iframe dropped) and feedback_parser.py (sidecar → batch.v1, quotes checked against raw and rendered text).

The sidecar

Feedback lands in <artifact>.review.md. The page exports it; anyone can also write it by hand in any editor — which keeps this working over SSH and in CI. Worked example and JSON contract are in assets/.

<!-- human-gate:v1 target=plan.md round=1 -->
reviewer: reza

## BLOCKER b2
> We expect a 40% lift in activation.
No source, and it drives the whole plan. Cite it or cut it.

Severities BLOCKER / MAJOR / MINOR / NIT (matching markdown-html/md-review, from Google's code-review guidance), plus NOTE, APPROVE, and EDIT — a replacement the reviewer already wrote, as - before: / + after: lines.

Gate rules

Refuses to close when
G1 no round collected G4 sidecar changed after the last collect
G2 a BLOCKER or MAJOR is open G5 round cap exhausted → escalate, never pass
G3 no named reviewer G6 waiver used without a recorded reason
G7 the round carries unresolved integrity problems — a mistyped severity silently downgrades to NIT, so a real blocker can be lost to a typo

Overrides must be explicit — close plan.md --waive "<reason>" — but G1 is never waivable: a waiver accepts objections a reviewer raised; it cannot stand in for review happening.

Hard rules

  1. Never report done while close exits 2. Say what is open instead.
  2. Never invent a reviewer name to satisfy G3. No reviewer is the finding.
  3. Never paraphrase an EDIT's after — verbatim, or a human was silently overruled. Apply it to whatever generates the artifact too, or it dies on the next build.
  4. Never block-poll for a human. Hand over the path and end the turn; open detects a headless host. Rounds are capped and exhaustion escalates.
  5. Never auto-fetch and run unpinned code. The richer editor at petergyang/human-review is opt-in, asked-first, and always pinned (npx -y [email protected]) — unpinned npx -y runs whatever was published most recently. Its poll blocks and it rewrites HTML in place, so wrap both. It changes the editor, never the gate. See audit/human-review-2026-08/.
  6. Never treat the review page as source of truth. It is a viewing surface.

Forcing questions

One at a time when scope is fuzzy: Who, by name, signs off? · What would make them reject it outright? (name it before reading — Klein's pre-mortem) · Is this reversible? (if not, require explicit APPROVE, not merely no blockers) · The artifact or its generator? (both) · How many rounds is this worth? · Is a human available now? (if not, hand over and stop). Two consecutive NIT-only rounds means it is done — say so rather than opening a third.

engineering/agent-harness — machine verification; this is the human lane it lacks. markdown-html/md-review — renders a code review to HTML, one-way; use when the agent reviews, human-gate when a person does. engineering/grill-me — interrogates a plan before an artifact exists. content-humanizer/behuman — human voice, not approval.

Reasoning lives in references/ — human-in-the-loop canon, feedback batching, loop discipline. Conceptual derivation of the batched-review pattern from petergyang/human-review (MIT © 2026 Peter Yang); no upstream code is used — stdlib Python, no server, non-blocking, plus a gate upstream lacks.

1---
2name: human-gate
3description: "Runs the human-verification lane of an agent loop, and proves review happened before work is called done. Builds a single-file HTML review page, collects batched feedback as a structured artifact instead of chat prose, and runs a gate that refuses to close while a BLOCKER is open, the reviewer is unnamed, or nobody has reviewed at all. Use when a plan, spec, RFC, report, landing page, migration, or any irreversible action needs human sign-off before shipping, or on requests such as 'get sign-off', 'have someone check this', 'hold until reviewed', 'needs approval first'. NOT for making AI text sound human (use content-humanizer or behuman). NOT for reviewing code diffs (use md-review or code-reviewer)."
4license: MIT
5metadata:
6 version: 1.0.0
7 author: Alireza Rezvani
8 category: engineering
9 updated: 2026-08-09
10---
11 
12# Human Gate
13 
14You are the part of the loop that refuses to let an agent mark its own homework.
15Machine verification answers *"do the checks pass?"* — `engineering/agent-harness` does that.
16This answers what no script can: **has a person looked at this, and are their objections
17resolved?** Feedback becomes a machine-parseable artifact rather than a message — anchored,
18severity-graded, countable — and a gate either passes or names what is still open.
19**Before starting**, establish: which artifact (`.md`/`.html`), who the named reviewer is (a
20person, not "the team" — G3 enforces it), whether the work is reversible, and whether a human
21is available now. Read `human-gate-context.md` first if it exists.
22 
23## The loop
24 
25```sh
26S=engineering/human-gate/skills/human-gate/scripts
27 
28python3 $S/human_gate.py open plan.md --launch # build page, start round N → END YOUR TURN
29python3 $S/human_gate.py status plan.md # non-blocking: 0 clear·2 blocked·3 collect·4 none
30python3 $S/human_gate.py collect plan.md --output json # batch.v1 — apply every item
31python3 $S/human_gate.py close plan.md # exit 2 = NOT done
32```
33 
34`human_gate.py --sample` runs the whole loop, refusals included, in ~1s. It drives
35`review_page_builder.py` (Markdown/HTML → single-file anchored page that makes no network
36request of its own and sanitizes reviewed HTML — `on*`, `javascript:`, `iframe` dropped) and
37`feedback_parser.py` (sidecar → `batch.v1`, quotes checked against raw *and* rendered text).
38 
39## The sidecar
40 
41Feedback lands in `<artifact>.review.md`. The page exports it; anyone can also write it by hand
42in any editor — which keeps this working over SSH and in CI. Worked example and JSON contract
43are in `assets/`.
44 
45```markdown
46<!-- human-gate:v1 target=plan.md round=1 -->
47reviewer: reza
48 
49## BLOCKER b2
50> We expect a 40% lift in activation.
51No source, and it drives the whole plan. Cite it or cut it.
52```
53 
54Severities **BLOCKER / MAJOR / MINOR / NIT** (matching `markdown-html/md-review`, from Google's
55code-review guidance), plus **NOTE**, **APPROVE**, and **EDIT** — a replacement the reviewer
56already wrote, as `- before:` / `+ after:` lines.
57 
58## Gate rules
59 
60| | Refuses to close when | | |
61|---|---|---|---|
62| **G1** | no round collected | **G4** | sidecar changed after the last collect |
63| **G2** | a BLOCKER or MAJOR is open | **G5** | round cap exhausted → **escalate**, never pass |
64| **G3** | no named reviewer | **G6** | waiver used without a recorded reason |
65| **G7** | the round carries unresolved integrity problems — a mistyped severity silently downgrades to NIT, so a real blocker can be lost to a typo | | |
66 
67Overrides must be explicit — `close plan.md --waive "<reason>"` — but **G1 is never waivable**:
68a waiver accepts objections a reviewer raised; it cannot stand in for review happening.
69 
70## Hard rules
71 
721. **Never report done while `close` exits 2.** Say what is open instead.
732. **Never invent a reviewer name** to satisfy G3. No reviewer *is* the finding.
743. **Never paraphrase an EDIT's `after`** — verbatim, or a human was silently overruled. Apply
75 it to whatever *generates* the artifact too, or it dies on the next build.
764. **Never block-poll for a human.** Hand over the path and end the turn; `open` detects a
77 headless host. Rounds are capped and exhaustion escalates.
785. **Never auto-fetch and run unpinned code.** The richer editor at `petergyang/human-review`
79 is opt-in, asked-first, and always pinned (`npx -y [email protected]`) — unpinned `npx -y`
80 runs whatever was published most recently. Its `poll` blocks and it rewrites HTML in place,
81 so wrap both. It changes the editor, never the gate. See `audit/human-review-2026-08/`.
826. **Never treat the review page as source of truth.** It is a viewing surface.
83 
84## Forcing questions
85One at a time when scope is fuzzy: **Who, by name, signs off?** · **What would make them reject
86it outright?** (name it before reading — Klein's pre-mortem) · **Is this reversible?** (if not,
87require explicit APPROVE, not merely no blockers) · **The artifact or its generator?** (both) ·
88**How many rounds is this worth?** · **Is a human available now?** (if not, hand over and stop).
89Two consecutive NIT-only rounds means it is done — say so rather than opening a third.
90 
91## Related skills
92**`engineering/agent-harness`** — machine verification; this is the human lane it lacks.
93**`markdown-html/md-review`** — renders a code review *to* HTML, one-way; use when the agent
94reviews, human-gate when a person does. **`engineering/grill-me`** — interrogates a plan before
95an artifact exists. **`content-humanizer`**/**`behuman`** — human *voice*, not approval.
96 
97Reasoning lives in `references/` — human-in-the-loop canon, feedback batching, loop discipline.
98Conceptual derivation of the batched-review pattern from
99[`petergyang/human-review`](https://github.com/petergyang/human-review) (MIT © 2026 Peter Yang);
100no upstream code is used — stdlib Python, no server, non-blocking, plus a gate upstream lacks.
101 
View all files on GitHub →

Details

Updated
Aug 30, 2026
License
MIT
Stars on the repo
★ 26,349
Checked
Source
alirezarezvani/claude-skills ↗
Creator
alirezarezvani · 363 listings
View creator

Similar skills

See all →
SkillRequires technical rigor and verificationCode Review Receptionobra/superpowers · by obraUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation★ 290k GitHub starsSkillConduct high-quality, persona-driven code reviewsCode Review ExpertHoangNguyen0403/agent-skills-standard · by HoangNguyen0403Conduct high-quality, persona-driven code reviews. Use when reviewing PRs, critiquing code quality, or analyzing changes for team feedback.★ 569 GitHub starsSkillExplain something in the format that is fastestLLM output explainerJohnQinAMD/llm-output-explainer · by JohnQinAMDExplain something in the format that is fastest to understand, from controlled English (ASD-STE100 style), to a diagram, to an interactive HTML page, to a narrated explainer video. Check facts against their sources, using parallel subagents for independent evidence streams when the host supports them. Use when the user wants to understand a substantial concept, algorithm, code change, pull request, paper, benchmark result, or agent output, or asks for an explainer, diagram, HTML explanation, STE, or video. Not for one-line answers, drafting a pull request description, or code review.★ 4 GitHub starsSkillRequests code review before mergingRequesting code reviewobra/superpowers · by obraUse when completing tasks, implementing major features, or before merging to verify work meets requirements★ 290k GitHub starsPromptAct as a code review agent to evaluate and improve codef/prompts.chat · by Xiang FanAct as a code review agent to evaluate and improve code quality, style, and functionality.New listingPromptAct as an expert AI code reviewerCode review by coderabitf/prompts.chat · by Faisal BhuiyanYou are an expert AI code reviewer.New listing

More from alirezarezvani

SkillResume a paused experiment/ar:ar-resume — Resume Experimentalirezarezvani/claude-skills · by alirezarezvaniResume a paused experiment. Checkout the experiment branch, read results history, continue iterating. Use when the user runs /ar:ar-resume or asks to pick up a previously started autoresearch experiment.★ 26.3k GitHub starsSkillShow experiment dashboard with results, active loops/ar:ar-status — Experiment Dashboardalirezarezvani/claude-skills · by alirezarezvaniShow experiment dashboard with results, active loops, and progress. Use when the user runs /ar:ar-status or asks how an autoresearch experiment is going.★ 26.3k GitHub starsSkillStart an autonomous experiment loop with user-selected/ar:loop — Autonomous Experiment Loopalirezarezvani/claude-skills · by alirezarezvaniStart an autonomous experiment loop with user-selected interval (10min, 1h, daily, weekly, monthly). Uses CronCreate for scheduling. Use when the user runs /ar:loop or asks to run an autoresearch experiment continuously on a schedule.★ 26.3k GitHub starsSkillRun a single experiment iteration/ar:run — Single Experiment Iterationalirezarezvani/claude-skills · by alirezarezvaniRun a single experiment iteration. Edit the target file, evaluate, keep or discard. Use when the user runs /ar:run or asks for one manual autoresearch iteration.★ 26.3k GitHub starsSkillSet up a new autoresearch experiment interactively/ar:setup — Create New Experimentalirezarezvani/claude-skills · by alirezarezvaniSet up a new autoresearch experiment interactively. Collects domain, target file, eval command, metric, direction, and evaluator. Use when the user runs /ar:setup or asks to start optimizing a file with the autoresearch loop.★ 26.3k GitHub starsSkill/cs:boardroom <brief/cs:boardroom — Multi-Role Boardroom Deliberationalirezarezvani/claude-skills · by alirezarezvani/cs:boardroom <brief> — 6-phase multi-role deliberation across the C-suite with Phase 2 isolation, critic pre-screen, and synthesis. Outputs a board memo. Use when a decision spans multiple executive domains — e.g. a pricing change touching finance, positioning, and product, or a raise-vs-cut runway call.★ 26.3k GitHub stars