pn-i18n

pn-i18n is a skill for Cursor from perniemann/pnCore. It costs 51 tokens per session (1,456 once invoked), scanned A, original, MIT.

A guide to adding multiple languages to Next.js, React, and Astro websites, including translated messages, language-specific URLs, right-to-left text, and local date, number, currency, and plural formats.

In plain words
What is it for?
Use it to set up language routes, choose an internationalisation library, review translation files, and support languages such as Arabic, Hebrew, or Persian.
Why use it?
It helps avoid inconsistent translations and locale handling when making a website usable in more than one language.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin. Also seen: positional $N argument.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is messages: (await import(`../messages/${locale}.json`)).default,.

Part of the pn-core plugin — 133 skills, 19 commands, 9 agents, 1 MCP server shipped together

Good fit Use it to set up language routes, choose an internationalisation library, review translation files, and support languages such as Arabic, Hebrew, or Persian.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore
agentmods
npx agentmods add skills/perniemann/pncore/pn-i18n

Made for: Cursor.

Or install pn-core, the plugin that ships this one along with the rest of its 133 skills, 19 commands, 9 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pn-i18n

README.md
[![agentmods](https://agentmods.dev/badge/skills/perniemann/pncore/pn-i18n/github.svg)](https://agentmods.dev/skills/perniemann/pncore/pn-i18n)
Your own site
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-i18n"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-i18n/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pn-i18n

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-i18n"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-i18n.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,456 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.01456
Opus 5 $0.00026 $0.00728
Sonnet 5 $0.00010 $0.00291
Haiku 4.5 $0.00005 $0.00146

Measured 7d ago against content hash bed781f3e4f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pn-i18n scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/pn-core-mcp/content/skills/frontend/pn-i18n/SKILL.md · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Internationalisation (i18n)

When to use

  • Adding multi-language support to a Next.js, React, or Astro project
  • Setting up locale routing (/en, /fr, /ar) and language detection
  • Writing or reviewing translation message files
  • Handling pluralisation, date/number/currency formatting per locale
  • Supporting RTL languages (Arabic, Hebrew, Persian)

Library choice

Project Library When to prefer
Next.js App Router next-intl Default choice — tight App Router integration, RSC support
Next.js Pages Router next-intl or next-i18next next-i18next for older codebases
React SPA react-i18next Most flexible; works with Vite and CRA
Astro astro-i18n-aut or @astrolicious/i18n Static site generation with locale routes
Shared (any framework) @formatjs/intl + ICU Low-level; maximum format control

next-intl setup (Next.js App Router)

src/
  app/
    [locale]/
      layout.tsx
      page.tsx
  i18n/
    routing.ts
    request.ts
  messages/
    en.json
    fr.json
    ar.json
// src/i18n/routing.ts
import { defineRouting } from "next-intl/routing";

export const routing = defineRouting({
  locales: ["en", "fr", "ar"],
  defaultLocale: "en",
});

// src/i18n/request.ts
import { getRequestConfig } from "next-intl/server";
import { routing } from "./routing";

export default getRequestConfig(async ({ requestLocale }) => {
  const locale = (await requestLocale) ?? routing.defaultLocale;
  return {
    locale,
    messages: (await import(`../messages/${locale}.json`)).default,
  };
});
// app/[locale]/layout.tsx
import { NextIntlClientProvider } from "next-intl";
import { getMessages } from "next-intl/server";

export default async function LocaleLayout({ children, params: { locale } }) {
  const messages = await getMessages();
  return (
    <html lang={locale} dir={locale === "ar" ? "rtl" : "ltr"}>
      <body>
        <NextIntlClientProvider messages={messages}>{children}</NextIntlClientProvider>
      </body>
    </html>
  );
}

Read the full file on GitHub · 167 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 167 lines · 51 tokens per session scan A bed781f3e4f4

Subscribe to this mod's changes

pn-i18n is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 4d ago), licensed MIT. It adds 51 tokens to every session and 1,456 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.