Slash command exact match should take priority over fuzzy match

Resolved 💬 2 comments Opened Apr 1, 2026 by marcodelpin Closed May 7, 2026

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

  1. Create a skill at ~/.claude/skills/tchk/SKILL.md with triggers: ["/tchk"]
  2. Type /tchk in the prompt
  3. Autocomplete shows /bchk, /batch, /go etc. — but NOT /tchk
  4. 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.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗