wpf-rule-converter-patterns

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

A set of coding rules for WPF value converters, which turn one value into another for display in XAML-based interfaces.

In plain words
What is it for?
Use it when implementing converters that format, transform, or map data for WPF controls.
Why use it?
It provides a consistent pattern for reusable converters, including handling missing or unavailable values.

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 implementing converters that format, transform, or map data for WPF controls.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/christian289/dotnet-with-claudecode/wpf-rule-converter-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-converter-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-converter-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/wpf-rule-converter-patterns/github.svg)](https://agentmods.dev/skills/christian289/dotnet-with-claudecode/wpf-rule-converter-patterns)
Your own site
<a href="https://agentmods.dev/skills/christian289/dotnet-with-claudecode/wpf-rule-converter-patterns"><img src="https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/wpf-rule-converter-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-converter-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/christian289/dotnet-with-claudecode/wpf-rule-converter-patterns"><img src="https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/wpf-rule-converter-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 909 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 99
    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.00032 $0.00909
Opus 5.5 $0.00013 $0.00364
Sonnet 5.5 $0.00006 $0.00182
Haiku 4.5 $0.00003 $0.00091

Measured 2mo ago against content hash 5b8f22de2e78, 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-converter-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 2mo 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-converter-patterns/SKILL.md · 118 lines

How it starts

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

Converter Patterns

Standards for implementing IValueConverter in wpf-dev-pack projects.


MarkupExtension Singleton Pattern

Every converter is a MarkupExtension so it can be used directly in XAML without declaring a resource, and ProvideValue returns a single shared instance (converters are stateless, so a shared instance is safe and avoids ResourceDictionary clutter). This is the canonical converter pattern, matching the /wpf-dev-pack:make-wpf-converter scaffolder and the using-converter-markup-extension knowledge topic. Pick this one pattern — do NOT also expose a separate static Instance property.

Derive from a small base class (the scaffolder generates it once per project):

namespace MyApp.Converters;

public abstract class ConverterMarkupExtension<T> : MarkupExtension, IValueConverter
    where T : class, new()
{
    private static readonly Lazy<T> _converter = new(() => new T());

    public override object ProvideValue(IServiceProvider serviceProvider) => _converter.Value;

    public abstract object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture);

    public virtual object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
        => throw new NotSupportedException("ConvertBack is not supported.");
}

public sealed class BoolToVisibilityConverter : ConverterMarkupExtension<BoolToVisibilityConverter>
{
    public override object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        if (value is null || value == DependencyProperty.UnsetValue)
            return Visibility.Collapsed;

        var invert = parameter is "Invert" or "invert";
        return (value is bool b && (b ^ invert)) ? Visibility.Visible : Visibility.Collapsed;
    }
}

Usage in XAML (no ResourceDictionary entry required):

<TextBlock Visibility="{Binding IsActive,
               Converter={converters:BoolToVisibilityConverter}}" />

Read the full file on GitHub · 118 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. 2mo ago First seen · 118 lines · 32 tokens per session scan A 5b8f22de2e78

Subscribe to this mod's changes

wpf-rule-converter-patterns is a skill published in the GitHub repository christian289/dotnet-with-claudecode (42 stars, last pushed 4mo ago), licensed MIT. It adds 32 tokens to every session and 909 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

wpf-rule-converter-patterns compared with skills from other repositories

wpf-rule-converter-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
wpf-rule-converter-patternschristian289/dotnet-with-claudecodeSkill424mo agoMITA32Claude Code
fluence-consumer-startersintaxasn/Fluence.WpfSkill15todayBSD-3-ClauseA39Claude Code, Codex
add-adrSSWConsulting/SSW.VerticalSliceArchitectureSkill4183d agoMITA83Claude Code
grpcmanagedcode/dotnet-skillsSkill52717d agoMITA95Claude Code, Codex
winformsmanagedcode/dotnet-skillsSkill52717d agoMITA122Claude Code, Codex
frontend-conventionsfpindej/netrockSkill23615d agoMITA27Claude Code
address-reviewfpindej/netrockSkill23615d agoMITA14Claude Code