Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate XAML styles, templates, and resource dictionaries with theme support for WPF applications
.claude/skills/a5c-ai-wpf-xaml-style-generator/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 71% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 58% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 81% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 167% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 108% | 0% |
Generate XAML styles, control templates, and resource dictionaries with theme support for WPF applications. This skill creates consistent, maintainable UI styling following modern design principles.
json{ "type": "object", "properties": { "projectPath": { "type": "string", "description": "Path to the WPF project" }, "designSystem": { "enum": ["fluent", "material", "custom"], "default": "fluent" }, "themes": { "type": "array", "items": { "enum": ["light", "dark", "high-contrast"] }, "default": ["light", "dark"] }, "controls": { "type": "array", "items": { "enum": ["button", "textbox", "combobox", "listbox", "datagrid", "menu", "all"] }, "default": ["all"] }, "accentColors": { "type": "object", "properties": { "primary": { "type": "string" }, "secondary": { "type": "string" } } }, "includeAnimations": { "type": "boolean", "default": true } }, "required": ["projectPath"] }
json{ "type": "object", "properties": { "success": { "type": "boolean" }, "files": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "type": { "enum": ["colors", "brushes", "styles", "templates", "themes"] } } } }, "mergedDictionaries": { "type": "array", "items": { "type": "string" } } }, "required": ["success"] }
Resources/
├── Themes/
│ ├── Colors.Light.xaml
│ ├── Colors.Dark.xaml
│ └── Colors.HighContrast.xaml
├── Brushes.xaml
├── Styles/
│ ├── ButtonStyles.xaml
│ ├── TextBoxStyles.xaml
│ ├── ComboBoxStyles.xaml
│ └── DataGridStyles.xaml
├── Templates/
│ └── ControlTemplates.xaml
└── Themes.xaml (merged dictionary)xml<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <!-- Background Colors --> <Color x:Key="BackgroundPrimary">#FFFFFF</Color> <Color x:Key="BackgroundSecondary">#F3F3F3</Color> <Color x:Key="BackgroundTertiary">#E5E5E5</Color> <!-- Foreground Colors --> <Color x:Key="ForegroundPrimary">#1A1A1A</Color> <Color x:Key="ForegroundSecondary">#666666</Color> <Color x:Key="ForegroundDisabled">#ABABAB</Color> <!-- Accent Colors --> <Color x:Key="AccentPrimary">#0078D4</Color> <Color x:Key="AccentSecondary">#005A9E</Color> <Color x:Key="AccentLight">#4BA0E8</Color> <!-- Border Colors --> <Color x:Key="BorderDefault">#D6D6D6</Color> <Color x:Key="BorderFocused">#0078D4</Color> <Color x:Key="BorderHover">#8A8A8A</Color> <!-- State Colors --> <Color x:Key="SuccessColor">#107C10</Color> <Color x:Key="WarningColor">#FF8C00</Color> <Color x:Key="ErrorColor">#D13438</Color> <Color x:Key="InfoColor">#0078D4</Color> </ResourceDictionary>
xml<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <!-- Dynamic Brushes (respond to theme changes) --> <SolidColorBrush x:Key="BackgroundPrimaryBrush" Color="{DynamicResource BackgroundPrimary}"/> <SolidColorBrush x:Key="BackgroundSecondaryBrush" Color="{DynamicResource BackgroundSecondary}"/> <SolidColorBrush x:Key="ForegroundPrimaryBrush" Color="{DynamicResource ForegroundPrimary}"/> <SolidColorBrush x:Key="ForegroundSecondaryBrush" Color="{DynamicResource ForegroundSecondary}"/> <SolidColorBrush x:Key="AccentBrush" Color="{DynamicResource AccentPrimary}"/> <SolidColorBrush x:Key="AccentHoverBrush" Color="{DynamicResource AccentSecondary}"/> <SolidColorBrush x:Key="BorderBrush" Color="{DynamicResource BorderDefault}"/> <SolidColorBrush x:Key="BorderFocusBrush" Color="{DynamicResource BorderFocused}"/> <!-- Gradient Brushes --> <LinearGradientBrush x:Key="AccentGradientBrush" StartPoint="0,0" EndPoint="0,1"> <GradientStop Color="{DynamicResource AccentLight}" Offset="0"/> <GradientStop Color="{DynamicResource AccentPrimary}" Offset="1"/> </LinearGradientBrush> </ResourceDictionary>
xml<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <!-- Base Button Style --> <Style x:Key="BaseButtonStyle" TargetType="Button"> <Setter Property="Background" Value="{DynamicResource BackgroundSecondaryBrush}"/> <Setter Property="Foreground" Value="{DynamicResource ForegroundPrimaryBrush}"/> <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/> <Setter Property="BorderThickness" Value="1"/> <Setter Property="Padding" Value="16,8"/> <Setter Property="MinHeight" Value="32"/> <Setter Property="FontSize" Value="14"/> <Setter Property="Cursor" Value="Hand"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4" SnapsToDevicePixels="True"> <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True"/> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter TargetName="border" Property="Background" Value="{DynamicResource BackgroundTertiaryBrush}"/> <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource BorderHoverBrush}"/> </Trigger> <Trigger Property="IsPressed" Value="True"> <Setter TargetName="border" Property="Background" Value="{DynamicResource AccentBrush}"/> <Setter Property="Foreground" Value="White"/> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Opacity" Value="0.5"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- Primary Button Style --> <Style x:Key="PrimaryButtonStyle" TargetType="Button" BasedOn="{StaticResource BaseButtonStyle}"> <Setter Property="Background" Value="{DynamicResource AccentBrush}"/> <Setter Property="Foreground" Value="White"/> <Setter Property="BorderBrush" Value="Transparent"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4" SnapsToDevicePixels="True"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="{TemplateBinding Padding}"/> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter TargetName="border" Property="Background" Value="{DynamicResource AccentHoverBrush}"/> </Trigger> <Trigger Property="IsPressed" Value="True"> <Setter TargetName="border" Property="Background" Value="{DynamicResource AccentSecondary}"/> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Opacity" Value="0.5"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- Implicit style for all buttons --> <Style TargetType="Button" BasedOn="{StaticResource BaseButtonStyle}"/> </ResourceDictionary>
csharppublic class ThemeManager { private const string ThemesPath = "pack://application:,,,/Resources/Themes/"; public static void SetTheme(string themeName) { var app = Application.Current; var dictionaries = app.Resources.MergedDictionaries; // Remove existing theme var existingTheme = dictionaries.FirstOrDefault(d => d.Source?.OriginalString.Contains("Colors.") ?? false); if (existingTheme != null) { dictionaries.Remove(existingTheme); } // Add new theme var themeUri = new Uri($"{ThemesPath}Colors.{themeName}.xaml"); dictionaries.Insert(0, new ResourceDictionary { Source = themeUri }); } public static string CurrentTheme { get; private set; } = "Light"; public static void ToggleTheme() { CurrentTheme = CurrentTheme == "Light" ? "Dark" : "Light"; SetTheme(CurrentTheme); } }
xml<Application x:Class="MyApp.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <!-- Theme colors (first so brushes can reference them) --> <ResourceDictionary Source="Resources/Themes/Colors.Light.xaml"/> <!-- Brushes --> <ResourceDictionary Source="Resources/Brushes.xaml"/> <!-- Control Styles --> <ResourceDictionary Source="Resources/Styles/ButtonStyles.xaml"/> <ResourceDictionary Source="Resources/Styles/TextBoxStyles.xaml"/> <ResourceDictionary Source="Resources/Styles/ComboBoxStyles.xaml"/> <ResourceDictionary Source="Resources/Styles/DataGridStyles.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application>
wpf-mvvm-scaffold - Application architecturewpf-high-dpi-analyzer - DPI scalingdesktop-ui-implementation process - UI workflowwpf-dotnet-expert - WPF expertiseplatform-convention-advisor - Design guidelines| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 24,405 | 18,398 | -25% | 1 | 1 | 0% | 4,581 | 7,838 | +71% | 0 | 0 | — |
case-02 | fail→fail | 23,917 | 30,430 | +27% | 1 | 1 | 0% | 6,217 | 9,174 | +48% | 0 | 0 | — |
case-03 | fail→pass | 21,226 | 22,919 | +8% | 1 | 1 | 0% | 5,567 | 8,784 | +58% | 0 | 0 | — |
case-04 | fail→pass | 8,533 | 5,033 | -41% | 1 | 1 | 0% | 2,109 | 3,808 | +81% | 0 | 0 | — |
case-05 | pass→pass | 9,440 | 6,094 | -35% | 1 | 1 | 0% | 1,696 | 4,117 | +143% | 0 | 0 | — |
case-06 | pass→pass | 12,234 | 10,360 | -15% | 1 | 1 | 0% | 2,221 | 4,691 | +111% | 0 | 0 | — |
case-07 | pass→pass | 6,464 | 7,180 | +11% | 1 | 1 | 0% | 1,431 | 4,738 | +231% | 0 | 0 | — |
case-08 | pass→pass | 7,442 | 6,189 | -17% | 1 | 1 | 0% | 1,476 | 4,167 | +182% | 0 | 0 | — |
case-09 | fail→pass | 7,996 | 5,434 | -32% | 1 | 1 | 0% | 1,477 | 3,950 | +167% | 0 | 0 | — |
case-10 | pass→pass | 8,628 | 7,351 | -15% | 1 | 1 | 0% | 1,734 | 4,457 | +157% | 0 | 0 | — |
case-11 | fail→fail | 11,975 | 13,443 | +12% | 1 | 1 | 0% | 2,391 | 5,607 | +135% | 0 | 0 | — |
case-12 | fail→pass | 11,493 | 9,783 | -15% | 1 | 1 | 0% | 2,434 | 5,073 | +108% | 0 | 0 | — |
case-13 | pass→pass | 6,771 | 2,285 | -66% | 1 | 1 | 0% | 1,260 | 3,393 | +169% | 0 | 0 | — |
case-14 | pass→pass | 8,804 | 2,086 | -76% | 1 | 1 | 0% | 1,666 | 3,222 | +93% | 0 | 0 | — |
case-15 | fail→pass | 12,732 | 2,032 | -84% | 1 | 1 | 0% | 2,276 | 3,274 | +44% | 0 | 0 | — |
case-16 | fail→pass | 10,633 | 4,246 | -60% | 1 | 1 | 0% | 1,964 | 3,754 | +91% | 0 | 0 | — |
case-17 | fail→pass | 9,843 | 3,350 | -66% | 1 | 1 | 0% | 1,916 | 3,443 | +80% | 0 | 0 | — |
case-18 | pass→pass | 13,864 | 9,084 | -34% | 1 | 1 | 0% | 2,619 | 4,889 | +87% | 0 | 0 | — |
case-19 | pass→pass | 10,296 | 5,672 | -45% | 1 | 1 | 0% | 2,032 | 4,097 | +102% | 0 | 0 | — |
case-20 | fail→pass | 14,199 | 1,862 | -87% | 1 | 1 | 0% | 2,402 | 3,220 | +34% | 0 | 0 | — |
case-21 | pass→pass | 12,897 | 9,597 | -26% | 1 | 1 | 0% | 3,015 | 5,167 | +71% | 0 | 0 | — |
case-22 | pass→pass | 13,434 | 10,711 | -20% | 1 | 1 | 0% | 2,773 | 5,085 | +83% | 0 | 0 | — |
case-23 | pass→pass | 19,700 | 13,265 | -33% | 1 | 1 | 0% | 3,958 | 5,554 | +40% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +39 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.