next-dev-loop

Verify Next.js runtime behavior after code edits using /_next/mcp and agent-browser.

Updated Jun 27, 2026
One-click install
npx skills add https://github.com/rachmadideni/ai-staff-assistant --skill next-dev-loop-rachmadideni
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: next-dev-loop
Source: https://github.com/rachmadideni/ai-staff-assistant/tree/main/.agents/skills/next-dev-loop
Command: npx skills add https://github.com/rachmadideni/ai-staff-assistant --skill next-dev-loop-rachmadideni

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 every edit against a live next dev server, cross-checking Next.js's own introspection endpoint with a real browser session so you confirm the change actually works, not just that it builds. ## Core Features & Use Cases - Dual-view verification: Combines the /_next/mcp endpoint (routes, RSC, server actions, server logs, compilation issues) with agent-browser (DOM, console, network, React fiber) to cross-check the same running app. - Four-mode failure checks: After each edit, verifies the app compiles via get_compilation_issues, runs without errors, behaves as intended in the browser, and behaves correctly at the React level (render counts, server/client boundaries, suspense fallbacks). - Session-persistent browser testing: Uses worktree-scoped agent-browser sessions with cookie/storage restore so authenticated pages stay logged in across loops. - Use Case: After editing a server component, run the loop to confirm Turbopack compiled 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 Start next dev, then ask the agent to verify your last edit works at runtime using the next-dev-loop preflight and verification loop.

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 a Next.js code change actually works at runtime?▼

Run the edit/verify loop against a live next dev server: check compilation with get_compilation_issues via /_next/mcp, confirm no runtime errors, then drive the page in a real Chrome browser with agent-browser to assert what the user actually sees.

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

It is an HTTP endpoint Next.js exposes about itself during development, providing framework-specific introspection such as routes, segment metadata, server actions, logs, and compilation issues. Call tools/list to see 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, plus agent-browser 0.31.1 or later. The get_compilation_issues tool only works on Turbopack and returns an error on webpack, which the preflight treats as a hard refusal.

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

A blank read or about:blank usually means a stale browser session, not a broken route. Reopen with the same --session and --restore flags, and if still blank, close the session and open again rather than falling back to curl.

How do I keep login state between browser test sessions?▼

Derive a stable worktree-scoped session id and pass --session with --restore on every agent-browser command. The close command saves cookies and storage, so the next open restores the logged-in state automatically.