next-dev-loop
Skill452 starsChanged 23 days agoApache-2.0View on GitHub
Verify Next.js runtime behavior after editing app code. Use this skill to confirm a change actually works in a running app — not just that it compiles or type-checks. Combines /_next/mcp (Next.js's view) with agent-browser (the browser's view). Requires a running `next dev`.
- Installs packages
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 48
If the CLI isn't on PATH, install it before continuing — preflight expects to invoke it directly.
- Very specific: line 99
Ask the running app, not the codebase.
- Very specific: line 130
When the two views disagree, suspect the tooling first: If agent-browser says a route is broken but /_next/mcp and the server say it …
- Very specific: line 159
All tools below are present once preflight passes.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
next-dev-loop
The edit/verify rhythm during next dev — make a change, then
confirm it actually works at runtime, not only that the types or
the build are happy.
You verify through two views of the same running app:
/_next/mcp— an HTTP endpoint Next.js exposes about itself. Knows framework-specific things: routes, segments, RSC, server actions, server logs, and errors as Next.js saw them. Calltools/listfor the current surface.agent-browser— a CLI that drives a real Chrome. Knows framework-agnostic browser things: DOM, console, network, React fiber, vitals. Before driving it, runagent-browser skills get coreonce for the version-matched usage guide — don't guess subcommands from memory.
The two views cross-check each other.
requires
- Next.js 16.3+ with Turbopack —
/_next/mcpplus the proactive compile check viaget_compilation_issues. agent-browser>= 0.31.1 — React introspection, worktree-scopedsession id, idempotent--restore, and launch flag reconciliation.
These are hard floors, not soft preferences. If anything is missing, tell the user how to upgrade and stop. Don't fall back to grepping source or to a weaker probe — this skill assumes both views are live at the versions above.
- Upgrade Next.js:
pnpm next upgrade(ornpx next upgrade). Docs: https://nextjs.org/docs/app/getting-started/upgrading (version-16 guide: https://nextjs.org/docs/app/guides/upgrading/version-16) - Install or upgrade
agent-browser:npm i -g agent-browser@latest. If the CLI isn't onPATH, install it before continuing — preflight expects to invoke it directly.
preflight
Once per session, confirm both views are live.
Open
agent-browserat the target URL, restoring saved login state when present. First derive one stable session id for this checkout and use it for everyagent-browsercommand:SESSION="$(agent-browser session id --scope worktree --prefix next-dev-loop)" export AGENT_BROWSER_SESSION="$SESSION" export AGENT_BROWSER_RESTORE="$SESSION"Then open the target URL:
agent-browser --session "$SESSION" --restore --headed --enable react-devtools open <url>--scope worktreekeeps parallel worktrees and copied checkouts from colliding. Bare--restoreuses the session id as the persistence key, loads saved cookies/localStorage before navigation when present, and auto-saves state on close. Always pass the desired launch flags onopen; agent-browser will reuse, relaunch, or restart its scoped background state as needed.The browser is the user's. If state was not restored (first run, expired session) and the page is gated, the user drives the login — pause until they confirm. After login, continue using the same session and restore context;
agent-browser closesaves the cookie state so the nextopenrestores it.- Probe
/_next/mcp(tools/list) — confirm it's reachable and listsget_compilation_issues:- Unreachable → either
next devisn't running, or Next.js is below 16.3. Checkpackage.jsonto disambiguate, then refuse. get_compilation_issuesnot in the list → Next.js below 16.3. Refuse and tell the user to upgrade.
- Unreachable → either
get_compilation_issuesdoubles as a Turbopack probe. An error response of"Turbopack project is not available..."means the user is on webpack. Refuse — Turbopack is required.get_routes→ your route map for the rest of the session.
loop
before the edit — narrow the scope
Ask the running app, not the codebase. /_next/mcp knows which
files rendered the current route; use those as your search scope.
Runtime introspection stays cheap as the codebase grows; agentic
search doesn't.
after the edit — verify
Four failure modes. Check each:
- Compiles —
get_compilation_issues. - Runs without errors —
/_next/mcp(server and bubbled-up browser errors both surface here). - Behaves as intended —
agent-browserdrives the page; assert what the user actually sees. - React-level behavior —
agent-browserwith react-devtools enabled exposes the component tree, props, state, and render counts. Anchor framework-level checks here (extra renders, server/client boundary shifts, suspense fallbacks) — DOM asserts alone miss them.
Pick the specific tool from tools/list or the agent-browser
manual rather than from memory.
gotchas
- Every
agent-browsercommand must know your session and restore key, or it may use an empty default browser or fail to save login state. Easiest: export bothAGENT_BROWSER_SESSION="$SESSION"andAGENT_BROWSER_RESTORE="$SESSION"at the top of each shell you run agent-browser in. If you do not export them, pass--session "$SESSION" --restoreon every command. - When the two views disagree, suspect the tooling first. If
agent-browsersays a route is broken but/_next/mcpand the server say it rendered cleanly, a stale or misdirected browser session is the likelier cause than a real bug — reconcile the views before debugging the app. - Confirming a click or navigation: the page settles a beat later, so
wait with
wait --load networkidle(no path to get wrong), then snapshot/read to confirm the page. Avoidwait --urlunless you pass the link's exact href — a guessed or placeholder path won't match the real URL and times out after 25s. - A blank read, empty snapshot,
about:blank, or a "no browser session" error — right afteropenor after a click (even ifopenreported the page) — is the browser dropping the page (a stale session), not a broken route. Reopen your session at the URL with--session "$SESSION" --restoreand re-snapshot; if still blank, runagent-browser --session "$SESSION" --restore close, then open again. Don't fall back tocurl; it bypasses the browser you're testing. - React introspection output is stale after navigation. Re-run.
/_next/mcpreplies are SSE — read the JSON off thedata:line withsed -n 's/^data: //p'(a plainsed 's/^data: //'leaves theevent:line and the parse fails).- Non-3000 dev server: read the
next devbanner; setNEXT_MCP_URL=http://localhost:<port>/_next/mcp. get_errorsandget_page_metadataneed at least one navigation to populate.
reference
All tools below are present once preflight passes. If tools/list
is missing any of them, preflight should have refused — re-check.
# /_next/mcp notes
get_project_metadata projectPath, devServerUrl, bundler
get_routes fs-scan; no browser session needed
get_errors runtime + build; needs a browser session;
includes browser-side errors caught by the
dev server
get_page_metadata segment trie + routerType; needs a browser
session; use as a discovery shortcut for
which files power a route
get_logs returns logFilePath
get_server_action_by_id hashed id → file + functionName
get_compilation_issues Turbopack only; errors on webpack
("Turbopack project is not available")teardown
Close the session with the same session and restore context:
agent-browser --session "$SESSION" --restore close. close saves
that session's cookies and storage so the next loop's --restore open
keeps the user logged in. Leave next dev up for the next loop.
next-dev-loop-<topic> siblings (e.g. next-dev-loop-rsc, next-dev-loop-debug)
assume this preflight already ran; they pick up at the loop.
Other versions16 projects use a version of this.
Word for word · 3
- BingZi-233/check-cx★ 636100% same
- aurorascharff/next16-commerce★ 266100% same
- sprioleau/flock★ 1100% same
Edited · 13
- vercel/next.js★ 143k80% same
- FranciscoMoretti/chat-js★ 1.2k98% same
- FranciscoMoretti/chatjs★ 1.2k98% same
- FranciscoMoretti/sparka★ 1.2k98% same
- sanity-io/next-sanity★ 95698% same
- wigggle-ui/ui★ 89980% same
- tazo90/next-openapi-gen★ 19398% same
- toy-crane/claude-code-playbook-template★ 7794% same
- scibly-dev/scibly★ 3998% same
- PanPanFR/oh-my-openkilo★ 980% same
3 more not listed
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use check-visual-changes, create-vercel-ai-issue and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
FranciscoMorettiSkillcheck-visual-changes
Check the visual impact of an edit mid-task with `uiverify check` — render just the components you're touching on the UI Verify fleet and diff them against the real CI baseline, without opening a PR, posting a check, or moving a baseline. Works for every capture method (Storybook, Playwright, Vitest archives, and raw screenshots). Use when a coding agent has changed UI and wants a fast, authoritative "would this pass" answer before pushing — "check my visual changes", "did I break anything visually", "preview this diff", "run uiverify check". Hands off to triage-visual-changes for the pixel review.
Also in 3 projects that use this
FranciscoMorettiSkillcreate-vercel-ai-issue
Create a well-formed GitHub issue in vercel/ai using the gh CLI. Use when reporting an AI SDK bug or preparing an issue body that contains logs, code blocks, versions, reproduction steps, and shell-sensitive text.
Also in 3 projects that use this
- +10 more from FranciscoMoretti
In this repository54 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- .agents/skills/autoreview/AGENTS.mdAGENTS.md
- .agents/skills/autoreview/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- 4-ultraciteSkill
- agent-browser-issueSkill
- agent-native-reviewerSkill
- architecture-cleanupSkill
- autoclosureSkill
- autogoalSkill
- autoreviewSkill
- autoSkill
- avoid-feature-creepSkill
- better-auth-best-practicesSkill
- changeset-doc-syncSkill
- changeset-resolveSkill
- changesetSkill
- component-colocationSkill
- concave-paritySkill
- concaveSkill
- convex-release-auditSkill
- designSkill
- deslopSkill
- diagnosing-bugsSkill
- find-skillsSkill
- grill-with-visionSkill
- hard-cutSkill
- jotai-xSkill
- kitcnSkill
- linear-backlogSkill
- major-taskSkill
- nextjsSkill
- orchestratorSkill
- package-release-auditSkill
- prototypeSkill
- react-querySkill
- research-wikiSkill
- resolve-pr-feedbackSkill
- resolving-merge-conflictsSkill
- scenariosSkill
- shadcn-paritySkill
- sync-convex-authSkill
- sync-visionSkill
- taskSkill
- tddSkill
- testingSkill
- toastSkill
- to-milestoneSkill
- to-prdSkill
- turborepoSkill
- video-transcriptsSkill
- visionSkill
- walkthroughSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

