Back to Skills

tool-rename-deprecation

Ensure renamed built-in tool references preserve backward compatibility. Use when renaming a toolReferenceName, tool set referenceName, or any tool identifier. Run on ANY change to tool registration code. Covers legacyToolReferenceFullNames for tools and legacyFullNames for tool sets.

187,277stars41,000forksUpdated 7/9/2026

Security Assessment

Safe(100/100)
Security Score100/100

About tool-rename-deprecation

A quality-gate procedure for Visual Studio Code contributors who rename built-in tool or tool set reference names in the chat and language-model tooling code. The central rule: whenever a tool's toolReferenceName or a tool set's referenceName changes, the previous value must be preserved in the corresponding legacy array (legacyToolReferenceFullNames for tools, legacyFullNames for tool sets) so existing .prompt.md files, tool configurations, and saved references keep resolving.

The workflow starts by identifying whether a tool or a tool set is being renamed and where it is registered: TypeScript IToolData/IToolSet versus extension package.json (languageModelTools or languageModelToolSets). It stresses the stable identifier that must never change, id for internal tools and the name field for extension tools, which maps to id and drives onLanguageModelTool activation events. Only toolReferenceName should be renamed. When a tool moves between tool sets, the old toolSet/toolName path becomes a legacy name, and repeated renames accumulate all prior names rather than dropping any.

It then covers the multi-consumer check: legacy names must be honored everywhere a tool is looked up by reference name, including prompt-file validation (getDeprecatedFullReferenceNames), tool enablement and picker aliases (getToolAliases, getToolSetAliases), the auto-approval setting (isToolEligibleForAutoApproval), and the RunInTerminalTool's own local check. The guide lists the affected source files, gives real rename examples (runInTerminal, todo, getTaskOutput), and cites reference PRs illustrating both the design and a regression where a stable name field was wrongly changed. It closes with a regression checklist for any PR that touches tool registration.

FAQ

When do I need to update a legacy names array?

Whenever you change a tool's toolReferenceName or a tool set's referenceName, add the previous value to legacyToolReferenceFullNames or legacyFullNames so existing references still resolve.

Can I rename the name field of an extension-contributed tool?

No. In package.json the name field is mapped to the tool's id and drives activation events; only rename toolReferenceName and keep name unchanged.

What happens if a tool is renamed multiple times?

Accumulate every prior name in the legacy array and never remove existing entries, so all historical references continue to resolve.

Which consumers must respect legacy names besides prompt files?

Tool enablement aliases (getToolAliases and getToolSetAliases), the auto-approval check isToolEligibleForAutoApproval, and the RunInTerminalTool's own local auto-approval check all need to account for legacy names.

How do I verify a rename PR did not break backward compatibility?

Search the diff for changed toolReferenceName or referenceName values and confirm each previous value now appears in the legacy array, and check that no stable name fields were changed.

Install tool-rename-deprecation

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill