Agent skill

ampel-i18n

Internationalize and localize applications using ampel-i18n-builder. Use when the user wants to (1) extract translatable strings from source code, (2) refactor code to automatically replace hardcoded strings with i18n calls, (3) add multi-language support to a project, (4) translate an app into multiple languages, (5) generate i18n translation files, (6) check translation coverage or find missing translations, (7) sync translations across locales, or when user types /ampel-i18n:localize. Supports React/TypeScript (JSON), Rust (YAML), and Java/Spring (.properties).

Stars 4
Forks 2

Install this agent skill to your Project

npx add-skill https://github.com/pacphi/ampel/tree/main/crates/ampel-i18n-builder/skills/ampel-i18n

SKILL.md

ampel-i18n

Automate internationalization (i18n) and localization (l10n) for any application using ampel-i18n-builder.

⚠️ PRE-FLIGHT CHECK (CRITICAL)

Before doing ANYTHING else, verify the tool is installed:

bash
ampel-i18n --version
# OR
ampel-i18n --version

If Command Not Found:

STOP and redirect the user:

"You need to install ampel-i18n-builder first. I've created a step-by-step installation guide at references/install-guide.md.

Would you like me to help you install it now? It takes about 5 minutes and I can guide you through each step."

Then offer to help install:

  1. Check if Rust/Cargo is installed (cargo --version)
  2. If missing, guide Rust installation (OS-specific commands)
  3. Run cargo install ampel-i18n-builder
  4. Verify with ampel-i18n --version

DO NOT proceed with commands if tool is not installed.


Quick Start (Tool Already Installed)

  1. Check if configuration exists:

    • Look for .ampel-i18n.yaml in project root
    • Look for .env file with translation provider credentials
  2. If no config exists, create one using the template in references/config-template.yaml

  3. Run the appropriate command based on user needs

Essential Documentation:

  • First-time install: references/install-guide.md ⬅️ Start here if new
  • Quick start: references/getting-started.md
  • Sample prompts: references/sample-prompts.md
  • Full config reference: references/config-template.yaml

Commands

Command Purpose
ampel-i18n init Interactive setup wizard for first-time users
ampel-i18n doctor Health check - validate configuration and diagnose issues
ampel-i18n extract Extract translatable strings from source code
ampel-i18n refactor NEW: Automatically replace hardcoded strings with i18n calls
ampel-i18n sync Generate/update translations for all configured languages
ampel-i18n coverage Show translation completion percentages per language
ampel-i18n missing List all untranslated keys
ampel-i18n report Generate comprehensive translation status report
ampel-i18n generate-types Create TypeScript/Rust types from translation files

Workflow

For New Projects (With String Extraction)

Recommended automated workflow:

bash
# 1. Initialize configuration
ampel-i18n init

# 2. Extract translatable strings from your code
ampel-i18n extract \
  --source frontend/src \
  --patterns "*.tsx" "*.ts" \
  --format json \
  --output frontend/public/locales/en/extracted.json \
  --merge

# 3. Refactor code to use i18n calls
ampel-i18n refactor \
  --target frontend/src \
  --mapping frontend/public/locales/en/extracted.json \
  --namespace common

# 4. Translate to all languages
ampel-i18n sync

Or manual setup (without extraction):

  1. Identify the i18n framework in use (i18next, react-intl, rust-i18n, etc.)
  2. Locate existing translation files or create initial structure
  3. Create .ampel-i18n.yaml configuration (see references/config-template.yaml)
  4. Set up provider credentials in .env (see references/env-template.txt)
  5. Run ampel-i18n sync to generate translations

For Existing Projects

  1. Health check: Run ampel-i18n doctor to validate setup
  2. Run ampel-i18n coverage to assess current state
  3. Run ampel-i18n missing to identify gaps
  4. Run ampel-i18n sync to fill in missing translations

Provider Setup

The tool uses a 4-tier fallback system. Configure at least one provider in .env:

Tier Provider Strength
1 Systran Enterprise neural MT
2 DeepL High-quality EU languages
3 Google Translate Broad coverage
4 OpenAI Complex content fallback

Only one provider is required. The system falls through tiers as needed.

Supported Languages (27 total)

Simple codes (21): en, fr, de, it, ru, ja, ko, ar, he, hi, nl, pl, sr, th, tr, sv, da, fi, vi, no, cs

Regional variants (6): en-GB, pt-BR, zh-CN, zh-TW, es-ES, es-MX

RTL support: Arabic (ar), Hebrew (he) — handled automatically

Common Patterns

React/i18next project:

yaml
source_locale: en
locales_dir: src/locales
file_format: json
namespaces: [common, auth, dashboard]

Rust project with rust-i18n:

yaml
source_locale: en
locales_dir: locales
file_format: yaml
namespaces: [errors, validation, providers]

Vue/vue-i18n project:

yaml
source_locale: en
locales_dir: src/i18n/locales
file_format: json

Type Generation

After syncing translations, generate type definitions for compile-time safety:

bash
# TypeScript
ampel-i18n generate-types --lang typescript --output src/types/i18n.d.ts

# Rust
ampel-i18n generate-types --lang rust --output src/i18n_types.rs

Expand your agent's capabilities with these related and highly-rated skills.

zircote/git-adr

git-adr

Manage Architecture Decision Records (ADRs) using git-adr, a CLI tool that stores ADRs in git notes instead of files. Execute commands (init, new, edit, list, show, search, sync, supersede, link, attach, stats, export, import), generate ADR content in any format (MADR, Nygard, Y-Statement, Alexandrian, Business Case, Planguage), and teach ADR best practices. Use when users ask about: ADRs, architecture decisions, decision records, git-adr commands, documenting technical decisions, or need help creating/managing ADRs in a git repository.

4 0
Explore
fvadicamo/dev-agent-skills

git-commit

Creates git commits following Conventional Commits format with type/scope/subject. Use when user wants to commit changes, create commit, save work, or stage and commit. Enforces project-specific conventions from CLAUDE.md.

55 5
Explore
fvadicamo/dev-agent-skills

creating-skills

Guide for creating Claude Code skills following Anthropic's official best practices. Use when user wants to create a new skill, build a skill, write SKILL.md, update an existing skill, or needs skill creation guidelines. Provides structure, frontmatter fields, naming conventions, and new features like dynamic context injection and subagent execution.

55 5
Explore
fvadicamo/dev-agent-skills

github-pr-merge

Merges GitHub Pull Requests after validating pre-merge checklist. Use when user wants to merge PR, close PR, finalize PR, complete merge, approve and merge, or execute merge. Runs pre-merge validation (tests, lint, CI, comments), confirms with user, merges with proper format, handles post-merge cleanup.

55 5
Explore
fvadicamo/dev-agent-skills

github-pr-creation

Creates GitHub Pull Requests with automated validation and task tracking. Use when user wants to create PR, open pull request, submit for review, or check if ready for PR. Analyzes commits, validates task completion, generates Conventional Commits title and description, suggests labels. NOTE - for merging existing PRs, use github-pr-merge instead.

55 5
Explore
fvadicamo/dev-agent-skills

github-pr-review

Handles PR review comments and feedback resolution. Use when user wants to resolve PR comments, handle review feedback, fix review comments, address PR review, check review status, respond to reviewer, verify PR readiness, review PR comments, analyze review feedback, evaluate PR comments, assess review suggestions, or triage PR comments. Fetches comments via GitHub CLI, classifies by severity, applies fixes with user confirmation, commits with proper format, replies to threads.

55 5
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results