Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
kimny1143 avatar

I18n Key Diff

  • 2 installs
  • 4 repo stars
  • Updated July 31, 2026
  • kimny1143/claude-code-template

Scans en.json and ja.json translation files and reports keys present in one but missing in the other, for next-intl and content JSON.

About

A Japanese-language skill that scans en.json and ja.json translation files and reports keys missing on either side. A developer uses it to catch i18n gaps after adding English strings or when an i18n build error appears.

  • Detects keys present in en.json but missing in ja.json (and vice versa)
  • Supports next-intl messages/ and content JSON layouts

I18n Key Diff by the numbers

  • 2 all-time installs (skills.sh)
  • Ranked #1,842 of 2,719 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/kimny1143/claude-code-template --skill i18n-key-diff

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2
repo stars4
Last updatedJuly 31, 2026
Repositorykimny1143/claude-code-template

What it does

Scans en.json and ja.json translation files and reports keys present in one but missing in the other, for next-intl and content JSON.

Files

SKILL.mdMarkdownGitHub ↗

i18n-key-diff — en.json ↔ ja.json キー差分検出

en.jsonja.json のペアをスキャンし、一方にしか存在しないキーを列挙する。 next-intl(messages/ 配下)と content JSON(content/ 配下)の両方に対応。

---

使い方

「i18nの差分を確認して」
「翻訳キーが全部揃ってるか確認して」
「en.jsonにあってja.jsonにないキーを教えて」

---

実行手順

Step 1: 対象ファイルペアを検索

プロジェクトルートから以下のコマンドで en.json/ja.json ペアを列挙する(node_modules除外):

find . -name "en.json" -not -path "*/node_modules/*" | sort
find . -name "ja.json" -not -path "*/node_modules/*" | sort

同一ディレクトリに en.json と ja.json が両方存在するものをペアとして処理する。

Step 2: キー差分を抽出

以下の Python スクリプトで各ペアのキー差分を取得する:

import json, os, sys

def get_flat_keys(obj, prefix=''):
    keys = set()
    if isinstance(obj, dict):
        for k, v in obj.items():
            full = f'{prefix}.{k}' if prefix else k
            if isinstance(v, dict):
                keys |= get_flat_keys(v, full)
            else:
                keys.add(full)
    return keys

def diff_pair(en_path, ja_path):
    with open(en_path) as f:
        en_keys = get_flat_keys(json.load(f))
    with open(ja_path) as f:
        ja_keys = get_flat_keys(json.load(f))
    return en_keys - ja_keys, ja_keys - en_keys

# 使用例
only_en, only_ja = diff_pair('messages/en.json', 'messages/ja.json')

Step 3: 結果を整理して報告

---

出力フォーマット

## i18n キー差分レポート

### messages/en.json ↔ ja.json
- EN総キー数: 1220 / JA総キー数: 1220
- **ENにあってJAにない(翻訳追加が必要)**: 3件
  - `landing.products.muednote.features.newBadge`
  - `onboarding.step3.title`
  - `auth.errors.tokenExpired`
- **JAにあってENにない(削除済みor余剰)**: 0件

### content/stories/muedear/en.json ↔ ja.json
- EN総キー数: 45 / JA総キー数: 45
- 差分なし ✅

---
**要対応**: 3キー(messages/ja.json への追記が必要)
**問題なし**: 1ペア

---

対応ガイド

ENにあってJAにない場合(翻訳追加が必要): 1. 該当キーを ja.json の対応箇所に追記する 2. 値は日本語訳を入れる(仮訳でも可、後で精査) 3. 再度このスキルで差分がゼロになることを確認

JAにあってENにない場合(余剰キー):

  • ENから削除済みのキーが残っている可能性がある
  • 意図的に残している場合は無視して可
  • 不要であれば ja.json から削除

---

対象プロジェクト

主な使用想定:

  • mued/mued_v2messages/en.json + messages/ja.json(next-intl)
  • content ディレクトリ配下の en/ja JSONペア

他プロジェクトでも en.json/ja.json ペアがあれば同様に動作する。

---

注意事項

  • node_modules/ 配下は必ず除外する
  • キーの「値が空文字列」は差分として検出しない(キーが存在すればOK)
  • ネストの深さに制限なし(フラット化して比較するため)
  • JSON の配列値([])配下のキーは比較対象外(構造が動的なため)

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.