MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Vsixtoolkit

Vsixtoolkit是一款design方向的AI技能,核心价值是Guidelines for Visual Studio extension (VSIX) development using Community,可用于解决开发者在design领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Guidelines for Visual Studio extension (VSIX) development using Community.VisualStudio.Toolkit

Last verified on: 2026-05-30
mkdir -p ./skills/vsixtoolkit && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/vsixtoolkit/SKILL.md -o ./skills/vsixtoolkit/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Visual Studio Extension Development with Community.VisualStudio.Toolkit


Scope


**These instructions apply ONLY to Visual Studio extensions using `Community.VisualStudio.Toolkit`.**


Verify the project uses the toolkit by checking for:

- `Community.VisualStudio.Toolkit.*` NuGet package reference

- `ToolkitPackage` base class (not raw `AsyncPackage`)

- `BaseCommand<T>` pattern for commands


**If the project uses raw VSSDK (`AsyncPackage` directly) or the new `VisualStudio.Extensibility` model, do not apply these instructions.**


Goals


- Generate async-first, thread-safe extension code

- Use toolkit abstractions (`VS.*` helpers, `BaseCommand<T>`, `BaseOptionModel<T>`)

- Ensure all UI respects Visual Studio themes

- Follow VSSDK and VSTHRD analyzer rules

- Produce testable, maintainable extension code

- **Adhere to `.editorconfig` settings** when present in the repository


Code Style (.editorconfig)


**If an `.editorconfig` file exists in the repository, all generated and modified code MUST follow its rules.**


This includes but is not limited to:

- Indentation style (tabs vs spaces) and size

- Line endings and final newline requirements

- Naming conventions (fields, properties, methods, etc.)

- Code style preferences (`var` usage, expression bodies, braces, etc.)

- Analyzer severity levels and suppressions


Before generating code, check for `.editorconfig` in the repository root and apply its settings. When in doubt, match the style of surrounding code in the file being edited.


.NET Framework and C# Language Constraints


**Visual Studio extensions target .NET Framework 4.8** but can use modern C# syntax (up to C# 14) with constraints imposed by the .NET Framework runtime.


✅ Supported Modern C# Features

- Primary constructors

- File-scoped namespaces

- Global usings

- Pattern matching (all forms)

- Records (with limitations)

- `init` accessors

- Target-typed `new`

- Nullable reference types (annotations only)

- Raw string literals

- Collection expressions


❌ Not Supported (.NET Framework Limitations)

- `Span<T>`, `ReadOnlySpan<T>`, `Memory<T>` (no runtime support)

- `IAsyncEnumerable<T>` (without polyfill packages)

- Default interface implementations

- `Index` and `Range` types (no runtime support for `^` and `..` operators)

- `init`-only setters on structs (runtime limitation)

- Some `System.Text.Json` features


Best Practice

When writing code, prefer APIs available in .NET Framework 4.8. If a modern API is needed, check if a polyfill NuGet package exists (e.g., `Microsoft.Bcl.AsyncInterfaces` for `IAsyncEnumerable<T>`).


Example Prompt Behaviors


✅ Good Suggestions

- "Create a command that opens the current file's containing folder using `BaseCommand<T>`"

- "Add an options page with a boolean setting using `BaseOptionModel<T>`"

- "Write a tagger provider for C# files that highlights TODO comments"

- "Show a status bar progress indicator while processing files"


❌ Avoid

- Suggesting raw `AsyncPackage` instead of `ToolkitPackage`

- Using `OleMenuCommandService` directly instead of `BaseCommand<T>`

- Creating WPF elements without switching to UI thread first

- Using `.Result`, `.Wait()`, or `Task.Run` for UI work

- Hardcoding colors instead of using VS theme colors


Project Structure


text
src/
├── Commands/           # Command handlers (menu items, toolbar buttons)
├── Options/            # Settings/options pages
├── Services/           # Business logic and services
├── Tagging/            # ITagger implementations (syntax highlighting, outlining)
├── Adornments/         # Editor adornments (IntraTextAdornment, margins)
├── QuickInfo/          # QuickInfo/tooltip providers
├── SuggestedActions/   # Light bulb actions
├── Handlers/           # Event handlers (format document, paste, etc.)
├── Resources/          # Images, icons, license files
├── source.extension.vsixmanifest  # Extension manifest
├── VSCommandTable.vsct            # Command definitions (menus, buttons)
├── VSCommandTable.

🎯 Best For

  • UI designers
  • Product designers
  • Claude users
  • GitHub Copilot users
  • Designers

💡 Use Cases

  • Generating component mockups
  • Creating design system tokens
  • Design system documentation
  • Component specification creation

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Vsixtoolkit to Your Work

    Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.

  4. 4

    Review and Refine

    Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.

❓ Frequently Asked Questions

Does this work with Figma?

Some design skills integrate with Figma plugins. Check the Works With section for supported tools.

Does Vsixtoolkit generate production-ready design specs?

It generates detailed specifications that developers can use directly. Review and adjust for your specific design system.

How do I install Vsixtoolkit?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/vsixtoolkit/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping usability testing

AI-generated designs should be validated with real users before development.

Not reading the full skill

Skills contain important context and edge cases beyond the quick start.

🔗 Related Skills