# nextjs app router migration verifier

> Migrate Next.js routes to App Router with mandatory verification of cache semantics and component boundaries.

nextjs app router migration verifier is a paid AI agent skill on Agensi by Elyas, in Frontend & Web Apps. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $18 (one-time purchase)
- Creator: [Elyas](https://www.agensi.io/creators/elyas-shukri-elmi)
- Category: [Frontend & Web Apps](https://www.agensi.io/skills/frontend-web-apps)
- Version: 1.0
- Last updated: 2026-08-21
- Security: scan passed (2026-08-21); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/nextjs-app-router-migration-verifier
- Tags: ai-agents, nextjs, typescript, react, web-development

## About this skill

### The problem

Migrating from Next.js Pages Router to App Router is prone to silent regressions. Standard build checks and type systems cannot detect when a fresh `getServerSideProps` call is replaced by a default `fetch`, which Next.js caches by default, leading to stale data bugs in production.

### What it does

- Performs a mandatory before/after comparison of data-fetching cache semantics, ensuring `getServerSideProps` and `getInitialProps` are correctly ported to `{ cache: 'no-store' }`.
- Identifies and migrates `next/head` tags to the Metadata API to prevent SEO tags from silently disappearing.
- Verifies async conversion for `cookies()` and `headers()` to catch missing awaits that pass linting but fail at runtime.
- Audits the Server/Client Component boundary to ensure internal database fields or API keys do not leak into the browser bundle.
- Converts legacy `getStaticPaths` and `fallback` logic to `generateStaticParams` and `dynamicParams`.

### Frameworks & tools

Next.js (Pages Router and App Router), React, TypeScript.

### Why this beats prompting it yourself

General LLM prompts often hallucinate that `fetch()` is a drop-in replacement for legacy data methods, missing the critical caching default change. This skill enforces a hard stop between routes, preventing the "unsupervised bulk migration" pattern that causes developers to overlook layout-level fetching bugs and metadata omissions.

### Use cases

- Converting complex authenticated routes that rely on per-request data freshness.
- Refactoring SEO-heavy marketing pages from legacy `next/head` blocks to the modern Metadata API.
- Moving Node.js-based API routes to Web-standard Route Handlers.
- Verifying that new `layout.js` data fetching does not inadvertently cache user-specific data.

### Known limitations

Does not handle `middleware.ts` logic or differences. Requires a manual review stop after every single route conversion to ensure accuracy.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the nextjs app router migration verifier skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this tool prevent caching errors during the migration to App Router?

This skill specifically identifies when legacy data-fetching methods like getServerSideProps are replaced, enforcing 'no-store' cache semantics to prevent the stale data bugs that occur when Next.js 13+ defaults to caching fetch calls.

### Can it handle the conversion of legacy SEO tags to the new Metadata API?

Yes, it automatically scans for legacy next/head components and converts them into the modern Metadata API, ensuring your SEO tags and Open Graph data remain intact during the transition.

### Does this skill provide security checks for Server Component boundaries?

The skill identifies Server and Client Component boundaries, auditing your code to ensure that sensitive internal data or private API keys aren't accidentally exposed to the browser bundle during the move.

### Which frameworks and AI agents is this migration verifier compatible with?

This skill is optimized for Next.js projects using TypeScript and React; it is compatible with major AI agents that support file-system access and multi-step refactoring workflows.

### Is the migration process fully automated or does it require manual intervention?

While the skill automates the heavy lifting of code transformation, it is designed with a mandatory 'manual review stop' for every route to ensure architectural accuracy and prevent unsupervised errors.

### Does the verifier handle changes to Next.js Middleware?

No, this tool focuses specifically on route-level changes, including data fetching, metadata, and component boundaries; it does not currently support migration for middleware.ts logic.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
