Currently Available: Need a skilled Software Developer for your next project?
Categories
Coding Agents

How Claude Code Resolves Name Conflicts Between Skills and Slash Commands

When you add a workflow to Claude Code, you can make it available as a skill or as a legacy custom slash command, an older type of command defined in a file. Either can add a command named /deploy. If both use that name, it may be unclear which workflow Claude Code runs.

Claude Code handles name conflicts differently depending on the kinds of entries involved and where they come from. User reports say a local skill takes precedence over a legacy command with the same name. A skill synced from claude.ai follows a documented namespacing rule. Knowing which kind of entry you created helps you choose a distinct name and understand which workflow Claude Code runs.

Skills and command files can create the same name

A skill is a prompt-based workflow, meaning a set of instructions that Claude Code loads when you invoke it or, in some configurations, when Claude determines the skill is relevant. A skill named deploy can provide the /deploy command. A legacy custom command is a Markdown file in .claude/commands/, such as .claude/commands/deploy.md, that also provides /deploy. Anthropic’s skills documentation says Claude Code still supports existing command files and treats custom commands as part of the skills system.

Claude Code recognizes a slash command at the start of a message. Text after the command provides its input. For example, /deploy staging runs the command named deploy with staging as input. The commands reference also explains that a command’s behavior is separate from whether it appears in the command menu. A command missing from the menu does not, by itself, show which item with that name takes priority.

The outcome depends on the kind of conflict

When a local skill and a legacy command have the same name, reports say the skill takes precedence. In one report about Claude Code v2.1.59, /explain-code selected a skill with the same name even though its user-invocable setting was false. The command was then unavailable under that name. The issue report describes reported behavior; the official documentation does not confirm a general priority rule. Treat the report as evidence about this conflict, not proof that every custom skill overrides every command.

Anthropic documents how synced skills handle name conflicts. When a skill synced from a claude.ai account conflicts with another command’s short name, the existing command keeps /name, and the synced skill uses /anthropic-skills:name. The documented conflicts include built-in commands and bundled skills, as well as local skills and command files. They also include plugin skills and MCP prompts. Anthropic says the namespaced fallback arrived in Claude Code v2.1.269. The displayed listing for synced skills changed again in v2.1.281. These version details apply to synced skills, not to every conflict involving local entries.

Claude Code handles built-in commands and bundled skills as different kinds of entries. The CLI implements a built-in command’s behavior. A bundled skill is a prompt-based workflow that comes with Claude Code. The command reference labels bundled entries as skills. The cited evidence covers a conflict with one kind of entry, leaving unresolved what happens when a local skill conflicts with the other.

When skills with the same name come from different locations, Anthropic says the skill’s source location determines which /name runs. Plugin skills use a namespace such as /plugin-name:skill-name, so a plugin skill and a non-plugin skill can share a short name. Claude Code reserves the anthropic-skills namespace for synced skills. A custom item using that namespace does not load. A startup notice identifies the item to rename or edit.

Choose distinct names and verify the target

Give each workflow a different name to prevent conflicts. Before adding a skill, check whether a command file or built-in command already uses that short name. Also check plugins, bundled skills, and synced skills. Keep the plugin namespace for a plugin workflow. If a synced skill has a conflict, use its /anthropic-skills:name form.

If two local entries already share a name, the menu alone does not show which one takes priority. Invoke the name and check which workflow responds. Rename one entry if you need predictable behavior. For synced-skill name checks, the documentation says comparisons ignore case and spacing and normalize certain compatibility characters. These comparison rules apply to synced-skill conflicts, not necessarily to every local command conflict.

A separate report about Claude Code v2.0.64 said a custom /skill command interfered with custom command loading. The report concerned the built-in Skill tool, so it does not establish current behavior for name conflicts in general. If a custom command disappears, check the Claude Code version and startup notices before treating the old report as a current rule.

What I'm building

Delegate tasks. Get software.

Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.

Take a look at vroni.com

Email updates

Usually a new article and a few links I found interesting.

No spam. Unsubscribe with one click.

Leave a Reply

Your email address will not be published. Required fields are marked *