agentleFS
aleen42aleen42/PersonalContext/skills/collect-i18n-change-merge-requests/SKILL.md

collect-i18n-change-merge-requests

Skill3 starsChanged 8 months agoMITView on GitHub

Collect strict whitespace-prefixed merge request ids and corresponding changed i18n files from the source commits behind translation changes. Use when asked to analyze a git commit that changes language resource files such as `*_ar.properties`, `*_ja.js`, `*_fr_FR.jsp`, install templates, or `zh-CN.js` style editor resources; choose one language file per language group, map changed resources back to zh_CN or zh-CN baseline files, blame those source lines, and return deduplicated `\s!123` ids with file mappings while excluding repository-qualified ids such as `wmweb!123`.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the bundled script for this task.

    line 10
  2. Distinctive:

    Use git blame on each changed key or changed line in the baseline file to find the source commit for that text.

    line 17
  3. Very specific:

    When the user supplies a source commit interval, analyze the latest translation commit first and limit those blamed source commits with …

    line 18
  4. Very specific:

    Default supported extensions mirror template.NG/build/i18n/collectResources.js: .properties, .js, .jsp, .letter, .eml, .html, .cf, and .txt.

    line 23
  5. Distinctive:

    Run from the git repository root:

    line 27
  6. Distinctive:

    When a latest translation commit must be traced only to source commits in a given range, keep the two inputs separate:

    line 33
  7. Very specific:

    Use the script output as the source of truth.

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Collect I18n Change Merge Requests

Workflow

Use the bundled script for this task. It codifies the fragile parts of the workflow:

  • Group language files by removing locale suffixes such as _ar.properties, _ja.properties, _fr_FR.properties, _ar.js, and basename locale files such as ar.js.
  • Pick one representative file per group, defaulting to the alphabetically first locale file.
  • For .properties, extract only property keys changed by the target commit's diff.
  • For other translation resources, extract changed new-file line numbers from the target commit's diff.
  • Map each representative file to the matching *_zh_CN.<ext> or zh-CN.js baseline.
  • Use git blame on each changed key or changed line in the baseline file to find the source commit for that text.
  • When the user supplies a source commit interval, analyze the latest translation commit first and limit those blamed source commits with --source-range; the interval is not the translation commit to analyze.
  • Extract only merge request ids matching strict whitespace-prefixed !123 with (?<=\s)!\d+.
  • Exclude repository-qualified ids such as wmweb!1025.
  • Output both file-group to id mappings and id to changed-file-group mappings.

Default supported extensions mirror template.NG/build/i18n/collectResources.js: .properties, .js, .jsp, .letter, .eml, .html, .cf, and .txt.

Quick Start

Run from the git repository root:

python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py HEAD

When a latest translation commit must be traced only to source commits in a given range, keep the two inputs separate:

python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py HEAD --source-range <base>..<tip>

Useful options:

python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py <commit> --json
python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py <commit> --no-groups
python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py <commit> --locales ar,ja,ko,vi
python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py <commit> --extensions properties,js,jsp,letter,eml,html,cf,txt
python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py <translation-commit> --source-range <base>..<tip> --json

Reporting

Report the total deduplicated ids first, then include the corresponding changed file groups for each id. State the translation commit analyzed, any source range applied, and the strict extraction rule. If the script reports missing baseline keys, include that as residual risk rather than inventing ids from full file history.

Use the script output as the source of truth. Do not fall back to git log -- <file> for the whole file unless the user explicitly asks for full-file history.

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.