/nemo:nemo-migratefrom NEMO for Next.js
Migrates Next.js middleware to @zanreal/nemo from @rescale/nemo, single middleware.ts/proxy.ts, or createMiddleware API. Handles Next.js 16 proxy rename and per-route splitting.
Ships in NEMO for Next.js. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Pick the path that matches the project.
| Situation | Go to |
|---|---|
Imports from @rescale/nemo | references/from-rescale.md |
One big middleware.ts / proxy.ts with if (pathname...) branches | references/from-next-middleware.md |
| Next.js 15 to 16 (file and export rename) | references/next16-proxy.md |
Uses createMiddleware from NEMO | replace with createNEMO, same arguments |
The API did not change in 3.0.0, only the package name. Projects still on @rescale/nemo 1.x must first move to the 2.x API (see the v1.4 docs), then rename.
npx @zanreal/nemo-codemod --dry # preview
npx @zanreal/nemo-codemod # apply to the current directory
Then reinstall with the project's package manager so the lockfile picks up @zanreal/nemo (npm install, pnpm install, yarn, bun install). The codemod does not touch lockfiles. Details and flags: references/from-rescale.md.
globalMiddleware.before.config.matcher unchanged at first.export function middleware (or proxy) by export const middleware = createNEMO(...) (or proxy).Full mapping rules with before/after code: references/from-next-middleware.md.
NextResponse.redirect/rewrite/json or new Response(...) stop it. A new NextResponse(body, { status }) does NOT stop it, convert to new Response(...).startsWith checks become prefix patterns ("/dashboard/:path*" or a nested object). A bare "/dashboard" matches only that exact path.pathname === "/" branch becomes the "/" key, which also matches only the exact root.before (or after), not to "/".req.params, new NEMO(...) without .middleware, or NextResponse.redirect("/relative") from older blog posts.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub zanreal-labs/nemo --plugin nemo4 skills in this plugin
/nemo-debuggingDebug and test @zanreal/nemo middleware - a middleware not running, a response ignored, a 401 or redirect lost, headers or cookies missing, storage leaking between requests, NemoMiddlewareError, event.log printing nothing, and unit tests with NextRequest. Use when NEMO behavior is unexpected or when writing tests for a createNEMO config./nemo-middleware-patternsWrite and organize @zanreal/nemo middleware - chains, nested and parameterized routes, global before/after, shared storage, redirects, rewrites, header and cookie forwarding, auth gating, i18n, event.skip. Use when adding or changing logic inside a createNEMO config, choosing how to stop or continue a chain, or working out why a NEMO middleware does or does not run./nemo-Other plugins' skills for the same job