Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/sanity-io/next-sanity/next-dev-loopnpx skills add sanity-io/next-sanity --skill next-dev-loopgit clone --depth 1 https://github.com/sanity-io/next-sanityWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/sanity-io/next-sanity/next-dev-loop)<a href="https://agentmods.dev/skills/sanity-io/next-sanity/next-dev-loop"><img src="https://agentmods.dev/badge/skills/sanity-io/next-sanity/next-dev-loop.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00068 | $0.02007 |
| Opus 5 | $0.00034 | $0.01004 |
| Sonnet 5 | $0.00014 | $0.00401 |
| Haiku 4.5 | $0.00007 | $0.00201 |
Grade A, and why
next-dev-loop scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
again. Don't fall back to `curl`; it bypasses the browser you're This is a copy
94% identical to next-dev-loop — 5 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 189 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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"
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 189 lines · 68 tokens per session scan A 07c8721871d5
next-dev-loop is a skill published in the GitHub repository sanity-io/next-sanity (948 stars, last pushed today), licensed MIT. It adds 68 tokens to every session and 2,007 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 94% identical to next-dev-loop, differing in 5 lines, and is treated as a copy.
Other skills, from other repositories
new-block
Scaffold a new page builder block for Turbo Start Sanity end-to-end — Sanity schema, GROQ projection, styled React component, Markdown serializer, tests, and all registrations. Use when asked to add, create, or scaffold a new page builder block, section, or content module (e.g. "add a testimonials block", "create a…
next-cache-components
Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag.
sanity-live-cache-components
Integrates Sanity Live with Next.js Cache Components in next-sanity v13+ apps. Sets up sanityFetch, , Visual Editing, Presentation Tool, draft mode handling, and the three-layer (Page/Dynamic/Cached) component pattern with explicit perspective/stega prop-drilling. Use when configuring or migrating a Next.js app to…
next-upgrade
Upgrade Next.js to the latest version following official migration guides and codemods.
create-example
Create a new Liveblocks example app for the gallery under examples/. Use when asked to build a new example, demo, or showcase app, or when restructuring an existing example. Covers scaffolding, gallery conventions (exampleId, examplePreview, database.ts, HelpButton), providers configuration, AI patterns, styling…
write-docs
Write and review Liveblocks documentation, API reference, guides, and quickstarts. Use when editing files under docs/, documenting a new Liveblocks feature, updating API reference pages, adding docs routes, or reviewing documentation for clarity, discoverability, and consistency.