wpf-rule-mvvm-constraints

wpf-rule-mvvm-constraints is a skill for Claude Code from christian289/dotnet-with-claudecode. It costs 50 tokens per session (456 once invoked), scanned A, original, MIT.

A set of rules for keeping WPF ViewModels independent from Windows UI libraries. MVVM is a design pattern that separates interface code from application state and behavior.

In plain words
What is it for?
Use it when reviewing or implementing ViewModels, their project references, imports, properties, and constructor parameters.
Why use it?
It prevents UI-specific dependencies from leaking into the ViewModel layer, making that code easier to separate and maintain.

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 reviewing or implementing ViewModels, their project references, imports, properties, and constructor parameters.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/christian289/dotnet-with-claudecode/wpf-rule-mvvm-constraints"><img src="https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/wpf-rule-mvvm-constraints.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 456 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.
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.00050 $0.00456
Opus 5.5 $0.00020 $0.00182
Sonnet 5.5 $0.00010 $0.00091
Haiku 4.5 $0.00005 $0.00046

Measured 1mo ago against content hash 2e280af409df, 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-mvvm-constraints 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-mvvm-constraints/SKILL.md · 75 lines

What it actually says

MVVM Constraints

Rules for enforcing strict MVVM layer separation in wpf-dev-pack projects.


Prohibited DLL References in ViewModel Projects

ViewModel projects must NOT reference these assemblies:

  • WindowsBase.dll
  • PresentationFramework.dll
  • PresentationCore.dll

If any of these appear in a .csproj targeting the ViewModel layer, remove them immediately.


Prohibited Using Statements

The following namespaces must never appear in ViewModel code:

// Prohibited in ViewModel projects
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Input;   // except ICommand — use CommunityToolkit.Mvvm instead

Allowed Using Statements

These namespaces are safe for ViewModels:

// Allowed
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;

ViewModel Type Restrictions

ViewModel properties and constructor parameters must use BCL types only:

  • string, int, double, bool, decimal, DateTime, Guid
  • ObservableCollection<T>, List<T>, IEnumerable<T>
  • Other ViewModels or domain model types

Do NOT expose WPF types (Brush, Visibility, ImageSource, Thickness, etc.) as ViewModel properties. Convert in the View layer using converters or triggers.


CommunityToolkit.Mvvm

Prefer CommunityToolkit.Mvvm for all ViewModel base classes and commands:

  • Inherit from ObservableObject or ObservableRecipient
  • Use [ObservableProperty] for bindable properties (source-generated)
  • Use [RelayCommand] for commands (source-generated)
  • Never hand-roll INotifyPropertyChanged or ICommand implementations
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 · 75 lines · 50 tokens per session scan A 2e280af409df

Subscribe to this mod's changes

wpf-rule-mvvm-constraints is a skill published in the GitHub repository christian289/dotnet-with-claudecode (41 stars, last pushed 2mo ago), licensed MIT. It adds 50 tokens to every session and 456 once invoked, about $0.0002 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

code-analysis

Use the free built-in .NET SDK analyzers and analysis levels with gradual Roslyn warning promotion. USE FOR: the repo wants first-party .NET analyzers; CI should fail on analyzer warnings; the team needs AnalysisLevel or AnalysisMode guidance. DO NOT USE FOR: third-party analyzer selection by itself; formatting-only…

managedcode/dotnet-skills · 99 tokens

graphify-dotnet

Use graphify-dotnet to generate codebase knowledge graphs, architecture snapshots, and exportable repository maps from .NET or polyglot source trees, with optional AI-enriched semantic relationships. USE FOR: graphify commands; graph JSON, HTML, SVG, Cypher, Markdown, and Obsidian exports; repository map and…

managedcode/dotnet-skills · 125 tokens

sonarjs

Use SonarJS-derived rules in .NET repositories that ship JavaScript or TypeScript frontends and need deeper bug-risk, code-smell, or cognitive-complexity checks than a minimal ESLint baseline. USE FOR: SonarQube, SonarCloud, or eslint-plugin-sonarjs setups; frontend code smells; cognitive complexity and deeper…

managedcode/dotnet-skills · 132 tokens

address-review

Read PR review comments from GitHub, evaluate, address, and reply.

fpindej/netrock · 14 tokens

resharper-clt

Use the free official JetBrains ReSharper Command Line Tools for .NET repositories. USE FOR: jb inspectcode; jb cleanupcode; stronger C# inspections, cleanup profiles, and CI-friendly JetBrains analysis. DO NOT USE FOR: replacing tests with inspection output; ad-hoc formatting-only work when the repo intentionally…

managedcode/dotnet-skills · 107 tokens

meziantou-analyzer

Use the open-source free Meziantou.Analyzer package for design, usage, security, performance, and style rules in .NET. Use when a repo wants broader analyzer coverage with a single NuGet package. USE FOR: the repo uses or wants Meziantou.Analyzer; the team wants one analyzer pack that covers design, usage, security…

managedcode/dotnet-skills · 140 tokens