ask-command-menu

Implements command palette interfaces with fuzzy search, keyboard navigation, and grouped commands using cmdk.

1|Updated Aug 17, 2026
One-click install
npx skills add https://github.com/NalinDalal/skillset --skill ask-command-menu-nalindalal
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ask-command-menu
Source: https://github.com/NalinDalal/skillset/tree/main/skills/ui/ask-command-menu
Command: npx skills add https://github.com/NalinDalal/skillset --skill ask-command-menu-nalindalal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires cmdk, fuse.js.

What problem does it solve? Building a command palette (⌘K) from scratch leads to accessibility gaps, missing keyboard navigation, and frustrating exact-match-only search. This Skill provides a complete pattern guide for implementing production-quality command palettes with fuzzy search, grouped commands, and proper focus management. ## Core Features & Use Cases - Command Registry Pattern: Centralized, typed command definitions with groups, shortcuts, icons, and async loaders. - Fuzzy Search & Keyboard Nav: Fuse.js integration with match highlighting, arrow-key selection, and ⌘K global shortcut handling. - Contextual Commands: Merge route-specific command groups with the global registry for context-aware palettes. - Use Case: Add a ⌘K command palette to a React dashboard so users can jump to pages, create projects, and open help docs without touching the mouse. ## Quick Start Ask the agent to add a command palette with ⌘K shortcut, fuzzy search, and grouped navigation commands to your React app.

Frequently Asked Questions about ask-command-menu

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a command palette in React?▼

Use the cmdk headless library for the accessible command menu primitives, then define a centralized typed command registry with groups, shortcuts, and actions. Add a global ⌘K/Ctrl+K keydown listener at the app root to toggle the palette.

What library should I use for a ⌘K command menu?▼

cmdk is the recommended library because it is headless, accessible, and keyboard-first. Avoid building a custom input with manual filtering, which reinvents the wheel and introduces accessibility gaps.

How do I add fuzzy search to a command palette?▼

Use Fuse.js with keys like label, description, and keywords, and a threshold around 0.3 for subsequence matching. Highlight matched characters in results by splitting the label text on the query and wrapping matches in a mark element.

Does cmdk support async command loading?▼

Yes, command groups can be marked async with a loader function that fetches commands on demand. Show skeleton loading states while fetching, debounce search input, and abort stale requests when a new query arrives.

Why does my command palette trap keyboard focus?▼

Focus traps happen when the palette does not restore focus to the triggering element on close. Return focus to the trigger after closing, and ensure Escape closes the palette so keyboard users are never stuck.

How do I show different commands per page or route?▼

Define a route-specific command group, such as project actions on a project page, and merge it with the global command registry when rendering. This gives contextual commands without duplicating the palette component.