cmdk-actions

Implements new actions for Sentry's Command+K palette using CMDKAction components and slots.

44.7k|4.8k|Updated Aug 30, 2010
One-click install
npx skills add https://github.com/getsentry/sentry --skill cmdk-actions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cmdk-actions
Source: https://github.com/getsentry/sentry/tree/main/.agents/skills/cmdk-actions
Command: npx skills add https://github.com/getsentry/sentry --skill cmdk-actions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adding actions to Sentry's Command+K palette requires understanding its slot system, resource loading patterns, and registration lifecycle, which are easy to get wrong without guidance.

Core Features & Use Cases

  • Action Registration Patterns: Covers navigation links, callbacks, static groups, async resource pickers, and render-prop children using the CMDKAction component.
  • Slot Management: Explains the task, page, and global slots that control sort order and action lifetime, including how to register page-level and global actions.
  • Advanced Patterns: Documents state-conditional actions, workflow state machines, capability configs, dynamic labels, and supplementary sections.
  • Use Case: When adding a "Resolve Issue" action to the issue details page, wrap a CMDKAction in a page-level CommandPaletteSlot so it registers and deregisters with the page lifecycle.

Quick Start

Add a new page-level action to the Sentry command palette that resolves the current issue when selected.

Frequently Asked Questions about cmdk-actions

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

FAQPage Schema
How do I add a new action to Sentry's Command+K palette?

Render a CMDKAction component with a display label and either a to, onAction, or resource prop. Wrap page-level actions in a CommandPaletteSlot named page, or add global actions inside GlobalCommandPaletteActions.

How do I build an async resource picker in the command palette?

Use the resource prop with cmdkQueryOptions, passing query params from the live search input and setting enabled to context.state === 'selected' so fetching is deferred until drill-in. The select field must transform the API response into CommandPaletteAction items.

What is the difference between page and global slots in the command palette?

Page slots tie actions to a page component's mount and unmount lifecycle and sort after task actions. Global actions are always present for any organization and are registered once in GlobalCommandPaletteActions rather than in a new slot consumer.

When should I use static children versus the resource prop?

Use static children via a hook for small, bounded datasets filtered by client-side fuzzy search. Use the resource prop for large or unbounded datasets that need server-side search and deferred fetching on drill-in.

Why is my command palette resource fetching too early?

The resource function runs on render, so without gating it fetches immediately. Set enabled to context.state === 'selected' inside cmdkQueryOptions so the query only fires after the user drills into the node.