liuchiawei avatar

Next Intl App Router

Handles the full next-intl setup for Next.js App Router with prefix-based locale routing like /en/about and /ja/about. Walks you through the Next.js 16 proxy (or middleware for older versions), routing config, message loading, and the locale layout pattern where you validate params, call setRequestLocale, and wrap with NextIntlClientProvider. Includes copy-paste examples for navigation components, pages, and the JSON message structure. The checklist format is handy because next-intl has a lot of moving parts and it's easy to miss the setRequestLocale call in pages or forget to export generateStaticParams. Good if you're wiring up i18n from scratch or fixing static rendering issues.

skills.sh installs
611
GitHub stars
2
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

Files

next-intl (App Router)

Setup and usage of next-intl with prefix-based locale routing (e.g. /en/about, /ja/about). Use this skill in any Next.js App Router project.

Example code: Copy-paste examples live in this skill's examples/ folder. See examples/README.md for where each file goes in your project.

File layout

Keep this structure:

├── messages/
│   ├── en.json
│   ├── ja.json
│   └── ...
├── next.config.ts
└── src/
    ├── i18n/
    │   ├── request.ts
    │   ├── routing.ts
    │   └── navigation.ts
    ├── proxy.ts          # Next.js 16+ (was middleware.ts)
    └── app/
        ├── layout.tsx    # Root layout, no NextIntlClientProvider here
        └── [locale]/
            ├── layout.tsx
            ├── page.tsx
            └── ...

Root layout does not wrap with NextIntlClientProvider; only app/[locale]/layout.tsx does.


1. Next config

Wire the plugin (default path ./i18n/request.ts):

// next.config.ts
import type { NextConfig } from "next";
import createNextIntlPlugin from "next-intl/plugin";

Sponsors

Details

Repository
github.com/liuchiawei/agent-skills
Categories
Frontend Development, Backend & APIs, AI & Agent Building
First seen
Jun 3, 2026
1spatie avatarlivewire-developmentspatie/freek.devDevelops reactive Livewire 4 components. Activates when creating, updating, or modifying Livewire components; working with wire:model, wire:click, wire:loading,608skills.sh installs
2jeremylongshore avatarperformance-lighthouse-runnerjeremylongshore/claude-code-plugins-plus-skillsManage performance lighthouse runner operations. Auto-activating skill for Frontend Development. Triggers on: performance lighthouse runner, performance lightho604skills.sh installs
3dylantarre avatarbuttons-ctasdylantarre/animation-principlesUse when animating buttons, CTAs, or clickable action elements to create satisfying, responsive interactions598skills.sh installs
4secondsky avatarmobile-first-designsecondsky/claude-skillsDesigns responsive interfaces starting from mobile screens with progressive enhancement for larger devices. Use when building responsive websites, optimizing fo598skills.sh installs
5bobmatnyc avatartanstack-querybobmatnyc/claude-mpm-skillsTanStack Query (React Query) for asynchronous server-state management with automatic caching, background refetching, optimistic updates, and pagination in React595skills.sh installs
6openai avatarslidesopenai/skillsCreate and edit presentation slide decks (`.pptx`) with PptxGenJS, bundled layout helpers, and render/validation utilities. Use when tasks involve building a ne589skills.sh installs