wpf-rule-resourcedictionary-patterns

wpf-rule-resourcedictionary-patterns is a skill for Claude Code from christian289/dotnet-with-claudecode. It costs 33 tokens per session (724 once invoked), scanned A, original, MIT.

A set of rules for organizing WPF ResourceDictionary files, which store reusable styles, templates, and other UI resources. It requires Generic.xaml to serve only as a central list of imported resource files.

In plain words
What is it for?
Use it when structuring styles, templates, colors, and other resources in a WPF custom-control library.
Why use it?
It keeps custom-control styling separated and makes resource loading order easier to manage.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the wpf-dev-pack plugin — 28 skills, 10 agents, 4 hooks, 2 MCP servers shipped together

Good fit Use it when structuring styles, templates, colors, and other resources in a WPF custom-control library.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/christian289/dotnet-with-claudecode/wpf-rule-resourcedictionary-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add christian289/dotnet-with-claudecode --skill wpf-rule-resourcedictionary-patterns
Clone the repo
git clone --depth 1 https://github.com/christian289/dotnet-with-claudecode

Made for: Claude Code.

Or install wpf-dev-pack, the plugin that ships this one along with the rest of its 28 skills, 10 agents, 4 hooks, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wpf-rule-resourcedictionary-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/wpf-rule-resourcedictionary-patterns/github.svg)](https://agentmods.dev/skills/christian289/dotnet-with-claudecode/wpf-rule-resourcedictionary-patterns)
Your own site
<a href="https://agentmods.dev/skills/christian289/dotnet-with-claudecode/wpf-rule-resourcedictionary-patterns"><img src="https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/wpf-rule-resourcedictionary-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wpf-rule-resourcedictionary-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/christian289/dotnet-with-claudecode/wpf-rule-resourcedictionary-patterns"><img src="https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/wpf-rule-resourcedictionary-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 724 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 19
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.00724
Opus 5.5 $0.00013 $0.00290
Sonnet 5.5 $0.00007 $0.00145
Haiku 4.5 $0.00003 $0.00072

Measured 1mo ago against content hash c4b82d599355, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

wpf-rule-resourcedictionary-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

wpf-dev-pack/skills/wpf-rule-resourcedictionary-patterns/SKILL.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ResourceDictionary Patterns

Rules for organizing ResourceDictionary files in WPF custom control libraries.


Generic.xaml — MergedDictionaries Hub Only

Generic.xaml must function exclusively as a hub that merges other dictionaries. Never define inline styles, templates, or resources directly in Generic.xaml.

<!-- Correct: Generic.xaml is only a hub -->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Themes/Colors.xaml" />
        <ResourceDictionary Source="/Themes/MyButton.xaml" />
        <ResourceDictionary Source="/Themes/MyTextBox.xaml" />
        <ResourceDictionary Source="/Themes/MySlider.xaml" />
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
<!-- Prohibited: inline style in Generic.xaml -->
<ResourceDictionary ...>
    <Style TargetType="{x:Type local:MyButton}">
        ...
    </Style>
</ResourceDictionary>

Separate Each Control Style into Its Own File

Every custom control gets its own XAML file under Themes/:

MyControlLibrary/
├── Themes/
│   ├── Generic.xaml          ← hub only, no styles
│   ├── Colors.xaml           ← shared color/brush resources
│   ├── MyButton.xaml         ← ControlTemplate for MyButton
│   ├── MyTextBox.xaml        ← ControlTemplate for MyTextBox
│   └── MySlider.xaml         ← ControlTemplate for MySlider
├── MyButton.cs
├── MyTextBox.cs
└── MySlider.cs

Resource Definition Order

Within any single XAML file, define resources in this order:

  1. x:Key named resources (colors, brushes, geometry, converters)
  2. Style definitions (which reference the above by StaticResource)
<ResourceDictionary ...>

    <!-- 1. Named resources first -->
    <Color x:Key="PrimaryColor">#FF2196F3</Color>
    <SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource PrimaryColor}" />

    <!-- 2. Styles second -->
    <Style TargetType="{x:Type local:MyButton}">
        <Setter Property="Background" Value="{StaticResource PrimaryBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:MyButton}">
                    ...
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 103 lines · 33 tokens per session scan A c4b82d599355

Subscribe to this mod's changes

wpf-rule-resourcedictionary-patterns is a skill published in the GitHub repository christian289/dotnet-with-claudecode (41 stars, last pushed 2mo ago), licensed MIT. It adds 33 tokens to every session and 724 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

mapsui

Use when embedding interactive 2D maps in .NET desktop (WinForms/WPF) or mobile (MAUI) applications — tile layers, vector features, map controls. Mapsui: cross-platform .NET map component library.

znlgis/opengis-skills · 49 tokens

generate-code-cs

Generate the code from typespec for C#. Parameter: C# SDK repository root location .

Azure/azure-sdk-for-net · 26 tokens

author-test

Generate a test given sample. Parameters: C# SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; the sample to use as a starting point for the test.

Azure/azure-sdk-for-net · 68 tokens

opentelemetry-net-instrumentation

Provides guidance for implementing OpenTelemetry instrumentation in .NET codebases, covering tracing (Activities/Spans), metrics, logs, naming conventions, error handling, performance, SDK setup, resources, context propagation, and API design best practices.

Aaronontheweb/dotnet-skills · 56 tokens

migrate-xunit-to-mstest

Convert .NET tests from xUnit.net v2/v3 to MSTest v4 while preserving VSTest or MTP. Use for replacing xunit packages, Fact/Theory/InlineData/MemberData, assertions, IClassFixture/ICollectionFixture, ITestOutputHelper, TestContext cancellation, traits/Owner, skips, timeouts, and xUnit parallelization. Also use when a…

managedcode/dotnet-skills · 141 tokens

migrate-xunit-to-xunit-v3

Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…

managedcode/dotnet-skills · 149 tokens