Back to Blog
Tutorial
Featured

Claude Code Skills for i18n: Build Custom Translation Automation Commands

Learn how to create custom Claude Code skills for internationalization. Automate translation workflows, extract strings, and manage localization directly from your terminal.

IntlPull Team
IntlPull Team
Engineering
February 20, 202514 min read

The moment I realized I was doing i18n wrong

Last month I was working on a feature that touched about 15 components. Nothing crazy, just a settings overhaul. But by the time I was done, I had 40+ new strings scattered across the codebase, all hardcoded in English.

My usual workflow: finish the feature, then spend an hour hunting down every hardcoded string, extracting them to translation keys, running the translation tool, and hoping I didn't miss any.

Then a colleague showed me his Claude Code setup. He typed /i18n-extract in his terminal, and Claude found every hardcoded string in his staged files, extracted them to translation keys, updated the components, and pushed the translations to our TMS. All in about 30 seconds.

I spent the next weekend building my own skills. Here's everything I learned.

What are Claude Code Skills anyway?

If you haven't used Claude Code (Anthropic's CLI for Claude), think of it as having Claude directly in your terminal. You can ask it questions, have it edit files, run commands—basically pair programming with an AI.

Skills are custom slash commands you define. Instead of explaining what you want every time, you create a skill once and invoke it with a simple command. Like shell aliases, but for AI-assisted workflows.

For i18n work, this is perfect. Translation tasks are repetitive, follow consistent patterns, and benefit hugely from automation.

Setting up your first i18n skill

Let's start simple. Create a file at .claude/commands/i18n-scan.md with instructions for Claude to scan the current file or specified files for hardcoded strings that should be internationalized.

Tell it what to look for: JSX text content between tags, string literals in user-facing contexts (labels, messages, titles), template literals that contain user-visible text, and placeholder text in inputs.

Tell it what to ignore: console.log messages, error messages for developers (unless user-facing), CSS class names, import paths, and object keys that are internal identifiers.

Specify the output format: for each hardcoded string found, show the line number, the hardcoded string, a suggested translation key (following namespace.section.element pattern), and context about where it appears and what it's used for.

Now when you run /i18n-scan in Claude Code, it understands exactly what you're looking for.

The skill that changed my workflow: i18n-extract

Here's the skill I use most. It doesn't just find strings—it actually extracts them and updates your code.

Create .claude/commands/i18n-extract.md with a process description: identify all hardcoded user-facing strings, generate appropriate translation keys following your naming convention, update the file to use the translation function (t() or equivalent), add any necessary imports, and create or update the translation file with the new keys.

Define your naming convention. Keys should follow namespace.section.element. For example: settings.profile.title becomes "Profile Settings", common.buttons.save becomes "Save", and errors.validation.required becomes "This field is required".

Include framework detection instructions: if using react-i18next, use the useTranslation hook and t() function; if using next-intl, use the useTranslations hook; if using vue-i18n, use $t() in templates and t() in setup; if using FormatJS, use FormattedMessage or useIntl.

This skill handles the entire extraction process. I run it on each file I touch, and my strings are properly internationalized before I even commit.

Connecting to your translation management system

The real power comes from integrating with your TMS. Create a skill that uses MCP (Model Context Protocol) to interact with IntlPull.

In .claude/commands/i18n-translate.md, describe a process to find strings that exist in the source language but are missing translations, and translate them. Note the prerequisites: IntlPull MCP server must be connected, and the project must be configured in IntlPull.

The process should use IntlPull MCP to get the current project status, identify keys with missing translations for target languages, and for each missing translation get the source text, get any existing translations for context, generate appropriate translations, and push to IntlPull with quality flag "needs_review".

For language handling, translate to all project languages by default, or specify target language with /i18n-translate spanish.

For quality control, mark all AI-generated translations as "needs_review", include translation notes for ambiguous terms, and flag any terms that should use glossary entries.

Now /i18n-translate spanish sends missing strings for AI translation, marked for human review.

Skill for checking translation coverage

Before deploying, I want to know if anything's missing. Create .claude/commands/i18n-status.md for a translation coverage report.

The report should include overall coverage percentage per language, namespaces with missing translations, recently added keys without translations, keys marked as "needs_review", and potentially outdated translations where the source changed after translation.

Display as a table showing language, coverage percentage, missing count, and needs review count. Then list the specific missing keys grouped by namespace.

If IntlPull MCP is connected, pull live data. Otherwise, analyze local translation files.

Skill for bulk operations

Sometimes you need to update many translations at once. Create .claude/commands/i18n-bulk.md for batch operations with safety built in.

Available operations might include: rename-namespace (rename a namespace across all languages), delete-unused (find and optionally delete translation keys that aren't used in code), merge-namespaces (combine multiple namespaces into one), and sync-keys (add missing keys from source language to all target languages with empty values).

For safety, always show preview of changes before applying, require explicit confirmation for destructive operations, create backup of affected files before bulk changes, and log all changes for audit purposes.

Making skills discoverable

After creating several skills, add a help skill at .claude/commands/i18n-help.md that lists available i18n-related skills and their usage.

Create a table with columns for command and description: /i18n-scan finds hardcoded strings in current file, /i18n-extract extracts strings and creates translation keys, /i18n-translate translates missing strings, /i18n-status shows translation coverage report, /i18n-bulk performs batch operations, /i18n-validate checks for translation issues, and /i18n-help shows the help message.

Include a quick start section: open a file with hardcoded strings, run /i18n-extract to internationalize it, run /i18n-translate to generate translations, and run /i18n-status to verify coverage.

Validation skill for CI integration

Create .claude/commands/i18n-validate.md for catching common translation issues before deployment. This one's designed to run in CI but also works locally.

Checks should cover structural issues (missing translations in non-source languages, orphaned keys that exist in translations but not in code, invalid JSON/YAML syntax in translation files, inconsistent nesting across languages), content issues (empty translations, placeholder mismatches where {name} is in source but not in translation, suspiciously long translations that might break UI, suspiciously short translations that might be incomplete, untranslated content that's the same as source language), and code issues (t() calls with non-existent keys, hardcoded strings in staged changes, dynamic key construction).

Output levels should be: Error (must fix before deploy), Warning (should review), and Info (for awareness).

Exit codes: exit 0 if no errors, exit 1 if errors found, for CI integration.

Pro tips from production use

After months of using these skills, here's what I've learned:

Be specific about your stack. Generic skills work, but stack-specific skills work better. If you're using Next.js with next-intl, create skills that understand that setup specifically. The more context you give, the better the output.

Build incrementally. Start with /i18n-extract and /i18n-status. Only add more skills when you find yourself repeating the same instructions. Skills should solve real friction, not theoretical problems.

Version control your skills. Put .claude/commands/ in git. When teammates update their Claude Code installation, they get your skills automatically. This is especially valuable for onboarding new developers.

Combine with project rules. In your CLAUDE.md, add i18n guidelines: all user-facing strings must be internationalized, use namespace.section.element key format, run /i18n-extract on any file with UI changes, run /i18n-validate before creating PRs. Now Claude follows these standards even outside of skill invocations.

Use MCP for superpowers. Skills are powerful alone, but with MCP integration, they can actually interact with external services. IntlPull's MCP server lets skills create and update translation keys, pull current translations, push new translations, check project status, and trigger translation workflows. This turns skills from "AI suggestions" into "AI actions."

Real workflow example

Here's what my daily workflow looks like now:

  • Start feature branch with git checkout -b feature/user-settings
  • Write code with hardcoded strings. I don't worry about i18n while building the feature. Faster iteration.
  • Before committing, on each modified file, run /i18n-extract. Claude updates the component and creates translation keys.
  • Generate translations by running /i18n-translate. All supported languages get AI translations, marked for review.
  • Validate by running /i18n-validate to catch any issues.
  • Commit. All changes, including translations, go in one atomic commit.
  • Total time added to my workflow: maybe 2-3 minutes per feature. Compare that to the hour I used to spend.

    Skill ideas for your team

    Beyond the basics, here are skills I've seen teams build:

    For design handoffs: /i18n-from-figma to parse Figma export and create translation keys from design text.

    For content teams: /i18n-suggest-improvements to review translations for tone, clarity, and brand voice.

    For mobile: /i18n-length-check to flag translations that might not fit mobile UI constraints.

    For accessibility: /i18n-alt-text to generate alternative text translations for images.

    For legal: /i18n-legal-review to flag translations that need legal/compliance review.

    The future: Claude Code agents for i18n

    Looking ahead, Claude Code is adding support for more complex multi-step workflows. Imagine an agent that monitors your git diffs and automatically internationalizes new strings, background validation that catches i18n issues before you commit, or automated translation refresh when source strings change.

    We're building some of these capabilities into IntlPull's MCP server. The combination of Claude Code skills and MCP integrations is genuinely changing how developers handle localization.

    Getting started today

  • Install Claude Code if you haven't: npm install -g @anthropic-ai/claude-code
  • Create .claude/commands/ in your project
  • Add the i18n-extract skill from this post
  • Try it on a file with hardcoded strings
  • Iterate based on what works for your stack
  • The investment is maybe an hour to set up. The time savings compound every day.

    ---

    *Want the complete skill pack? IntlPull maintains a collection of ready-to-use Claude Code skills for i18n. Our MCP server gives Claude direct access to create, update, and manage translations without leaving your terminal.*

    claude-code
    skills
    automation
    i18n
    cli
    developer-tools
    anthropic
    2025
    Share:

    Ready to simplify your i18n workflow?

    Start managing translations with IntlPull. Free tier included.