src/modules/cmdpal/ExtensionTemplate/TemplateCmdPalExtension/.github/skills/add-dock-band/SKILL.md
Add dock band support to your Command Palette extension for persistent toolbar widgets. Use when asked to add dock support, toolbar buttons, persistent UI widgets, taskbar integration, live-updating status displays, quick-access buttons, or always-visible controls. Supports single buttons, multi-button strips, and live-updating content.
npx skillsauth add microsoft/powertoys add-dock-bandInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The Command Palette Dock is a persistent toolbar at the edge of the user's screen. Your extension can provide dock bands — strips of items that appear in the Dock — giving users quick access to commands without opening the full Command Palette.
Microsoft.CommandPalette.Extensions ≥ 0.9.260303001)Override GetDockBands() in your CommandProvider:
public partial class MyCommandsProvider : CommandProvider
{
private readonly ICommandItem[] _commands;
private readonly ICommandItem _dockBand;
public MyCommandsProvider()
{
DisplayName = "My Extension";
Id = "com.mycompany.myextension"; // Unique ID required for dock
var mainPage = new MyPage();
_dockBand = new CommandItem(mainPage) { Title = DisplayName };
_commands = [new CommandItem(mainPage) { Title = DisplayName }];
}
public override ICommandItem[] TopLevelCommands() => _commands;
public override ICommandItem[]? GetDockBands() => [_dockBand];
}
Use WrappedDockItem to create a band with multiple buttons:
public override ICommandItem[]? GetDockBands()
{
var button1 = new ListItem(new OpenUrlCommand("https://github.com"))
{
Title = "GitHub",
Icon = new IconInfo("\uE774"),
};
var button2 = new ListItem(new OpenUrlCommand("https://learn.microsoft.com"))
{
Title = "Learn",
Icon = new IconInfo("\uE82D"),
};
var band = new WrappedDockItem(
[button1, button2],
"com.mycompany.myextension.quicklinks", // Unique band ID
"Quick Links");
return [band];
}
Create a dock band that updates its content periodically (like a clock):
internal sealed partial class LiveStatusBand : ListItem
{
private readonly System.Timers.Timer _timer;
public LiveStatusBand()
: base(new NoOpCommand() { Result = CommandResult.KeepOpen() })
{
Title = DateTime.Now.ToString("HH:mm");
Icon = new IconInfo("\uE823"); // Clock icon
_timer = new System.Timers.Timer(60_000); // Update every minute
_timer.Elapsed += (s, e) =>
{
Title = DateTime.Now.ToString("HH:mm");
Subtitle = DateTime.Now.ToString("dddd, MMMM d");
};
_timer.Start();
}
}
// In CommandProvider:
public override ICommandItem[]? GetDockBands()
{
var band = new WrappedDockItem(
[new LiveStatusBand()],
"com.mycompany.myextension.status",
"Live Status");
return [band];
}
| Command Type on ICommandItem | Dock Behavior |
|------------------------------|---------------|
| IInvokableCommand | Single button that executes the command |
| IListPage | Each list item renders as a separate button in one band |
| IContentPage | Single expandable button with a flyout |
By default, only top-level commands and dock bands can be pinned. To allow pinning nested commands:
public override ICommandItem? GetCommandItem(string id)
{
// Look up commands by their Id
foreach (var item in GetAllCommands())
{
if (item?.Command is ICommand cmd && cmd.Id == id)
return item;
}
return null;
}
ICommandItem objects must have a Command with a non-empty Id — items without an ID are ignoredId on your CommandProvider (e.g., Id = "com.mycompany.myextension")WrappedDockItem for multi-button bands backed by a ListPagetools
Publish your Command Palette extension to the Microsoft Store or WinGet. Use when asked to publish, distribute, release, deploy to store, create MSIX packages, submit to WinGet, set up CI/CD for releases, or automate builds with GitHub Actions.
tools
Add fallback commands to your Command Palette extension for catch-all search behavior. Use when asked to add search functionality, query matching, direct input handling, calculator-style evaluation, URL opening, command execution, or results that appear when no other extension matches. Used by 14 of 20 built-in extensions.
tools
Add a settings page to your Command Palette extension. Use when asked to add settings, preferences, configuration options, toggles, text inputs, dropdowns, or user-customizable behavior. Covers ToggleSetting, TextSetting, ChoiceSetSetting, and persistence.
tools
Create form-based UI for your Command Palette extension using Adaptive Cards. Use when asked to add forms, user input fields, toggle switches, text inputs, dropdown menus, data entry, surveys, configuration dialogs, or interactive content pages. Supports the Adaptive Cards Designer for visual form building.