.claude/skills/i18n-workflow/SKILL.md
Internationalization workflow using next-intl for Chinese/English bilingual support. Read this before adding any user-facing text.
npx skillsauth add LilMikey-CN/YHIN i18n-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Never hardcode any user-facing string. Every piece of text visible to users must come from a translation key. The Stop hook will catch hardcoded Chinese characters.
src/i18n/
├── config.ts # locale config
├── request.ts # next-intl request config
└── messages/
├── en.json # English translations
└── zh.json # Chinese translations
en.json and zh.json at the same time// en.json
{
"resource": {
"create": {
"title": "Post a resource",
"haveLabel": "I have...",
"wantLabel": "I need...",
"submit": "Post"
}
}
}
// zh.json
{
"resource": {
"create": {
"title": "发布资源",
"haveLabel": "我有...",
"wantLabel": "我需要...",
"submit": "发布"
}
}
}
Server Component:
import { getTranslations } from 'next-intl/server';
export default async function Page() {
const t = await getTranslations('resource.create');
return <h1>{t('title')}</h1>;
}
Client Component:
'use client';
import { useTranslations } from 'next-intl';
export function CreateForm() {
const t = useTranslations('resource.create');
return <button>{t('submit')}</button>;
}
{page}.title{page}.{fieldName}Label{page}.{action} (submit, cancel, delete)errors.{errorType}common.{text} (save, cancel, loading, back)The locale switcher lives in the Navbar. It changes the [locale] route segment.
User's preferred locale is stored in the User model and set on login.
documentation
One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.
data-ai
Prisma ORM patterns including schema design, JSONB fields, pgvector integration, and migration workflow for YHIN
tools
Next.js 15 App Router patterns, server/client components, layouts, and routing conventions for YHIN
development
Core matching algorithm using pgvector semantic similarity. Finds "I have, they need" and "I need, they have" connections between users.