nextjs-i18n-seo

nextjs-i18n-seo is a skill for Claude Code from augchan42/inkstone. It costs 55 tokens per session (1,353 once invoked), scanned A, original, MIT.

A diagnostic and repair guide for search-engine optimization on multilingual Next.js websites using the App Router. It focuses on locale URLs, redirects, sitemaps, robots.txt, and hreflang links, which tell search engines about language alternatives.

In plain words
What is it for?
Use it to inspect redirect status codes, robots.txt, sitemaps, locale paths, and hreflang entries, then fix the identified issues. It specifically addresses cases where a clean URL redirects to a locale-prefixed URL.
Why use it?
It helps find common indexing and ranking problems caused by incorrect locale redirects or incomplete multilingual SEO data. The guide checks whether visitors and search engines reach the final language-specific URLs.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the inkstone plugin — 21 skills, 1 hook shipped together

Good fit Use it to inspect redirect status codes, robots.txt, sitemaps, locale paths, and hreflang entries, then fix the identified issues. It specifically addresses cases where a clean URL redirects to a locale-prefixed URL.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/augchan42/inkstone/nextjs-i18n-seo
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add augchan42/inkstone --skill nextjs-i18n-seo
Clone the repo
git clone --depth 1 https://github.com/augchan42/inkstone

Made for: Claude Code.

Or install inkstone, the plugin that ships this one along with the rest of its 21 skills, 1 hook.

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 nextjs-i18n-seo

README.md
[![agentmods](https://agentmods.dev/badge/skills/augchan42/inkstone/nextjs-i18n-seo/github.svg)](https://agentmods.dev/skills/augchan42/inkstone/nextjs-i18n-seo)
Your own site
<a href="https://agentmods.dev/skills/augchan42/inkstone/nextjs-i18n-seo"><img src="https://agentmods.dev/badge/skills/augchan42/inkstone/nextjs-i18n-seo/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 nextjs-i18n-seo

Your own site · 80×15
<a href="https://agentmods.dev/skills/augchan42/inkstone/nextjs-i18n-seo"><img src="https://agentmods.dev/badge/skills/augchan42/inkstone/nextjs-i18n-seo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,353 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00055 $0.01353
Opus 5 $0.00028 $0.00677
Sonnet 5 $0.00011 $0.00271
Haiku 4.5 $0.00006 $0.00135

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

Security

Grade A, and why

nextjs-i18n-seo scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -I https://example.com/some-page
skills/nextjs-i18n-seo/SKILL.md · 161 lines

How it starts

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

Next.js i18n SEO Fix

Multilingual Next.js sites commonly ship with a crawlability-killing bug: locale redirects that use 307 Temporary instead of 301 Permanent. This means Googlebot never transfers PageRank to the actual indexed URL. Fix this first — it's a one-line change with immediate impact.

The Core Problem

When a user (or Googlebot) hits /hexagrams/14, Next.js middleware redirects to /en/hexagrams/14. The default NextResponse.redirect(url) issues a 307 Temporary Redirect. Google does not transfer PageRank on 307s. Result: any backlink to the clean URL is wasted.

Pages Router doesn't have this problem because getStaticPaths generates pages at their final URL with no redirect hop.


Phase 1: Audit the Site

1. Check the redirect status code

curl -I https://example.com/some-page
# Look for: Location: and HTTP/2 301 vs 307

2. Check robots.txt

https://example.com/robots.txt
  • All paths should be allowed (or only /api/ blocked)
  • Sitemap URL must be listed

3. Check the sitemap

https://example.com/sitemap.xml
  • Are all pages listed with their final (locale-prefixed) URL?
  • Are alternates.languages hreflang entries present?

4. Inspect the middleware

Look for NextResponse.redirect(url) — if no status code is passed, it's a 307.


Phase 2: Fix the 307 → 301 Bug

File: src/middleware.ts (or middleware.ts at root)

// ❌ BEFORE — issues 307 Temporary Redirect
const response = NextResponse.redirect(newUrl);

// ✅ AFTER — issues 301 Permanent Redirect (passes PageRank)
const response = NextResponse.redirect(newUrl, 301);

Also fix any locale alias redirects (e.g. zh-hanszh-CN) the same way — they should already be 301 if added later, but verify.

Commit message:

fix: change locale redirect from 307 to 301 for SEO PageRank transfer

The locale prefix (/en/hexagrams/14) adds an extra path segment vs. /hexagrams/14. For English-first sites, removing the prefix from the default locale gives cleaner URLs and eliminates the redirect entirely for the primary language.

Read the full file on GitHub · 161 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. 10d ago First seen · 161 lines · 55 tokens per session scan A 518282d621e8

Subscribe to this mod's changes

nextjs-i18n-seo is a skill published in the GitHub repository augchan42/inkstone (4 stars, last pushed today), licensed MIT. It adds 55 tokens to every session and 1,353 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

tiktok-shop-cross-border

Cross-border selling on TikTok Shop. Market selection, logistics setup, localization strategy, compliance requirements, and international expansion. Use when the user asks about TikTok Shop international selling, cross-border ecommerce, global expansion, or selling in multiple countries.

nexscope-ai/eCommerce-Skills · 55 tokens

localization-testing

AI-powered localization and internationalization testing skill for e-commerce sites. Designs multi-language QA frameworks, currency validation checks, shipping info verification, and regional compliance audits.

nexscope-ai/eCommerce-Skills · 0 tokens

shopify-international

Shopify Markets — multi-currency, translation, duties/taxes, localized pricing, market-specific content.

nexscope-ai/eCommerce-Skills · 25 tokens

translation

Translate text between languages with cultural adaptation, terminology consistency, and support for multiple document types including technical docs, marketing copy, and UI strings. Use when the user requests translation or provides relevant inputs for this workflow.

seb1n/awesome-ai-agent-skills · 44 tokens

global-toolbar-controls

Quick global settings — currency, language, region, units — belong in a persistent, low-profile location such as a header toolbar or footer. These controls are frequent but not primary, so they use small typography and stay out of the main content hierarchy. Use when designing global selectors, locale switchers, or…

dembrandt/dembrandt-skills · 75 tokens

fec-drawio-studio

An editable workflow for making technical diagrams in draw.io (also called diagrams.net), with the original .drawio file saved alongside exported images or documents. It covers architecture, database, UML, sequence, flow, machine-learning, and code-structure diagrams.

bovinphang/frontend-craft · 154 tokens