[FEATURE] Improve Matching Commands - Exact Match, Then Name Fuzzy, then Description Fuzzy

Resolved 💬 2 comments Opened Jan 19, 2026 by zbmowrey Closed Jan 19, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When working with Claude Code, I often invoke commands using /some-command, but I find that its selection logic is inconsistent and leads to invocation of the wrong command. For example, we have the built-in /clear command. I also have defined a /clean-code-organization command that includes the word clear in the description.

When I type /clear, that's an exact match of a command name and should be what's "selected" (ie, I type /clear and hit enter, an exact match should be executed). Instead, Claude has highlighted and chosen the /clean-code-organization command.

This has forced me to rename commands to avoid any potential overlap.

Proposed Solution

I believe this can be resolved first checking to see if the input is an exact match, and if not, selecting the first/best result by name, and if none exists, then selecting first/best by description.

Alternative Solutions

None

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

  1. I'm working in any app.
  2. I need to clear context.
  3. I type /clear
  4. The context actually clears.

Additional Context

_No response_

View original on GitHub ↗

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