Slash command exact match should take priority over fuzzy match
Bug
When typing an exact skill trigger name (e.g. /tchk), Claude Code's autocomplete does not match it to the correct skill. Instead, it fuzzy-matches to unrelated commands (e.g. /sync-claude-config because it contains "conf" or "chk" as a substring).
Expected behavior
If the user types a string that exactly matches a skill's directory name or a value in its triggers array, that skill should appear first in autocomplete — before any fuzzy matches.
Steps to reproduce
- Create a skill at
~/.claude/skills/tchk/SKILL.mdwithtriggers: ["/tchk"] - Type
/tchkin the prompt - Autocomplete shows
/bchk,/batch,/goetc. — but NOT/tchk - The skill works if invoked programmatically via the Skill tool, but not from the slash command autocomplete
Environment
- Claude Code on Windows 11 (Git Bash)
- ~150 skills in
~/.claude/skills/ - The skill directory exists, SKILL.md has correct frontmatter with
user-invocable: true
Workaround
Renaming the directory to a longer, more unique name (e.g. toolchk) makes fuzzy match work, but this defeats the purpose of short aliases.
Suggestion
Exact match on directory name or triggers array should always win over fuzzy substring matches on other commands/skills.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗