Official agent skill

Next Dev Loop

by sanity-io in sanity-io/ui

Verify Next.js runtime behavior after editing app code. An agent skill from sanity-io/ui.

OfficialMITAuto-check passedProductivity & Automation

Install Next Dev Loop

skills CLI
$ npx skills add sanity-io/ui --skill next-dev-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sanity-io/ui next-dev-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sanity-io/ui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/next-dev-loop .claude/skills/next-dev-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
next-dev-loop
GitHub stars
176
Used in
8 other repos
Token cost
~2k tokens
SKILL.md length
920 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Verify Next.js runtime behavior after editing app code. An agent skill from sanity-io/ui.

  • Works in 4 steps: **Open agent-browser at the target URL,… → Probe /_next/mcp (tools/list) — confirm… → get_compilation_issues doubles as a… → …
  • Confirm a change actually works in a running app — not just that it compiles
  • SKILL.md covers requires, preflight, loop and gotchas, plus 2 more sections
  • Calls pnpm, npx and npm

What it does

Next Dev Loop is an agent skill from sanity-io/ui, published by the product's own GitHub organization. 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.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Productivity & Automation, covering Browser automation. It works with Next.js and Model Context Protocol. The repository describes itself as: The Sanity UI design system. The licence is MIT.

When your agent uses it

  • Confirm a change actually works in a running app — not just that it compiles
  • Tasks that involve Browser automation

Example prompts

  • “s view) with agent-browser (the browser”
  • “/next-dev-loop”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. **Open agent-browser at the target URL, restoring saved
  2. Probe /_next/mcp (tools/list) — confirm it's reachable and
  3. get_compilation_issues doubles as a Turbopack probe. An error
  4. get_routes → your route map for the rest of the session.

What it can do on your machine

Read from SKILL.md and the folder at commit 1c8fd85. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • npx
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • nextjs.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Next Dev Loop loads about 2k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 920 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sanity-io/ui at commit 1c8fd85, republished under its MIT licence (© sanity-io). 920 words, ~2,029 tokens.

Download SKILL.mdSave it as .claude/skills/next-dev-loop/SKILL.md (or your agent's skills folder).
name
next-dev-loop
description
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`.

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. Call tools/list for 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, run agent-browser skills get core once 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/mcp plus the proactive compile check via get_compilation_issues.
  • agent-browser >= 0.31.1 — React introspection, worktree-scoped session 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.

preflight

Once per session, confirm both views are live.

  1. Open agent-browser at the target URL, restoring saved login state when present. First derive one stable session id for this checkout and use it for every agent-browser command:

    bash
    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:

    bash
    agent-browser --session "$SESSION" --restore --headed --enable react-devtools open <url>

    --scope worktree keeps parallel worktrees and copied checkouts from colliding. Bare --restore uses 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 on open; 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 close saves the cookie state so the next open restores it.

  2. Probe /_next/mcp (tools/list) — confirm it's reachable and lists get_compilation_issues:

    • Unreachable → either next dev isn't running, or Next.js is below 16.3. Check package.json to disambiguate, then refuse.
    • get_compilation_issues not in the list → Next.js below 16.3. Refuse and tell the user to upgrade.
  3. get_compilation_issues doubles as a Turbopack probe. An error response of "Turbopack project is not available..." means the user is on webpack. Refuse — Turbopack is required.

  4. 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-browser drives the page; assert what the user actually sees.
  • React-level behavior — agent-browser with 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.

Show full SKILL.md (361 more words)Show less

gotchas

  • Every agent-browser command must know your session and restore key, or it may use an empty default browser or fail to save login state. Easiest: export both AGENT_BROWSER_SESSION="$SESSION" and AGENT_BROWSER_RESTORE="$SESSION" at the top of each shell you run agent-browser in. If you do not export them, pass --session "$SESSION" --restore on every command.
  • 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 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. Avoid wait --url unless 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 after open or after a click (even if open reported the page) — is the browser dropping the page (a stale session), not a broken route. Reopen your session at the URL with --session "$SESSION" --restore and re-snapshot; if still blank, run agent-browser --session "$SESSION" --restore close, then open again. Don't fall back to curl; it bypasses the browser you're testing.
  • React introspection output is stale after navigation. Re-run.
  • /_next/mcp replies are SSE — read the JSON off the data: line with sed -n 's/^data: //p' (a plain sed 's/^data: //' leaves the event: line and the parse fails).
  • Non-3000 dev server: read the next dev banner; set NEXT_MCP_URL=http://localhost:<port>/_next/mcp.
  • get_errors and get_page_metadata need 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.

© sanity-io, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/next-dev-loop of sanity-io/ui.

Open the folder on GitHubat commit 1c8fd85

Used in 8 other repositories

We found 10 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 8 other GitHub owners. This page covers the copy in sanity-io/ui, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Next Dev Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Next Dev Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Next Dev Loop this skillsanity-io/ui1768 repos~2kAutomated safety check: PassMIT
Skyvern Browser AutomationSkyvern-AI/skyvern23k—~1.9kAutomated safety check: PassAGPL-3.0
Zerotoken OpenclawAMOS144/ZeroToken4551 repos~2.9kAutomated safety check: PassMIT
AIPex Browser ControlAIPexStudio/AIPex1.3k—~1.8kAutomated safety check: PassMIT
Control Browserzai-org/ZCode7.5k—~4.6kAutomated safety check: PassApache-2.0
Webctlcosinusalpha/webctl419—~1.7kAutomated safety check: PassNone

Similar skills

  • Skyvern Browser Automation

    Skyvern-AI/skyvern

    Automates websites with Skyvern's AI browser agent to fill forms, extract data, download files, log in and run multi-step workflows through SDKs, REST, MCP or a CLI.

    23k GitHub stars~1.9k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Zerotoken Openclaw

    AMOS144/ZeroToken

    A skill your agent uses when using ZeroToken MCP via OpenClaw for browser automation, trajectory recording and low-token replay, especially for recurring or scheduled browser tasks.

    455 GitHub starsUsed in 1 repo~2.9k tokens
    Productivity & AutomationAuto-check passed
  • AIPex Browser Control

    AIPexStudio/AIPex

    Lets an agent drive Chrome through the AIPex extension and its MCP bridge: navigation, clicking, form filling, screenshots, tab management and downloads.

    1.3k GitHub stars~1.8k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Control Browser

    zai-org/ZCode

    A skill your agent uses when opening, navigating, inspecting, testing, clicking, typing, filling, screenshotting, or verifying web pages and local HTTP targets (localhost, 127.0.0.1, ::1) inside…

    7.5k GitHub stars~4.6k tokensUpdated 8 days ago
    Productivity & AutomationAuto-check passed
  • Webctl

    cosinusalpha/webctl

    Browser automation via CLI. An agent skill from cosinusalpha/webctl.

    419 GitHub stars~1.7k tokensUpdated 4 mo ago
    Productivity & AutomationAuto-check passed
  • Browser MCP Agent

    antibrow/anti-detect-browser-skills

    Give an AI agent its own real browser over MCP tool calls - launch, navigate, click, fill, screenshot, extract text, run JS - with a kernel-level real-device fingerprint and a persistent profile, so…

    914 GitHub starsUsed in 1 repo~4.2k tokens
    Productivity & AutomationAuto-check: warnings

More from sanity-io/ui

  • UI Demo

    sanity-io/ui

    Official

    Record polished UI demo videos using Playwright. An agent skill from sanity-io/ui.

    176 GitHub starsUsed in 4 repos~3.8k tokens
    Auto-check passed
  • Official

    Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation).

    176 GitHub starsUsed in 6 repos~6.3k tokens
    Auto-check passed
  • Official

    Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces.

    176 GitHub starsUsed in 2 repos~5.8k tokens
    Auto-check passed
  • React Devtools MCP

    sanity-io/ui

    Official

    Inspect and profile the React component tree of a running Storybook story through chrome-devtools-mcp (React DevTools over the Chrome DevTools Protocol, via react-devtools-cdt-mcp).

    176 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Official

    Integrates Sanity Live with Next.js Cache Components in next-sanity v13+ apps.

    176 GitHub stars~4.2k tokensUpdated today
    Auto-check passed

Questions about Next Dev Loop

What does Next Dev Loop do?

Verify Next.js runtime behavior after editing app code. An agent skill from sanity-io/ui. Next Dev Loop is an agent skill from sanity-io/ui, published by the product's own GitHub organization.js runtime behavior after editing app code.

When should I use Next Dev Loop?

Next Dev Loop fits situations like: confirm a change actually works in a running app — not just that it compiles; tasks that involve Browser automation.

How do I install Next Dev Loop in Claude Code?

Run `npx skills add sanity-io/ui --skill next-dev-loop -a claude-code`. Or copy the skill folder (.agents/skills/next-dev-loop in sanity-io/ui) into .claude/skills/next-dev-loop in your project. Claude Code loads it when a task matches its description.

How do I install Next Dev Loop in Codex?

Run `npx skills add sanity-io/ui --skill next-dev-loop -a codex`. Or copy the skill folder (.agents/skills/next-dev-loop in sanity-io/ui) into .agents/skills/next-dev-loop in your project. Codex loads it when a task matches its description.

Can I use Next Dev Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sanity-io/ui --skill next-dev-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/next-dev-loop, .gemini/skills/next-dev-loop, .github/skills/next-dev-loop and .opencode/skills/next-dev-loop in your project.

What does Next Dev Loop need to run?

Going by SKILL.md and its folder, Next Dev Loop needs the command-line tools its instructions call (pnpm, npx and npm). Our summary lists: Node.js.

Does Next Dev Loop access the network?

SKILL.md names 1 domain. As links in the text: nextjs.org. This is read from the text; nothing was executed.

Is Next Dev Loop safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Next Dev Loop use?

Next Dev Loop is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Next Dev Loop use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Next Dev Loop?

Skills that share tags, products or a category with Next Dev Loop: Skyvern Browser Automation (Skyvern-AI/skyvern, 23k stars), Zerotoken Openclaw (AMOS144/ZeroToken, 455 stars), AIPex Browser Control (AIPexStudio/AIPex, 1.3k stars) and Control Browser (zai-org/ZCode, 7.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Next Dev Loop?

sanity-io (a GitHub organization, an official publisher) maintains it in sanity-io/ui, which has 176 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 6, 2026.

Source: sanity-io/ui on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.