The built-in / skill menu in the DSH Web GUI currently supports only name prefix matching. When skill names are long or contain multiple keywords, this matching approach is less efficient. The dsh-skill-fuzzy plugin introduces Codex-style fuzzy search to the DSH Web client, enabling more flexible retrieval by skill name or description.

Plugin Scope and Mechanism

This is a Web client plugin maintained by ch1bug, released under the MIT License. It patches the candidates() method of the built-in / skill source to filter and sort the local skill list. The plugin runs in the browser and does not depend on backend APIs.

Core Features

The plugin implements the following matching and sorting logic:

  1. Skill name matching: Ported from Codex’s fuzzy-match algorithm. The rule is greedy, case-insensitive ordered subsequence matching, with a score bonus for matches at the beginning of the string (lower scores rank higher, and prefix hits are prioritized).
  2. Description matching: Supports only contiguous, case-insensitive substring matching. Testing showed that scattered subsequence matching produced too much noise in long descriptions, so it was changed to contiguous matching.
  3. Sort priority: Prioritize skill name matches, then ascending score, then stable ordering.
  4. Empty query handling: With an empty query, return the full skill list and do not fall back to prefix matching behavior.

Installation and Activation

  1. Run the installation command:
    dsh plugin --profile web add github:ch1bug/dsh-skill-fuzzy
  1. Restart the dsh web service.
  2. Hard refresh the Web GUI page in the browser (the bootstrap manifest is injected when the page loads, and refreshing ensures the plugin takes effect).
  3. Enter / to open the skill menu.

Typical Usage Examples

Assume there is a skill named diagnosing-bugs. It can be found with the following queries:

  • /diag: Matches diagnosing-bugs (name prefix).
  • /bug: Matches diagnosing-bugs (name substring).
  • /bu: Matches diagnosing-bugs (contiguous name substring).
  • /regression: Matches diagnosing-bugs (keyword in description).

Technical Implementation and Development

The plugin’s logic is located in the lib/ directory, and the algorithm source code was ported from OpenAI Codex’s codex-rs/utils/fuzzy-match. The test suite is located in the tests/ directory and is run with node --test. Client code is packaged and injected separately via lib/client.js.

Applicable Scenarios and Cautions

This plugin is suitable for developers who need to locate skills quickly when the skill library is large. Because the plugin runs with the permissions of the current DSH process, it is recommended to review the source code and license before installing.

For the plugin source code and documentation, see: GitHub