Awesome-omni-skill 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.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/tools/tool-rename-deprecation" ~/.claude/skills/diegosouzapw-awesome-omni-skill-tool-rename-deprecation && rm -rf "$T"
skills/tools/tool-rename-deprecation/SKILL.mdTool Rename Deprecation
When a tool or tool set reference name is changed, the old name must always be added to the deprecated/legacy array so that existing prompt files, tool configurations, and saved references continue to resolve correctly.
When to Use
Run this skill on any change to built-in tool or tool set registration code to catch regressions:
- Renaming a tool's
toolReferenceName - Renaming a tool set's
referenceName - Moving a tool from one tool set to another (the old
path becomes a legacy name)toolSet/toolName - Reviewing a PR that modifies tool registration — verify no legacy names were dropped
Procedure
Step 1 — Identify What Changed
Determine whether you are renaming a tool or a tool set, and where it is registered:
| Entity | Registration | Name field to rename | Legacy array | Stable ID (NEVER change) |
|---|---|---|---|---|
Tool () | TypeScript | | | |
| Tool (extension) | | | | (becomes ) |
Tool set () | TypeScript | | | |
| Tool set (extension) | | or | | — |
Critical: For extension-contributed tools, the
name field in package.json is mapped to id on IToolData (see languageModelToolsContribution.ts line id: rawTool.name). It is also used for activation events (onLanguageModelTool:<name>). Never rename the name field — only rename toolReferenceName.
Step 2 — Add the Old Name to the Legacy Array
Verify the old
value appears in toolReferenceName
. Don't assume it's already there — check the actual array contents. If the old name is already listed (e.g., from a previous rename), confirm it wasn't removed. If it's not there, add it.legacyToolReferenceFullNames
For internal/built-in tools (TypeScript
IToolData):
// Before rename export const MyToolData: IToolData = { id: 'myExtension.myTool', toolReferenceName: 'oldName', // ... }; // After rename — old name preserved export const MyToolData: IToolData = { id: 'myExtension.myTool', toolReferenceName: 'newName', legacyToolReferenceFullNames: ['oldName'], // ... };
If the tool previously lived inside a tool set, use the full
toolSet/toolName form:
legacyToolReferenceFullNames: ['oldToolSet/oldToolName'],
If renaming multiple times, accumulate all prior names — never remove existing entries:
legacyToolReferenceFullNames: ['firstOldName', 'secondOldName'],
For tool sets, add the old name to the
legacyFullNames option when calling createToolSet:
toolsService.createToolSet(source, id, 'newSetName', { legacyFullNames: ['oldSetName'], });
For extension-contributed tools (
package.json), rename only toolReferenceName and add the old value to legacyToolReferenceFullNames. Do NOT rename the name field:
// CORRECT — only toolReferenceName changes, name stays stable { "name": "copilot_myTool", // ← KEEP this unchanged "toolReferenceName": "newName", // ← renamed "legacyToolReferenceFullNames": [ "oldName" // ← old toolReferenceName preserved ] }
Step 3 — Check All Consumers of Tool Names
Legacy names must be respected everywhere a tool is looked up by reference name, not just in prompt resolution. Key consumers:
- Prompt files —
maps old → current names forgetDeprecatedFullReferenceNames()
validation and code actions.prompt.md - Tool enablement —
/getToolAliases()
yield legacy names so tool picker and enablement maps resolve themgetToolSetAliases() - Auto-approval config —
checksisToolEligibleForAutoApproval()
(including the segment afterlegacyToolReferenceFullNames
for namespaced legacy names) against/
settingschat.tools.eligibleForAutoApproval - RunInTerminalTool — has its own local auto-approval check that also iterates
LEGACY_TOOL_REFERENCE_FULL_NAMES
After renaming, confirm:
in a#oldName
file still resolves (shows no validation error).prompt.md- Tool configurations referencing the old name still activate the tool
- A user who had
still has that restriction honored"chat.tools.eligibleForAutoApproval": { "oldName": false }
Step 4 — Update References (Optional)
While legacy names ensure backward compatibility, update first-party references to use the new name:
- System prompts and built-in
files.prompt.md - Documentation and model descriptions that mention the tool by reference name
- Test files that reference the old name directly
Key Files
| File | What it contains |
|---|---|
| and interfaces with legacy name fields |
| Resolution logic: , , , |
| Extension point schema, validation, and the critical mapping (line ~274) |
| Example of a tool with its own local auto-approval check against legacy names |
Real Examples
tool: renamed fromrunInTerminal
→runCommands/runInTerminallegacyToolReferenceFullNames: ['runCommands/runInTerminal']
tool: renamed fromtodo
→todoslegacyToolReferenceFullNames: ['todos']
tool: renamed fromgetTaskOutput
→runTasks/getTaskOutputlegacyToolReferenceFullNames: ['runTasks/getTaskOutput']
Reference PRs
- #277047 — Design PR: Introduced
andlegacyToolReferenceFullNames
, built the resolution infrastructure, and performed the first batch of tool renames. Use as a template for how to properly rename with legacy names.legacyFullNames - #278506 — Consumer-side fix: After the renames in #277047, the
setting wasn't checking legacy names — users who had restricted the old name lost that restriction. Shows why all consumers of tool reference names must account for legacy names.eligibleForAutoApproval - vscode-copilot-chat#3810 — Example of a miss: Renamed
→openSimpleBrowser
but also changed theopenIntegratedBrowser
field (stable id) fromname
→copilot_openSimpleBrowser
. Thecopilot_openIntegratedBrowser
backward compat only worked by coincidence (the old name happened to already be in the legacy array from a prior change — it was not intentionally added as part of this rename).toolReferenceName
Regression Check
Run this check on any PR that touches tool registration (TypeScript
IToolData, createToolSet, or package.json languageModelTools/languageModelToolSets):
- Search the diff for changed
ortoolReferenceName
values. For each change, confirm the previous value now appears inreferenceName
orlegacyToolReferenceFullNames
. Don't assume it was already there — read the actual array.legacyFullNames - Search the diff for changed
fields on extension-contributed tools. Thename
field is the tool's stablename
— it must never change. If it changed, flag it as a bug. (This breaks activation events, tool invocations by id, and any code referencing the tool by itsid
.)name - Verify no entries were removed from existing legacy arrays.
- If a tool moved between tool sets, confirm the old
full path is in the legacy array.toolSet/toolName - Check tool set membership lists (the
array intools
contributions). If a tool'slanguageModelToolSets
changed, any tool settoolReferenceName
array referencing the old name should be updated — but the legacy resolution system handles this, so the old name still works.tools
Anti-patterns
- Changing the
field on extension-contributed tools — thename
inname
becomes thepackage.json
onid
(viaIToolData
inid: rawTool.name
). Changing it breaks activation events (languageModelToolsContribution.ts
), any code referencing the tool by id, and tool invocations. Only renameonLanguageModelTool:<name>
, nevertoolReferenceName
. (See vscode-copilot-chat#3810 where bothname
andname
were changed.)toolReferenceName - Changing the
field on TypeScript-registered tools — same principle as above. Theid
is a stable internal identifier and must never change.id - Assuming the old name is already in the legacy array — always verify by reading the actual
contents, not just checking that the field exists. A legacy array might list names from an even older rename but not the current one being changed.legacyToolReferenceFullNames - Removing an old name from the legacy array — breaks existing saved prompts and user configurations.
- Forgetting to add the legacy name entirely — prompt files and tool configs silently stop resolving.
- Only updating prompt resolution but not other consumers — auto-approval settings, tool enablement maps, and individual tool checks (like
) all need to respect legacy names (see #278506).RunInTerminalTool