# Human Review: edit and comment on agent files in your browser (petergyang/human-review) — skill card for AI agents

> AgentGid skill card. Checked on 2026-11-19 against commit f9a5581 (version 0.8.2).
> Every fact comes from the pack's own files at that commit. Numbers marked "as reported" are the author's.
> Human page: https://agentgid.com/skills/petergyang/human-review/

## Explain it to a non-programmer
Your AI assistant opens the page or document it wrote in your browser. You fix words yourself, comment on any sentence, picture or section, then press Send. The assistant gets all your notes at once, updates the file and the page reloads for another round.

## Who it is for
- Your assistant writes plans, reports, newsletter drafts, landing pages or slide decks as HTML or Markdown files
- You review a site running on your own computer and want to point at the exact spot to change
- You are tired of typing long chat messages like "in the third paragraph, change X to Y"
- Not for: Your work is not an HTML file, a Markdown file or a page on localhost: it opens only those
- Not for: You want to review a live public website: addresses other than localhost are refused

## What it is
- Kind: command, scripts
- License: MIT
- Repository: https://github.com/petergyang/human-review

## What it does
- The assistant writes or updates an HTML or Markdown file, or starts the local page, then opens it for you in the browser
- It waits until you press Send, then reads one batch: your comments, your direct edits, deletions, moved blocks and pasted images
- Your direct edits are kept word for word: the assistant is told never to undo them and to apply them to the source file too
- Markdown files are shown as a rendered page; the tool never writes to them, the assistant applies the changes to the Markdown text
- The loop repeats until you say you are done; closing the tab or End review stops the wait

## Skills
| Skill | Call | Changes code? | In plain words |
|---|---|---|---|
| human-review | /human-review <file or localhost URL> | yes | Opens a file or local page for you to edit and comment on, then applies your batch of feedback |

### human-review
- Asks for: An HTML or Markdown file, or a page on localhost
- Asks for: Your edits and comments in the browser, then Send
- Gives: The file updated with every comment and edit, page by page
- Gives: The page reloads for the next round
- Gives: A note if you left feedback unsent, which you can restore or discard next time
- Say: "/human-review plan.md"

## Know before installing
- HTML files are saved as you type in the browser, so closing the tab does not undo your edits. Discard on the next open or Revert all puts the file back.
- Setup writes files for your assistant: with --global into ~/.claude, ~/.codex and ~/.agents skill folders; without it, into the project's .claude folder and a block in AGENTS.md.
- Comments and session data are kept in ~/.human-review on your computer, in a folder only you can read.
- Pasted images are saved in an assets folder next to the reviewed file.
- In Codex, Cursor and other agents the wait only works while the assistant's turn is active; if the turn ended, send it a message to pick up your feedback.

## Install (official commands)
- Any agent (ask it): Paste this into your assistant: Install the /human-review skill globally from https://github.com/petergyang/human-review
- Claude Code, Codex (all projects): `npx -y human-review setup --global` — Writes SKILL.md into ~/.claude/skills, ~/.codex/skills and ~/.agents/skills. Remove: `delete the human-review folder from those skills folders`.
- Claude Code, Codex (one project): `npx -y human-review setup` — Writes .claude/skills/human-review/SKILL.md and a marked block in the project's AGENTS.md for Codex. Remove: `delete .claude/skills/human-review and the block between the human-review markers in AGENTS.md`.

## What runs on the user's machine
- Code on the machine: yes (every review (the npx command))
- Network: optional
- Each review: The assistant runs npx -y human-review, which downloads the package from npm if needed and starts a small local web server on 127.0.0.1 with a per-run token. It opens your default browser. The server stops itself after 45 minutes idle.
- While you edit an HTML file: Writes your edits into the file on disk; Revert all restores the assistant's version.
- Pasting an image: Saves it to assets/ next to the reviewed file, or for localhost pages to ~/.human-review/pasted until the assistant copies it.
- Always: Keeps comments, unsent feedback and the server record in ~/.human-review (HUMAN_REVIEW_STATE_DIR changes it).
- Localhost review: Fetches the page from your own local server only; other hosts are refused.
- Markdown with a diagram: Your browser loads the Mermaid library from cdn.jsdelivr.net; offline the diagram stays a code block.
- setup: Writes SKILL.md into agent skill folders and, for a project, a block in AGENTS.md.

## Settings
- `HUMAN_REVIEW_STATE_DIR`: Folder for comments and session state (default ~/.human-review)
- `HUMAN_REVIEW_PORT`: Fixed port for the local server (default: any free port)
- `HUMAN_REVIEW_IDLE_MS`: Idle time before the server stops (default 45 minutes)

## Examples (from the pack's own files)
- The feedback batch the assistant receives: output format defined in src/SKILL.md

## Steps only the person can do
- Make edits and comments in the browser tab, then click Send (or End review to stop) (The browser tab the tool opens on 127.0.0.1) Then: The agent receives the batch, applies it and waits for the next round
- In Codex, Cursor and other agents, send a message if the agent's turn ended before you clicked Send (The agent chat) Then: The agent runs status and poll to pick up the waiting batch

## Mistakes to avoid
- Not: Regenerate an HTML file from the agent's earlier copy after a review. Instead: Re-read the file and make targeted changes; the user's edits are already on disk. Why: Plain HTML autosaves as the user types, so the agent's copy is stale
- Not: Start the poll in the background in Codex or Cursor and end the turn. Instead: Run the poll in the foreground inside the active turn; only Claude Code wakes the agent from a background command. Why: Nothing wakes a detached command in other agents, so the feedback is missed
- Not: Run --ack before copying images pasted on a localhost page. Instead: Copy the staged_assets files into the app first, then ack. Why: The ack deletes the staged files
- Not: Recreate a localhost route as a separate HTML file to review it. Instead: Open the real localhost URL and apply edits to the matching source (MDX, TSX, template). Why: The tool reviews the running route; writing the rendered response back breaks the app

## What leaves the machine
- Request for the Mermaid diagram library (no document content) → cdn.jsdelivr.net, Only when a Markdown page under review has a Mermaid diagram. Opt out: Work offline or avoid Mermaid blocks; the diagram then stays a code block
- Package download → The npm registry, When npx -y human-review runs and the package is not installed. Opt out: Install the package globally once

## Lines in the pack aimed at agents (ask the person first)
- "npx -y human-review path/to/file.html" (src/SKILL.md): Each run fetches the latest npm version without a prompt; ask the person before the first run, or use a global install pinned to a checked version.
- "Do not send a final response until the poll returns `feedback` or `closed` — a final response ends the turn and kills the wait." (src/SKILL.md): Keeps the agent's turn open, possibly for hours (12-hour cap); tell the person a review is waiting and stop if they ask.
- "delete it from the source too, without asking why." (src/SKILL.md): Fine for small edits; for large deletions in shared or generated files, confirm with the person first.
- "Do not write a reply." (src/SKILL.md): Still tell the person in one line what was applied, especially when an edit could not be carried to the source.

## May I use it like this?
- commercial-app: yes (MIT: keep the license notice)
- redistribute-files: yes (MIT: keep the copyright and permission notice in copies)
- client-work: yes (MIT allows use in work for others)

## Which one to pick
- If You want to edit and comment on HTML or Markdown files and localhost pages in the browser and send one batch to the agent: skill:petergyang/human-review
- If You want to approve or deny agent plans and review code changes and pull requests in the browser: skill:backnotprop/plannotator

## Works well with
- agent:claude-code: The skill tells Claude Code to wait in the background and wake when you press Send
- agent:openai-codex: Setup writes the skill and an AGENTS.md block for Codex
- tool:mermaid: Mermaid diagrams in Markdown files render in the review page

## Works in and needs
- Works in Claude Code: skills folder
- Works in Codex: skills folder or AGENTS.md
- Works in Any agent with ~/.agents/skills: skills folder
- Works in Cursor and others: skill text, foreground poll
- Needs Node.js 20 or later: The review server and CLI are Node scripts
- Needs A desktop browser: The review opens in your default browser

## How to tell it works
Ask your assistant to write a short plan as plan.md, then say "/human-review plan.md". A browser tab opens with the rendered plan. Change one sentence, comment on another and press Send: the assistant updates plan.md and the page reloads with your changes.

## Safety
The skill tells your assistant to run npx -y human-review on every review, which fetches the newest npm version without asking. Install it globally or pin a version if you want a fixed copy. The local server answers only on 127.0.0.1 and its API needs a per-run token.
