next-dev-loop

Verify Next.js code changes at runtime using the /_next/mcp endpoint and a real Chrome browser.

Updated Aug 15, 2025
One-click install
npx skills add https://github.com/yehezkieldio/topaz --skill next-dev-loop-yehezkieldio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: next-dev-loop
Source: https://github.com/yehezkieldio/topaz/tree/main/.agents/skills/next-dev-loop
Command: npx skills add https://github.com/yehezkieldio/topaz --skill next-dev-loop-yehezkieldio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agent-browser.

What problem does it solve? Code that compiles and type-checks can still fail at runtime. This Skill closes that gap by verifying edits against a live next dev server through two cross-checking views: Next.js's own /_next/mcp endpoint and a real Chrome browser driven by agent-browser. ## Core Features & Use Cases - Dual-view verification: Combines /_next/mcp (routes, RSC, server actions, logs, errors as Next.js sees them) with agent-browser (DOM, console, network, React fiber) so the two views cross-check each other. - Four-mode failure checks: After each edit, confirms the app compiles via get_compilation_issues, runs without errors, behaves as intended in the browser, and behaves correctly at the React level (renders, server/client boundaries, suspense fallbacks). - Session-persistent browser: Uses worktree-scoped session ids with --restore so login state persists across verification loops. - Use Case: After editing a server component, confirm Turbopack compiled it cleanly, the route renders without server errors, the page shows the expected content in Chrome, and no extra client-side renders were introduced. ## Quick Start Verify my last edit to the dashboard route actually works in the running Next.js dev server, checking both compilation and what the browser renders.

Frequently Asked Questions about next-dev-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify Next.js changes actually work at runtime?

Run the edit-verify loop against a live next dev server: check compilation with get_compilation_issues from /_next/mcp, then drive the page in a real Chrome browser with agent-browser to assert what the user actually sees. The two views cross-check each other.

What is the /_next/mcp endpoint in Next.js?

It is an HTTP endpoint Next.js exposes about itself during development, reporting routes, segments, RSC, server actions, server logs, and errors as the framework saw them. Call tools/list to discover the current tool surface.

Does this workflow require Turbopack or a specific Next.js version?

Yes, it requires Next.js 16.3 or later running with Turbopack, since get_compilation_issues only works on Turbopack and errors on webpack. It also requires agent-browser 0.31.1 or later for React introspection and session restore.

Why does agent-browser show a blank page or no session error?

A blank read, about:blank, or missing-session error usually means the browser dropped the page due to a stale session, not a broken route. Reopen with the same --session and --restore flags, or close and reopen the session before re-snapshotting.

How do I keep browser login state between verification runs?

Derive one worktree-scoped session id and export AGENT_BROWSER_SESSION and AGENT_BROWSER_RESTORE for every command. The close command saves cookies and storage, so the next open with --restore keeps the user logged in.