Skip to main content
skill CX Codex

next-intl-app-router — Claude Code skill: i18n for Next.js App Router

Sets up next-intl with locale-prefixed routes: config, proxy, navigation and message files. Useful when a project gets a second language.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add liuchiawei/agent-skills --skill next-intl-app-router -a claude-code
Open on GitHub

What next-intl-app-router does

The skill walks through wiring next-intl into a Next.js App Router project where the locale sits in the path, like /en/about or /ja/about. It covers the plugin in next.config.ts, the central config in src/i18n/routing.ts, message loading in src/i18n/request.ts, a proxy that catches routes, and navigation wrappers from src/i18n/navigation.ts.

The file layout is spelled out too: messages/en.json, messages/ja.json and the src/app/[locale]/ folder. The root layout.tsx stays free of NextIntlClientProvider; only app/[locale]/layout.tsx wraps children, validates the locale with hasLocale and calls setRequestLocale for static rendering. Copy-paste examples ship with the skill.

One version detail matters. Next.js 16 renamed middleware.ts to proxy.ts, same API. On an older project you have to rename the file back, or locale interception never fires. Import Link and redirects from @/i18n/navigation rather than next/link or next/navigation, otherwise the locale drops on every click.

What it helps with

  • add a second language with the locale in the URL
  • wire the next-intl plugin into next.config.ts
  • set up route matching with exclusions for /api and static files
  • keep the current locale in links and redirects
  • split translations into JSON files and namespaces

Example prompts for the agent

  • Set up next-intl in this project with en and ja locales in the path
  • Add an /about page that pulls its text from next-intl
  • Check that links go through @/i18n/navigation so the locale survives

How to install next-intl-app-router

1Skills CLI (Vercel)

npx skills add liuchiawei/agent-skills --skill next-intl-app-router -a claude-code

2Manually: put the files in place

~/.claude/skills/next-intl-app-router/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/next-intl-app-router/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about next-intl-app-router

How do I install next-intl-app-router in Claude?

Run npx skills add liuchiawei/agent-skills --skill next-intl-app-router -a claude-code. The skill file then lands at ~/.claude/skills/next-intl-app-router/SKILL.md.

What does next-intl-app-router do?

It shows how to set up next-intl in a Next.js App Router project with locale-prefixed routes: plugin config, routing, request, proxy, navigation and message files.

How is proxy.ts different from middleware.ts?

Next.js 16 calls the interception file proxy.ts; the API is unchanged. Older projects still use middleware.ts.

Similar skills

Everything for Frontend and UI →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor