agentleFS
conectlensconectlens/lenserfight/.agents/skills/language-integrator/SKILL.md

language-integrator

Skill18 starsChanged 6 months agoMITView on GitHub

Add or localize LenserFight for a new language or locale. Use when asked to add, implement, port, or support translations — for example "add French", "support Arabic", or "translate to German" — even if the user never says "i18n", "locale", or "translation". $ARGUMENTS is the target language, locale code, or combined hint, such as "French", "fr", "Arabic RTL", or "es Spanish".

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 2 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If $ARGUMENTS contains only a language name (e.g.

    line 20
  2. Very specific:

    If $ARGUMENTS contains only a code (e.g.

    line 21
  3. Distinctive:

    If the request targets those surfaces, read REFERENCE.md for the scaffold templates.

    line 53
  4. Very specific:

    If LOCALE is missing, add inside the VALUES (...) block:

    line 60
  5. Very specific:

    Read apps/landing/src/locales/en.json in full.

    line 67
  6. Very specific:

    Create apps/landing/src/locales/LOCALE.json mirroring every key.

    line 68
  7. Very specific:

    Do not rename or add keys.

    line 69
  8. Very specific:

    Create apps/web/src/locales/LOCALE.json using the same rules as step 2.

    line 95
  9. Very specific:

    Create docs/LOCALE/index.md using docs/tr/index.md as the structural reference:

    line 105
  10. Very specific:

    When the locale has enough content, add themeConfig with nav and sidebar following the tr locale as reference.

    line 168
  11. Very specific:

    JSON key names are sacred: Never rename, remove, or add keys vs.

    line 187
  12. Very specific:

    01_core_languages.sql is the authoritative registry: Every locale code used anywhere must appear there.

    line 191
  13. Distinctive:

    Auth and CLI have no i18n yet: If scaffolding them, read REFERENCE.md first.

    line 192

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Language Integrator

Implement full i18n support for $ARGUMENTS across the LenserFight monorepo.

Parse $ARGUMENTS

Derive three values from $ARGUMENTS:

ValueExample (French)Example (Arabic)
LOCALEfrar
NAMEFrançaisالعربية
DIRltrrtl

If $ARGUMENTS contains only a language name (e.g. "French"), infer LOCALE from ISO 639-1. If $ARGUMENTS contains only a code (e.g. "fr"), infer NAME and DIR. RTL languages: Arabic (ar), Hebrew (he), Persian (fa), Urdu (ur).

Architecture summary

apps/landing/src/
  i18n.ts                        ← SUPPORTED_LANGUAGES + init — register here
  locales/
    en.json                      ← English source of truth
    LOCALE.json                  ← create: mirror en.json, translate all values
    en/policies/                 ← English legal markdown
    LOCALE/policies/             ← create: translated legal markdown (if applicable)

apps/web/src/
  i18n.ts                        ← SUPPORTED_LANGUAGES + init — register here
  locales/
    en.json                      ← English source of truth
    LOCALE.json                  ← create: mirror en.json, translate all values

apps/docs/.vitepress/config.ts   ← add hreflang entry + locales entry

docs/
  LOCALE/
    index.md                     ← create: VitePress locale home (hero in native lang)
    tutorials/getting-started/
      overview.md                ← create: getting-started stub with English fallback link

supabase/seeds/01_core_languages.sql  ← authoritative language registry — add if missing

Auth (apps/auth) and CLI (apps/cli) have no i18n infrastructure yet. If the request targets those surfaces, read REFERENCE.md for the scaffold templates.

Procedure

1 — Verify language registry

Read supabase/seeds/01_core_languages.sql. If LOCALE is missing, add inside the VALUES (...) block:

('LOCALE', 'NAME_EN', 'NAME', 'DIR', true),

2 — Translate landing locale file

Read apps/landing/src/locales/en.json in full. Create apps/landing/src/locales/LOCALE.json mirroring every key. Translate all values. Do not rename or add keys. Preserve {{placeholder}} markers exactly.

Register in apps/landing/src/i18n.ts:

import LOCALE from './locales/LOCALE.json'

export const SUPPORTED_LANGUAGES = [
  { code: 'en', label: 'English' },
  { code: 'tr', label: 'Türkçe' },
  { code: 'LOCALE', label: 'NAME' }, // ← add
] as const

i18n.init({
  resources: {
    en: { translation: en },
    tr: { translation: tr },
    LOCALE: { translation: LOCALE }, // ← add
  },
  supportedLngs: ['en', 'tr', 'LOCALE'], // ← add
  ...
})

3 — Translate web locale file

Read apps/web/src/locales/en.json in full. Create apps/web/src/locales/LOCALE.json using the same rules as step 2. Register in apps/web/src/i18n.ts following the identical pattern.

4 — Translate landing legal policies (if applicable)

Copy apps/landing/src/locales/en/policies/ structure to apps/landing/src/locales/LOCALE/policies/. Translate each .md file with legal-level precision. Preserve markdown structure exactly.

5 — Create docs locale root

Create docs/LOCALE/index.md using docs/tr/index.md as the structural reference:

---
lang: LOCALE
title: {Translated "LenserFight Documentation"}
layout: home

hero:
  name: LenserFight
  text: "{Translated tagline}"
  tagline: "{Translated sub-tagline}"
  actions:
    - theme: brand
      text: {Translated "Get Started"}
      link: /LOCALE/tutorials/getting-started/overview
    - theme: alt
      text: GitHub
      link: https://github.com/conectlens/lenserfight
---

> {Translation note in LOCALE language — include link to English version}

6 — Create getting-started stub

Create docs/LOCALE/tutorials/getting-started/overview.md:

---
lang: LOCALE
title: {Translated "Overview"}
---

# {Translated "Overview"}

> {Note that page is WIP — link to /tutorials/getting-started/overview}

{2–3 sentences about LenserFight in LOCALE}

**{Call-to-action for native speakers}** → [i18n guide](/how-to/contributors/i18n-guide)

7 — Register in VitePress config

In apps/docs/.vitepress/config.ts:

Add hreflang in head[], before x-default:

['link', { rel: 'alternate', hreflang: 'LOCALE', href: `${DOCS_HOST}/LOCALE/` }],

Add locale in locales{}, after tr:

LOCALE: {
  label: 'NAME',
  lang: 'LOCALE',
  link: '/LOCALE/',
  title: '{Translated site title}',
  description: '{Translated description}',
},

Update JSON-LD inLanguage array to include 'LOCALE'.

When the locale has enough content, add themeConfig with nav and sidebar following the tr locale as reference.

8 — Translation quality rules

  • Natural wording over word-for-word. Use the most idiomatic phrasing for the locale.
  • Preserve {{placeholder}} interpolation markers exactly.
  • RTL: write text with RTL conventions. VitePress handles layout via dir — no extra code.
  • Legal/policy markdown: lawyer-level precision; never simplify or summarize.

9 — Verify

pnpm nx run docs:build
pnpm nx run docs:serve
# Open http://localhost:5173/LOCALE/ — verify hero and language picker

Gotchas

  • JSON key names are sacred. Never rename, remove, or add keys vs. en.json.
  • SUPPORTED_LANGUAGES is a const tuple — TypeScript infers the union from it; adding a code without the array entry causes downstream type errors.
  • Docs locale pages must mirror English paths. docs/LOCALE/tutorials/getting-started/overview.md maps to /LOCALE/tutorials/getting-started/overview.
  • Stub pages require a fallback link to the English counterpart.
  • 01_core_languages.sql is the authoritative registry. Every locale code used anywhere must appear there.
  • Auth and CLI have no i18n yet. If scaffolding them, read REFERENCE.md first.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.