Slash command search returns wrong skill when plugin has similarly-named commands
Resolved 💬 3 comments Opened Apr 7, 2026 by jdiegosierra Closed Apr 11, 2026
Bug description
When searching for a slash command in Claude Code's command picker, the wrong skill is returned if the plugin has two skills with similar names.
Steps to reproduce
- Have a plugin with two skills that start with the same letter and share similar length, e.g.:
/my-plugin:setup— description is a short single line/my-plugin:sync— description uses YAML>block scalar (multi-line)
- Open the slash command picker and type
/my-plugin:setup - The search results show
/my-plugin:syncinstead of the exact match/my-plugin:setup
Expected behavior
Typing /my-plugin:setup should show the setup skill first (exact match), not sync.
Actual behavior
The sync skill appears in the picker instead of setup, even though the search query exactly matches setup.
Additional context
- Both skills have distinct
nameanddescriptionfields in their YAML frontmatter - The skill that incorrectly appears (
sync) uses a YAML block scalar (>) for its description, while the correct one (setup) uses a plain single-line string. This may affect how the search indexes the description text. - Typing the full command
/my-plugin:setupdirectly in the prompt (without using the picker) works correctly - Both skill directories are symlinks with the same timestamp, which might affect filesystem traversal order during indexing
Environment
- Claude Code CLI (macOS, Darwin 25.4.0)
- Plugin with 55+ skills registered via
claude/skills/directory symlinks
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗