Best practices for multi-language handling, locale routing, and detection strategies across App and Pages Router.

MITAuto-check passedFrontend & Design

Install Nextjs I18n

skills CLI
$ npx skills add HoangNguyen0403/agent-skills-standard --skill nextjs-i18n -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HoangNguyen0403/agent-skills-standard nextjs-i18n --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HoangNguyen0403/agent-skills-standard.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/nextjs/nextjs-i18n .claude/skills/nextjs-i18n && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nextjs-i18n
GitHub stars
572
Token cost
~653 tokens
SKILL.md length
241 words
Files
5 (incl. references)
Skills in repo
211
Repo updated
First seen
Licence
MIT

At a glance

Best practices for multi-language handling, locale routing, and detection strategies across App and Pages Router.

  • Works in 7 steps: Install next-intl and create… → Add locale detection middleware in… → Create app/[lang]/layout.tsx with locale… → …
  • Language detection in Next.js
  • SKILL.md covers Priority: P2 (MEDIUM), Workflow: Add i18n to Next.js…, Middleware Example and Implementation Guidelines, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Nextjs I18n is an agent skill from HoangNguyen0403/agent-skills-standard. Best practices for multi-language handling, locale routing, and detection strategies across App and Pages Router. Use when adding i18n, locale routing, or language detection in Next.js.

Its SKILL.md is about 650 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `evals/evals.json`, `references/implementation.md` and `references/next-intl.md`).

It sits in Frontend & Design, covering Internationalization. It works with Next.js and React. The repository describes itself as: A collection of Agent Skills Standard and Best Practice for Programming Languages, Frameworks that help our AI Agent follow best practies on frameworks and programming laguages. The licence is MIT.

When your agent uses it

  • Language detection in Next.js
  • Tasks that involve Internationalization

Example prompts

  • “/nextjs-i18n”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Install next-intl and create messages/en.json, messages/fr.json, etc.
  2. Add locale detection middleware in middleware.ts
  3. Create app/[lang]/layout.tsx with locale param
  4. Load translations server-side via getMessages()
  5. Add hreflang tags in generateMetadata
  6. Pre-render locales with generateStaticParams
  7. Verify: run next build and confirm all locale paths render

What it can do on your machine

Read from SKILL.md and the folder at commit b529c2d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nextjs I18n loads about 653 tokens when it runs, and up to ~1.2k if it reads all its reference files. Until then it costs about 49 tokens; SKILL.md has 241 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~653
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HoangNguyen0403/agent-skills-standard at commit b529c2d, republished under its MIT licence (© HoangNguyen0403). 241 words, ~653 tokens.

Download SKILL.mdSave it as .claude/skills/nextjs-i18n/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
nextjs-i18n
description
Best practices for multi-language handling, locale routing, and detection strategies across App and Pages Router. Use when adding i18n, locale routing, or language detection in Next.js.

Internationalization (i18n)

Priority: P2 (MEDIUM)

Maintain single source of truth for locales and ensure SEO-friendly sub-path routing.

Workflow: Add i18n to Next.js App Router Project

  1. Install next-intl and create messages/en.json, messages/fr.json, etc.
  2. Add locale detection middleware in middleware.ts
  3. Create app/[lang]/layout.tsx with locale param
  4. Load translations server-side via getMessages()
  5. Add hreflang tags in generateMetadata
  6. Pre-render locales with generateStaticParams
  7. Verify: run next build and confirm all locale paths render

Middleware Example

See implementation examples

Implementation Guidelines

  • Locale Routing: Follow URL-first approach for SEO. Use dynamic segments in App Router (app/[lang]/page.tsx) and i18n configuration in next.config.js for Pages Router.
  • Library Selection: Use next-intl for App Router (modern) or react-intl / next-translate for legacy apps.
  • Detection: Implement middleware localization in middleware.ts to detect user language from Accept-Language headers or cookies and perform redirects.
  • Server-Side: Load translation messages/*.json dictionaries in Server Components to keep client bundle small.
  • SEO: Ensure hreflang tags generated correctly in metadata API for all translated routes.
  • Static Generation: Use generateStaticParams to pre-render localized versions of static pages at build time.
Library Specifics

For detailed setup with common libraries, refer to:

Anti-Patterns

  • No hardcoded strings in JSX: Use translation keys; never commit raw text.
  • No client-side translation bundles: Load dictionaries server-side with getMessages().
  • No mixed URL locale patterns: Use sub-paths or domains consistently.

Canonical response anchors

When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:

  • consistent

© HoangNguyen0403, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/nextjs/nextjs-i18n of HoangNguyen0403/agent-skills-standard.

  • SKILL.md
  • evals/evals.json
  • references/implementation.md
  • references/next-intl.md
  • references/react-intl.md

Open the folder on GitHubat commit b529c2d

Compare with similar skills

Nextjs I18n next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nextjs I18n compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nextjs I18n this skillHoangNguyen0403/agent-skills-standard572—~653Automated safety check: PassMIT
Readme I18nY80/bmm3442 repos~1.9kAutomated safety check: PassMIT
Builder UI I18nChatbotXIO/ChatbotX888—~2.1kAutomated safety check: PassCustom licence
Nextjs Nextra Starter Distillpdsuwwz/nextjs-nextra-starter318—~596Automated safety check: PassMIT
Nextjs Nextra Starter Distill Zhpdsuwwz/nextjs-nextra-starter318—~313Automated safety check: PassMIT
React View Transitions Guidevercel-labs/next-beats16811 repos~3.1kAutomated safety check: PassMIT

Similar skills

  • A skill your agent uses when the user wants to translate a repository README, make a repo multilingual, localize docs, add a language switcher, internationalize the README, or update localized…

    344 GitHub starsUsed in 2 repos~1.9k tokens
    Frontend & DesignAuto-check passed
  • Builder UI I18n

    ChatbotXIO/ChatbotX

    Build or modify ChatbotX builder UI components, forms, tables, dialogs, shared UI usage, and translations.

    888 GitHub stars~2.1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Nextjs Nextra Starter Distill

    pdsuwwz/nextjs-nextra-starter

    Distill and apply this repository's Next.js Nextra starter architecture, implemented features, extension points, and migration patterns.

    318 GitHub stars~596 tokensUpdated 24 days ago
    Frontend & DesignAuto-check passed
  • Nextjs Nextra Starter Distill Zh

    pdsuwwz/nextjs-nextra-starter

    蒸馏并应用当前仓库的 Next.js Nextra 启动模板架构、已实现功能、二次开发扩展点与迁移模式。适用于理解本项目、继续二次开发、修改 docs/landing/i18n/theme/auth/UI 行为,或把这些 Next.js 16 + Nextra 4 + Tailwind CSS 4 模式复用到其他项目。

    318 GitHub stars~313 tokensUpdated 24 days ago
    Frontend & DesignAuto-check passed
  • React View Transitions Guide

    vercel-labs/next-beats

    Official

    Guides implementing animated page and state transitions in React with the native View Transition API, covering shared elements, list reorders and directional navigation.

    168 GitHub starsUsed in 11 repos~3.1k tokens
    Frontend & DesignAuto-check passed
  • Chakra UI v3 Builder

    chakra-ui/chakra-ui

    Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

    41k GitHub stars~3.1k tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed

More from HoangNguyen0403/agent-skills-standard

All 211 skills in this repo
  • Subagent-Driven Development

    HoangNguyen0403/agent-skills-standard

    Runs a multi-task implementation plan by sending each task to a fresh implementer subagent, reviewing it independently, then reviewing the whole branch.

    572 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • draw.io Architecture Diagramming

    HoangNguyen0403/agent-skills-standard

    Draws architecture diagrams as editable draw.io files from a JSON spec, with a fixed house style, one C4 level per diagram and evidence-tagged shapes.

    572 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Android Navigation 3 Guide

    HoangNguyen0403/agent-skills-standard

    Implements and migrates to Jetpack Navigation 3 in Compose: NavDisplay, typed route objects, a state-list back stack, deep links, multiple back stacks and dialog scenes.

    572 GitHub stars~687 tokensUpdated yesterday
    Auto-check passed
  • Angular HttpClient Standards

    HoangNguyen0403/agent-skills-standard

    Sets rules for Angular HTTP code: functional interceptors, typed requests, services that own every call, and httpResource for reactive data loading in Angular 17+.

    572 GitHub stars~652 tokensUpdated yesterday
    Auto-check passed
  • Angular Tooling

    HoangNguyen0403/agent-skills-standard

    Angular CLI usage, code generation, build configuration, and bundle optimization.

    572 GitHub stars~743 tokensUpdated yesterday
    Auto-check passed
  • Common Code Review

    HoangNguyen0403/agent-skills-standard

    Conduct high-quality, persona-driven code reviews. An agent skill from HoangNguyen0403/agent-skills-standard.

    572 GitHub stars~772 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Nextjs I18n

What does Nextjs I18n do?

Best practices for multi-language handling, locale routing, and detection strategies across App and Pages Router. Nextjs I18n is an agent skill from HoangNguyen0403/agent-skills-standard. Best practices for multi-language handling, locale routing, and detection strategies across App and Pages Router.

When should I use Nextjs I18n?

Nextjs I18n fits situations like: language detection in Next.js; tasks that involve Internationalization.

How do I install Nextjs I18n in Claude Code?

Run `npx skills add HoangNguyen0403/agent-skills-standard --skill nextjs-i18n -a claude-code`. Or copy the skill folder (skills/nextjs/nextjs-i18n in HoangNguyen0403/agent-skills-standard) into .claude/skills/nextjs-i18n in your project. Claude Code loads it when a task matches its description.

How do I install Nextjs I18n in Codex?

Run `npx skills add HoangNguyen0403/agent-skills-standard --skill nextjs-i18n -a codex`. Or copy the skill folder (skills/nextjs/nextjs-i18n in HoangNguyen0403/agent-skills-standard) into .agents/skills/nextjs-i18n in your project. Codex loads it when a task matches its description.

Can I use Nextjs I18n in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HoangNguyen0403/agent-skills-standard --skill nextjs-i18n -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nextjs-i18n, .gemini/skills/nextjs-i18n, .github/skills/nextjs-i18n and .opencode/skills/nextjs-i18n in your project.

What does Nextjs I18n need to run?

SKILL.md names no scripts, command-line tools or credentials: Nextjs I18n is instructions for the agent only.

Does Nextjs I18n access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Nextjs I18n safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Nextjs I18n use?

Nextjs I18n is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nextjs I18n use?

About 653 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 543 tokens, read only when the agent opens those files.

What are the alternatives to Nextjs I18n?

Skills that share tags, products or a category with Nextjs I18n: Readme I18n (Y80/bmm, 344 stars), Builder UI I18n (ChatbotXIO/ChatbotX, 888 stars), Nextjs Nextra Starter Distill (pdsuwwz/nextjs-nextra-starter, 318 stars) and Nextjs Nextra Starter Distill Zh (pdsuwwz/nextjs-nextra-starter, 318 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nextjs I18n?

HoangNguyen0403 (a GitHub user) maintains it in HoangNguyen0403/agent-skills-standard, which has 572 GitHub stars. The repository holds 211 skills in this directory. The repository was last updated on October 9, 2026.

Source: HoangNguyen0403/agent-skills-standard on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.