/vs-extensibility-skills:updating-color-themesfrom vs-extensibility-skills
Adds Fluent design system color support to VS theme (.vstheme) files by adding Shell/ShellInternal categories and setting FallbackId.
Ships in vs-extensibility-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
.vstheme file (e.g., in the VisualStudioThemePack repo) needs Fluent design system colors.Shell and/or ShellInternal categories in the file.VS Fluent controls read colors from two categories that did not exist in the legacy theme format:
| Category | GUID | Purpose |
|---|---|---|
Shell | {73708ded-2d56-4aad-b8eb-73b20d3f4bff} | Public Fluent design tokens (accent fills, control fills, text fills, strokes, surfaces, system fills, etc.) |
ShellInternal | {5af241b7-5627-4d12-bfb1-2b67d11127d7} | Internal tokens (environment chrome colors, status bar fills, caption controls) |
A custom theme's <Theme> element can specify a FallbackId attribute pointing to a built-in theme GUID. Any color token the custom theme does not define will fall back to that built-in theme's value. This means a custom theme only needs to define the subset of Shell/ShellInternal colors that differ from the fallback.
Built-in theme GUIDs for fallback:
| Theme | GUID |
|---|---|
| Light | {de3dbbcd-f642-433c-8353-8f1df4370aba} |
| Dark | {1ded0138-47ce-435e-84ef-9ec1f439b749} |
If the theme does not have a FallbackId, add one. Choose the built-in theme whose overall luminosity is closest to the custom theme (dark-background themes fall back to Dark, light-background themes fall back to Light).
Check the EnvironmentBackground color in the Environment category ({624ed9c3-bdfd-41fa-96c3-7c824ea32e3d}). A dark background means the theme is dark-variant; a light background means light-variant. This determines:
FallbackId to use if one is needed.If the <Theme> element does not already have a FallbackId attribute, add one:
<Theme Name="MyTheme" GUID="{...}" FallbackId="{1ded0138-47ce-435e-84ef-9ec1f439b749}">
With a fallback, the theme inherits all Shell/ShellInternal colors from the built-in theme by default. You then only need to override the tokens that should differ.
Add a <Category Name="Shell" GUID="{73708ded-2d56-4aad-b8eb-73b20d3f4bff}"> block near the bottom of the file (before </Theme>). Include at minimum the following tokens, which are the ones most visible in the Fluent chrome:
| Token Name | How to Derive | Notes |
|---|---|---|
AccentFillDefault | Take the MainWindowActiveCaption color (from the Environment category), but use the inverse luminosity of EnvironmentBackground in HSL space. | This is the theme's primary accent/brand color. |
AccentFillSecondary | Same RGB as AccentFillDefault but with alpha E5. | Hover state of accent. |
AccentFillTertiary | Same RGB as AccentFillDefault but with alpha CC. | Pressed state of accent. |
SolidBackgroundFillTertiary | Copy from Environment → ToolWindowBackground. | Tool window surface. |
SolidBackgroundFillQuaternary | Copy from Environment → EnvironmentBackground. | Main IDE background. |
SurfaceBackgroundFillDefault | Copy from Environment → CommandBarMenuBackgroundGradientBegin. | Popup/flyout surface. |
<Category Name="Shell" GUID="{73708ded-2d56-4aad-b8eb-73b20d3f4bff}">
<!-- Based from Environment category: MainWindowActiveCaption but the inverse luminosity of the EnvironmentBackground when in the HSL space -->
<Color Name="AccentFillDefault">
<Background Type="CT_RAW" Source="FFCC0000" />
</Color>
<!-- Copied from AccentFillDefault but with E5 alpha -->
<Color Name="AccentFillSecondary">
<Background Type="CT_RAW" Source="E5CC0000" />
</Color>
<!-- Copied from AccentFillDefault but with CC alpha -->
<Color Name="AccentFillTertiary">
<Background Type="CT_RAW" Source="CCCC0000" />
</Color>
<!-- Copied from Environment category: ToolWindowBackground -->
<Color Name="SolidBackgroundFillTertiary">
<Background Type="CT_RAW" Source="FF390000" />
</Color>
<!-- Copied from Environment category: EnvironmentBackground -->
<Color Name="SolidBackgroundFillQuaternary">
<Background Type="CT_RAW" Source="FF330000" />
</Color>
<!-- Copied from Environment category: CommandBarMenuBackgroundGradientBegin -->
<Color Name="SurfaceBackgroundFillDefault">
<Background Type="CT_RAW" Source="FF580000" />
</Color>
</Category>
Add a <Category Name="ShellInternal" GUID="{5af241b7-5627-4d12-bfb1-2b67d11127d7}"> block immediately after the Shell category. Include the following tokens:
| Token Name | How to Derive | Notes |
|---|---|---|
EnvironmentBackground | Copy from Environment → MainWindowActiveCaption (background). | Used for active window chrome. |
EnvironmentBody | Copy from Environment → EnvironmentBackground. | Used for main body area. |
EnvironmentBorder | Same value as AccentFillDefault. | Active window border accent. |
EnvironmentHeader | Copy from Environment → TitleBarActiveGradientBegin. | Active title bar surface. |
EnvironmentHeaderInactive | Copy from Environment → TitleBarInactiveGradientBegin. | Inactive title bar surface. |
EnvironmentIndicator | Copy from Environment → AutoHideTabBorder. If not defined, use TitleBarInactiveGradientBegin. | Auto-hide tab indicator. |
EnvironmentLogo | Copy from Environment → MainWindowInactiveIconDefault. If not defined, use MainWindowActiveCaption (foreground). | VS logo color in title bar. |
EnvironmentTab | Copy from Environment → FileTabSelectedBackground. | Active document tab. |
EnvironmentTabInactive | Copy from Environment → FileTabInactiveGradientTop. | Inactive document tab. |
StatusBarBackgroundFillRest | Copy from Environment → StatusBarDefault (background). | Status bar background at rest. |
StatusBarTextFillRest | Copy from Environment → StatusBarDefault (foreground). | Status bar text at rest. |
<Category Name="ShellInternal" GUID="{5af241b7-5627-4d12-bfb1-2b67d11127d7}">
<!-- Copied from Environment category: MainWindowActiveCaption -->
<Color Name="EnvironmentBackground">
<Background Type="CT_RAW" Source="FF770000" />
</Color>
<!-- Copied from Environment category: EnvironmentBackground -->
<Color Name="EnvironmentBody">
<Background Type="CT_RAW" Source="FF330000" />
</Color>
<!-- Same as AccentFillDefault -->
<Color Name="EnvironmentBorder">
<Background Type="CT_RAW" Source="FFCC0000" />
</Color>
<!-- Copied from Environment category: TitleBarActiveGradientBegin -->
<Color Name="EnvironmentHeader">
<Background Type="CT_RAW" Source="FF330000" />
</Color>
<!-- Copied from Environment category: TitleBarInactiveGradientBegin -->
<Color Name="EnvironmentHeaderInactive">
<Background Type="CT_RAW" Source="FF770000" />
</Color>
<!-- Copied from Environment category: AutoHideTabBorder or TitleBarInactiveGradientBegin if the previous is not defined -->
<Color Name="EnvironmentIndicator">
<Background Type="CT_RAW" Source="FF770000" />
</Color>
<!-- Copied from Environment category: MainWindowInactiveIconDefault or MainWindowActiveCaption (foreground) if the previous is not defined -->
<Color Name="EnvironmentLogo">
<Background Type="CT_RAW" Source="FFCCCCCC" />
</Color>
<!-- Copied from Environment category: FileTabSelectedBackground -->
<Color Name="EnvironmentTab">
<Background Type="CT_RAW" Source="FF490000" />
</Color>
<!-- Copied from Environment category: FileTabInactiveGradientTop -->
<Color Name="EnvironmentTabInactive">
<Background Type="CT_RAW" Source="FF300A0A" />
</Color>
<!-- Copied from Environment category: StatusBarDefault (background) -->
<Color Name="StatusBarBackgroundFillRest">
<Background Type="CT_RAW" Source="FF700000" />
</Color>
<!-- Copied from Environment category: StatusBarDefault (foreground) -->
<Color Name="StatusBarTextFillRest">
<Background Type="CT_RAW" Source="FFFFFFFF" />
</Color>
</Category>
Every <Color> entry in Shell and ShellInternal must have an XML comment above it explaining how the color was derived. This is critical for future maintenance — without the comment, nobody knows how to update the color if the source color changes. Use the exact comment format shown in the examples above.
The AccentFillDefault color is derived from MainWindowActiveCaption but uses the inverse luminosity of EnvironmentBackground in HSL color space. The procedure:
EnvironmentBackground ARGB hex value (e.g., FF330000 → R=0x33, G=0x00, B=0x00).L_new = 1.0 - L_old.MainWindowActiveCaption ARGB hex value and convert to HSL to get the hue H and saturation S.MainWindowActiveCaption with the inverted L from step 3.AARRGGBB with alpha FF.For AccentFillSecondary and AccentFillTertiary, use the same RGB but change the alpha byte:
E5 (≈90% opaque)CC (≈80% opaque)All colors use the CT_RAW type with AARRGGBB hex format:
AA = alpha (FF = fully opaque, 00 = fully transparent)RR = redGG = greenBB = blueAfter adding the colors, install the theme extension in VS and verify:
| Anti-Pattern | Why It's Wrong |
|---|---|
| Copying all ~90 Shell tokens from the built-in theme | Unnecessary — use FallbackId and only override what differs. |
Using CT_SYSCOLOR or CT_VSCOLOR for Shell tokens | Shell/ShellInternal tokens must use CT_RAW — they are absolute colors, not references. |
| Hardcoding accent colors without HSL derivation | The accent should be a luminosity-inverted version of the background to ensure contrast. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (madskristensen/vs-agent-plugins) — no native marketplace selected
npx claudepluginhub p/madskristensen-vs-extensibility-skills41 skills in this plugin
/adding-codelens-indicatorsAdd custom CodeLens indicators that display inline information above code elements in the Visual Studio editor. Use when the user asks how to add a CodeLens indicator, show inline data above methods or classes, create a custom CodeLens provider, implement IAsyncCodeLensDataPointProvider, display git history or test status in CodeLens, or add a details popup to CodeLens entries. Covers VSSDK / VSIX Community Toolkit (in-process + out-of-process CodeLens service). VisualStudio.Extensibility (out-of-process) does not have a dedicated CodeLens API./adding-commandsAdd 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./adding-context-menusAdd native-looking context menus to custom WPF UI in Visual Studio extensions (tool windows, custom tree views, list views). Use when the user wants to show a right-click context menu from their own UI that looks native to VS. Covers defining VSCT context menus (type="Context"), grouping commands with separators, and programmatically showing them via IVsUIShell.ShowContextMenu. Do NOT use regular WPF ContextMenu — it won't match VS theming or support command routing. Covers VSSDK and VSIX Community Toolkit (in-process). VisualStudio.Extensibility (out-of-process) does not support VSCT-based context menus on custom UI./adding-editor-adornmentsAdd visual adornments (decorations, overlays, highlights) to the Visual Studio text editor. Use when the user asks how to draw on the editor, add inline decorations, highlight text visually, add background colors to lines, show icons in the editor, create viewport-relative overlays, or render custom WPF visuals on top of editor text. Covers VisualStudio.Extensibility (out-of-process), VSIX Community Toolkit (in-process), and legacy VSSDK (in-process) approaches./adding-editor-classifiersAdd custom syntax highlighting and text classification to the Visual Studio editor. Use when the user asks how to colorize text, add syntax highlighting, create a classifier, highlight keywords, change text colors in the editor, create a custom language colorizer, or implement classification types. Covers VisualStudio.Extensibility (out-of-process), VSIX Community Toolkit (in-process), and legacy VSSDK (in-process) approaches./adding-editor-marginsAdd custom margins to the Visual Studio text editor (gutter icons, side panels, bottom bars). Use when the user asks how to add a gutter, editor margin, side panel, bottom bar, line number gutter, custom glyph margin, or editor chrome. Covers VisualStudio.Extensibility (out-of-process), VSIX Community Toolkit (in-process), and legacy VSSDK (in-process) approaches.Other plugins' skills for the same job