adding-commands

Automates creation and wiring of Visual Studio command infrastructure across three extensibility models.

14|2|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/madskristensen/vs-agent-plugins --skill adding-commands
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adding-commands
Source: https://github.com/madskristensen/vs-agent-plugins/tree/main/skills/adding-commands
Command: npx skills add https://github.com/madskristensen/vs-agent-plugins --skill adding-commands

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Add commands (menu items, toolbar buttons) to Visual Studio extensions. Use when the user asks how to create a command, add a menu item, add a toolbar button, register a command handler, wire up a .vsct file, use KnownMonikers icons on buttons, or place commands in menus/toolbars in a Visual Studio IDE extension. Covers VisualStudio.Extensibility (out-of-process), VSIX Community Toolkit (in-process), and legacy VSSDK (in-process) approaches.

Core Features & Use Cases

  • One-command-per-file pattern with a root Commands/ folder and per-command .cs files for VisualStudio.Extensibility, Toolkit, and VSSDK.
  • Clear, cross-model guidance: implement commands using VisualStudio.Extensibility (out-of-process), VSIX Community Toolkit (in-process), or VSSDK (in-process) with .vsct or code-based configuration.
  • Tooling-friendly examples and conventions for icon usage (KnownMonikers) and command placement in standard VS menus and toolbars.

Quick Start

Create a new command class under Commands/ and wire it to the menu or toolbar using the model you choose (Extensibility, Toolkit, or VSSDK).

Frequently Asked Questions about adding-commands

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

FAQPage Schema
How do I add a menu item or toolbar button to a Visual Studio extension?

To add a menu item or toolbar button to a Visual Studio extension, create a new command class under a root Commands/ folder and wire it to the UI using your chosen extensibility model: VisualStudio.Extensibility, VSIX Community Toolkit, or VSSDK.

What is the difference between VisualStudio.Extensibility and VSIX Community Toolkit for command wiring?

VisualStudio.Extensibility uses an out-of-process approach for command wiring, while the VSIX Community Toolkit and legacy VSSDK operate in-process. VSSDK additionally supports .vsct file integration for defining command infrastructure.

How do I structure command handler files in a VSIX project?

Structure command handler files in a VSIX project using a one-command-per-file pattern. Place each per-command .cs file inside a dedicated root Commands/ folder to maintain clear organization across all extensibility models.

Can I use KnownMonikers icons on toolbar buttons in Visual Studio extensions?

Yes, you can use KnownMonikers icons on toolbar buttons in Visual Studio extensions. The command infrastructure supports tooling-friendly conventions for icon usage and command placement within standard VS menus and toolbars.

Do I need a .vsct file to register a command handler in VSSDK?

You need a .vsct file to wire up commands in the legacy VSSDK in-process model. However, VisualStudio.Extensibility and VSIX Community Toolkit approaches support code-based configuration without requiring .vsct integration.

Why are my Visual Studio extension commands not showing up in the toolbar?

Commands may not show up if the per-command .cs files are not properly wired to the toolbar using the correct extensibility model. Ensure files are in the Commands/ folder and configured via VisualStudio.Extensibility, Toolkit, or VSSDK.