Codex skills for Next.js

Next.js skills cover the App Router, caching, Server Actions, Pages Router migration, SEO metadata and Vercel deploys. Codex detects whether an app uses Cache Components or the older fetch cache before touching revalidation, writes every server action as authenticate, validate, authorize, mutate, and asks before any production deploy, promote or rollback on Vercel.

17 more Next.js skills

Every Next.js skill in one command

Installs these 20 into ~/.agents/skills/. Add --project after -- to install into the current repository instead.

The installer is a 104-line POSIX shell script. It fetches the skills you name from codexskills.dev and unpacks each into its own folder in your skills directory. No sudo, no telemetry, and every skill page shows the full SKILL.md first. Read install.sh

curl -fsSL codexskills.dev/install.sh | sh -s -- nextjs-app-router nextjs-caching nextjs-server-actions nextjs-seo nextjs-pages-to-app-migration react-server-components vercel-ai-sdk vercel-deployment motion-animations frontend-error-handling auth-libraries trpc-apis supabase-backend serverless-postgres edge-functions content-security-policy posthog-analytics clerk-auth headless-cms sentry-integration

Next.js FAQ

Is there a Codex skill for Next.js 16 caching and use cache?

Next.js Caching runs a bundled inventory script to find out whether cacheComponents is on or the app still uses the fetch Data Cache and route segment configs. It maps each data source to a cacheLife and tags, migrates revalidate and dynamic exports to use cache, and picks updateTag, revalidateTag or revalidatePath per mutation. It covers both Next.js 15 and 16 and verifies with build output and cache headers.

Can Codex migrate a Next.js app from the Pages Router to the App Router?

Next.js Pages to App Migration inventories every pages/ file with a bundled script that scores effort and flags URLs defined in both routers, then moves routes lowest-effort first. It maps getStaticPaths, next/head and next/router to their app/ equivalents and checks status codes, metadata and rendering mode before deleting each old file. It also warns that code hooked into router.events stops firing on app/ routes.

How do these skills secure Next.js Server Actions?

Next.js Server Actions writes every action in a fixed order: authenticate, validate with a schema, authorize against the session's tenant, mutate, invalidate, then return or redirect. It does not rely on the page or middleware for permissions, because an action can be called directly with any arguments. It sets serverActions body limits and allowedOrigins deliberately and proves the action rejects forged payloads from another user.

How do I install all 20 Next.js skills at once?

Pass every name to the installer in one command: curl -fsSL https://codexskills.dev/install.sh | sh -s -- nextjs-app-router nextjs-caching nextjs-server-actions nextjs-seo nextjs-pages-to-app-migration react-server-components vercel-ai-sdk vercel-deployment motion-animations frontend-error-handling auth-libraries trpc-apis supabase-backend serverless-postgres edge-functions content-security-policy posthog-analytics clerk-auth headless-cms sentry-integration. Add --project right after -- to put them in the current repository's .agents/skills/ so your team gets them too.

Which Next.js skill should I try first?

Next.js App Router is the closest fit for most Next.js work. Mention it with $nextjs-app-router in a prompt to load it on purpose; after that, Codex picks it up on its own whenever a task matches.

esc