Skip to content

refactor: merge language-variant skills into one canonical skill - #216

Closed
SomSamantray wants to merge 6 commits into
OthmanAdi:masterfrom
SomSamantray:refactor/consolidate-language-skills
Closed

SomSamantray wants to merge 6 commits into
OthmanAdi:masterfrom
SomSamantray:refactor/consolidate-language-skills

Conversation

@SomSamantray

Copy link
Copy Markdown
Contributor

What changed

Removed skills/planning-with-files-{ar,de,es,zh,zht}/ and kept a single canonical skill. /plan-ar, /plan-de, /plan-es, /plan-zh, and /plan-zht are unaffected — each now invokes planning-with-files:planning-with-files directly with an inline instruction to write the planning files and respond in that language, instead of invoking a dedicated per-language skill. scripts/bump-version.py and the three tests that hardcoded the 5 removed paths (test_skill_md_version_parity.py, test_skill_hook_dispatch_parity.py, test_stop_hook_dispatch.py) were updated to match, the plugin/marketplace description now describes language support via the commands rather than separate skills, and README/AGENTS.md no longer reference the removed skill ids. Version bumped to 3.10.0 with a CHANGELOG entry documenting the removal as a breaking change.

Why it changed

Issue #130 pointed out that the 6 skills only ever differed in prose — the assistant already responds in the user's language regardless of the skill's source language, so the 5 extra skills were pure duplication: 5 more descriptions injected into every session's system prompt, and one more place any logic change had to be replicated.

Checking that claim against the current v3.9.0 tree found the cost had grown worse than described, not milder. The 5 variants had quietly drifted out of feature parity with the canonical skill:

  • skills/planning-with-files-ar/scripts/session-catchup.py (and the other 4 variants) never got the configure_utf8_stdio() fix from v3.2.0 for the Windows encoding bug where non-ASCII session content crashed the hook silently — the same bug discussed in For multi-step / complex tasks, how should this skill be used properly? #19, still live for non-English users on Windows.
  • They're missing 12 script files the canonical skill ships (attest-plan, gate-stop, ledger-append, ledger-summary.ps1, phase-status, plan-doctor, resolve-plan-dir.ps1, set-active-plan) — the completion gate, ledger, and plan-doctor features never reached non-English users at all.
  • scripts/sync-ide-folders.py, the tool that keeps the IDE mirrors (.codex/, .cursor/, etc.) in parity with the canonical skill, was never extended to cover the 5 language directories, so this drift was structural, not a one-off oversight — every future feature would keep missing them.

Consolidating removes the duplication that makes that drift possible, rather than trying to backport the missing scripts and hope the sync tooling gets extended to catch the next one.

A few decisions worth flagging for review:

  • No runtime locale parameter (issue's Option B/C) — SKILL.md has no such mechanism in this plugin format, and every hook-emitted diagnostic string is already English-only and byte-identical across the canonical skill and every "translated" variant today (verified by diffing inject-plan.sh between canonical and -ar: 0 lines different). There's no genuine locale-specific runtime text left to parameterize.
  • Kept the 5 commands instead of removing them (issue's literal Option A) — this preserves every entrypoint the README documents today (/plan-ar etc.) for a one-line diff per command file, rather than a user-facing removal.
  • Deleted the 5 skill directories outright rather than a deprecation stub — a stub with no hooks would still need threading through the hook-dispatch and version-parity tests for a release cycle, for an artifact with no functional value once the canonical skill covers every language. This repo's own convention for a breaking change is a CHANGELOG entry (e.g. 3.9.0, 2.38.1), not a redirect stub.

How I tested it

python -m pytest tests/ -q passes clean: 411 passed, 11 skipped. python scripts/bump-version.py 3.10.0 --dry-run confirmed the trimmed 14-entry parity set resolves with no missing-file errors before I ran the real bump. Manually re-verified with grep that no live reference to a removed skill id remains outside CHANGELOG.md's historical entries.

I don't have a way to invoke /plan-ar etc. end-to-end from this environment (that requires a live Claude Code session), so the one thing I can't verify directly is that each rewired command still produces output in its target language — I re-read all 5 command files and the instruction line is present and unchanged in intent from before, but a maintainer spot-check of at least one non-English command before merge would be good given this is the change's core user-facing guarantee.

Known limitations

  • python scripts/bump-version.py reports MISSING: clawhub-upload/SKILL.md on a fresh clone — pre-existing behavior (that directory is gitignored publish staging), unrelated to this change and not touched here.

Closes #130.

SomSamantray added 6 commits August 7, 2026 16:22
Locale slash commands now invoke planning-with-files:planning-with-files
directly with an inline language instruction, instead of a dedicated
-ar/-de/-es/-zh/-zht skill. Prepares for removing the duplicate skills
in the next commit.
Removes skills/planning-with-files-{ar,de,es,zh,zht}/. The canonical
skill now covers every language via the repointed /plan-* commands
(prior commit); these variants had also drifted out of feature parity
with the canonical skill (missing attest-plan, gate-stop, ledger, and
plan-doctor scripts, and the v3.2.0 Windows UTF-8 fix), so removing
them eliminates that drift class entirely rather than requiring an
ongoing backport.
plugin.json's description named Arabic/German/Spanish/Chinese as if they
were separate skills, which is no longer true after removing the
per-language skill directories. marketplace.json never made that claim,
so it needs no change.
Removes the per-language install commands, the -ar/-de/-es/-zh/-zht
skill-id mentions, and the AGENTS.md version-bump table rows for the
skills that no longer exist. Language support is now documented as
the /plan-* commands routing through one canonical skill.
scripts/bump-version.py, tests/test_skill_md_version_parity.py, and
tests/test_skill_hook_dispatch_parity.py explicitly enumerated the 5
removed skills/planning-with-files-{ar,de,es,zh,zht}/ paths.
tests/test_stop_hook_dispatch.py hardcoded the same 5 SKILL.md paths
in ALL_STOP_SKILL_FILES with no existence guard, so it would have
raised FileNotFoundError once those directories were gone. Full suite
now green: 411 passed, 11 skipped.
AGENTS.md's version-bump table still listed 15 rows (including .kiro
and .pi/SKILL.md, both explicitly non-bumped per the note beneath the
table) after the count was corrected to 14; swapped .pi's row for its
actually-bumped package.json and dropped .kiro. Also fixed leftover
'eleven variants' / 'language variants' docstrings and comments in the
hook-dispatch and stop-hook tests that the structural edits missed.
@OthmanAdi

Copy link
Copy Markdown
Owner

@SomSamantray Not merging this one, and the reason is not the quality of the work. The audit in here is the most useful thing anyone has sent this repo in a while, and v3.10.0 acts on all of it.

Everything I could check from your diff held up. The five variants really were missing configure_utf8_stdio(), they really shipped 8 of the 20 scripts the canonical skill ships, and your list of the 12 missing ones matched exactly. sync-ide-folders.py really did cover only the three hook dispatch targets from #212, which is what made the drift structural rather than a one-off.

Two things decided against the deletion itself.

The install numbers, and what deletion actually does to them. The five variants carry 39.8K of the project's 89.3K installs on skills.sh. I checked what removing the directories would do there by reading the vercel-labs/skills source and issue tracker rather than assuming. Discovery is a live directory scan, so the CLI would immediately stop finding them, but the website has no pruning job: there are two open feature requests asking for one (#415 and #416, both unresolved for months) and a run of reports from repos in exactly this position, including #1553, a repo that deleted language-suffixed directories after a rename and could not get the entries taken down. So deleting the directories would not have removed those five listings. It would have left five permanent entries advertising an install command that errors, which is worse than either keeping or removing them.

A behavior risk in the command rewrite. plan-de.md tells the model that all planning files must be in German, and the canonical templates it now reads are English. Nothing in the canonical SKILL.md or templates tells the model to leave **Status:** in_progress alone, and check-complete.sh matches that token with grep -F. A model that reasonably translates that field along with the headings silently disables the completion gate for non-English users, which is the population the change is meant to help. The existing translated templates avoid this because a translator made that call once, correctly: the status tokens are literal English in every one of them, and the prose around them is not.

What shipped instead in v3.10.0, from your findings:

  • The 12 missing scripts now reach all five variants. 60 files created, 0 overwritten.
  • configure_utf8_stdio() backported into all five session-catchup.py by insertion, so the translated prose in those files is untouched.
  • sync-ide-folders.py now records which variant scripts are translator-owned. Its old comment claimed variant scripts were language-neutral, which is false and would have caused real damage if a later maintainer had trusted it and flipped include_scripts=True: -de/session-catchup.py contains German prose and five -ar scripts contain Arabic.

Your two AGENTS.md corrections were right as well, dropping the .kiro row and pointing .pi at its package.json. I did not take them from this branch since they are tangled with the deletion commits, but send them as a small standalone PR and it goes in with your name on it.

You are in CONTRIBUTORS.md for the audit. #130 stays open with the install numbers attached, since the consolidation question is real even though this particular answer to it is not the one this repo can take.

@OthmanAdi

Copy link
Copy Markdown
Owner

@SomSamantray Following up because this thread is now closed properly. #130 shipped in v3.11.0, and your audit is part of why it could.

The route that worked was moving the five variants one directory deeper rather than deleting them, so the plugin scan stops registering them while every install command keeps resolving. Your work is what made that safe to attempt: you proved the drift #130 predicted, named the twelve missing scripts and the missing Windows UTF-8 fix exactly, and showed the sync tooling covered only three dispatch targets. All of that shipped as v3.10.0. Had it not, this release would have moved five directories that were quietly a subset install.

You are credited in the v3.11.0 release notes alongside everyone else who pushed on this.

https://github.com/OthmanAdi/planning-with-files/releases/tag/v3.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate language variants into a single skill with locale parameter

2 participants