How to comment on the HTML your coding agent generates
Claude Code and Codex now ship your plans, specs, ADRs, and reports straight to HTML. Here's how to review them line by line — with inline, anchored comments — without bolting a comment SDK onto your build.
The problem: docs moved to HTML, the comment layer didn't follow
Notion and Google Docs made review effortless: inline comments, @mentions, resolve. But your coding agent doesn't hand you a Notion doc — it hands you plan.html. So feedback scatters into Slack threads and screenshots, detached from the exact line it's about. Margin puts the comment layer back, in the browser, on the HTML itself.
Step by step
-
Install Margin and pick a workspace
Add the extension to Chrome (or any Chromium browser) and select a workspace. Every URL you open becomes commentable — no setup on the page.
-
Open the HTML your agent wrote
It works wherever the page lives: a local
file://the agent generated, a preview deploy, or a page served from your repo. The page needs no Margin-specific code. -
Highlight a line and leave a comment
Select the text you want to discuss to anchor a thread, then type. The comment sticks to that exact line and floats beside it — click the highlight, the margin marker, or the card and all three light up together.
-
@mention teammates, then resolve
@mention a member to ping them, or @mention an email address to send a workspace invite. Resolve the thread when it's handled; resolved threads move to History instead of cluttering the sidebar.
Why a browser extension (and not a code snippet)
A website comment widget asks the page owner to integrate code. Margin's entry point is the browser extension, so the author changes nothing — and it works on pages you don't own, too: dashboards, internal tools, even a competitor's page. Comments are scoped to your workspace, so the same URL in two workspaces stays completely separate.
FAQ
Does it work on output from Claude Code, Codex, and other agents?
Yes. Margin works on any HTML page your browser can open — a file:// the agent wrote locally, a preview deploy, or a page served from your repo. The page never needs Margin-specific code, so it doesn't matter which agent produced it.
Do I have to add code to the generated HTML?
No. Margin's entry point is a browser extension, so the page author changes nothing. That's the key difference from a website comment widget.
Can I comment on a local file:// HTML file?
Yes. If your browser can open the file, Margin can anchor comments on it — ideal for HTML an agent just generated on your machine.
What happens to my comments if the agent regenerates the page?
Comments re-anchor to their original location where possible. If a re-anchor fails, the comment stays visible rather than being silently dropped.
Review your next agent-generated doc with your team
Install the extension, pick a workspace, and comment on your first page in under a minute.
Add to Chrome — free