vscode-ext-commands
github/awesome-copilot
Guidelines for correctly naming, scoping, and placing commands in VS Code extensions.
What is vscode-ext-commands?
This skill provides guidelines for contributing commands in VS Code extensions, covering naming conventions, visibility, titles, icons, and menu placement rules. Use it when adding or updating commands in a VS Code extension's package.json to follow established conventions for Regular and Side Bar commands.
- Specifies that all commands must define a title regardless of category, visibility, or location
- Defines naming pattern for Side Bar-only commands using underscore prefix and '#sideBar' suffix
- Clarifies icon requirements: only needed for commands used in the Side Bar
- Describes when to define 'enablement' and 'when' conditions for command visibility
- Guides correct group/order placement when contributing to view/title or view/item/context menus
How to install vscode-ext-commands
npx skills add https://github.com/github/awesome-copilot --skill vscode-ext-commands- A VS Code extension project with a package.json defining contributed commands
How to use vscode-ext-commands
- 1.Install the skill into your coding agent.
- 2.When adding or updating a command in your VS Code extension's package.json, invoke this skill for guidance.
- 3.Determine whether the command is a Regular command (Command Palette) or a Side Bar command based on its intended location.
- 4.For Regular commands, define a title and category, and skip the icon unless also used in the Side Bar.
- 5.For Side Bar commands, follow the '_extensionId.someCommand#sideBar' naming pattern, define an icon, set an appropriate enablement rule if needed, and ensure it's excluded from the Command Palette.
- 6.When contributing to view/title or view/item/context menus, specify the correct group/order relative to other commands/buttons.
- 7.Define a 'when' condition to control command visibility appropriately.
Use cases
- Adding a new command to a VS Code extension's Command Palette
- Adding a command exclusive to a view's Side Bar with an icon
- Deciding whether a command needs a category, icon, or enablement rule
- Setting correct group/order when contributing commands to view/title or view/item/context menus
- Reviewing existing extension commands for adherence to naming and visibility conventions
- VS Code extension developers
- Contributors adding or modifying commands in an existing VS Code extension
vscode-ext-commands FAQ
It provides guidelines for contributing (adding/updating) commands in VS Code extensions, covering naming conventions, visibility, icons, and placement rules.
Side Bar commands are prefixed with an underscore and suffixed with '#sideBar', e.g. '_extensionId.someCommand#sideBar'.
No, regular commands don't need an icon unless they will also be used in the Side Bar.
No, Side Bar exclusive commands should not be visible in the Command Palette.
Full instructions (SKILL.md)
Source of truth, from github/awesome-copilot.
name: vscode-ext-commands description: 'Guidelines for contributing commands in VS Code extensions. Indicates naming convention, visibility, localization and other relevant attributes, following VS Code extension development guidelines, libraries and good practices'
VS Code extension command contribution
This skill helps you to contribute commands in VS Code extensions
When to use this skill
Use this skill when you need to:
- Add or update commands to your VS Code extension
Instructions
VS Code commands must always define a title, independent of its category, visibility or location. We use a few patterns for each "kind" of command, with some characteristics, described below:
-
Regular commands: By default, all commands should be accessible in the Command Palette, must define a
category, and don't need anicon, unless the command will be used in the Side Bar. -
Side Bar commands: Its name follows a special pattern, starting with underscore (
_) and suffixed with#sideBar, like_extensionId.someCommand#sideBarfor instance. Must define anicon, and may or may not have some rule forenablement. Side Bar exclusive commands should not be visible in the Command Palette. Contributing it to theview/titleorview/item/context, we must inform order/position that it will be displayed, and we can use terms "relative to other command/button" in order to you identify the correctgroupto be used. Also, it's a good practice to define the condition (when) for the new command is visible.
Related skills
More from github/awesome-copilot and the wider catalog.
git-commit
Execute semantic git commits with conventional message analysis and intelligent staging.
excalidraw-diagram-generator
Generate Excalidraw diagrams from natural language descriptions.
documentation-writer
Create structured technical documentation using the Diátaxis framework for tutorials, how-to guides, references, and explanations.
gh-cli
GitHub CLI comprehensive reference for repositories, issues, PRs, Actions, projects, releases, and all GitHub operations from the command line.
prd
Generate comprehensive Product Requirements Documents with executive summaries, user stories, technical specs, and risk analysis.
refactor
Surgical code refactoring to improve maintainability without changing behavior.