Skip to content

[skills] Show skill descriptions in selection dialogs - #691

Draft
jakemac53 wants to merge 2 commits into
dart-lang:mainfrom
jakemac53:update_skills_cli_util
Draft

jakemac53 wants to merge 2 commits into
dart-lang:mainfrom
jakemac53:update_skills_cli_util

Conversation

@jakemac53

@jakemac53 jakemac53 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Shows each skill's description (from its SKILL.md frontmatter) as a hover description in the skills get install/update selection dialog.

Important

This depends on an unpublished version of package:cli_util from dart-lang/tools#2609 (branch jakemac53/tools:add_multiline_select_descriptions), which adds SelectOption(label, description: ...) and SelectComponentSizing. It is currently wired up via a dependency_overrides git dependency in pkgs/skills/pubspec.yaml, with the hosted constraint set to cli_util: ^0.6.1. The override must be removed (and this PR can land) once that version is published.

Changes

  • SkillFrontmatter parses an optional description; ScannedSkill carries it (populated by both the package and git scanners, null for orphaned skills).
  • DialogSupport is unchanged (non-breaking). A new EnhancedDialogSupport extends DialogSupport adds showEnhancedSingleSelectDialog / showEnhancedMultiSelectDialog, which take SelectOption(label, description: ...) instances (sizing is not exposed). Both are exported from package:skills/skills.dart.
  • An internal SelectOptionDialogs extension on DialogSupport uses the enhanced dialogs when available, and otherwise falls back to the basic dialogs with just the labels.
  • CliUtilDialogSupport implements EnhancedDialogSupport, maps options to cli_util's SelectOptions, and uses SelectComponentSizing.fit() instead of the deprecated maxVisibleItems / hand-rolled terminal height computation.
  • The skill install/update dialog passes skill descriptions.
  • Tests for description parsing, the enhanced path, and the basic fallback.

Not included

  • The skills remove skill dialog does not show descriptions yet (it only has manifest data, would need to read installed SKILL.md files).
  • No CHANGELOG/version bump yet.

Uses a WIP version of package:cli_util (dart-lang/tools#2609) which adds
SelectOption descriptions and SelectComponentSizing to the select dialogs.
Comment thread pkgs/skills/lib/src/core/dialog_support.dart
Keeps DialogSupport non-breaking. EnhancedDialogSupport extends it with
methods taking SelectOptions (label + description), and callers fall back
to the basic dialogs when it is not implemented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant