# wpf-best-practices

This skill guides C# and .NET WPF work, from project layout to MVVM patterns. Use it when building a desktop UI with XAML.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 584 installs · ★ 6
- Author: jcurbelo
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/jcurbelo/skills/tree/HEAD/wpf-best-practices/SKILL.md
- Updated: 2026-02-27
- HTML: https://affpapa.org/en/nevibecode/skills/wpf-best-practices

## What it does

The skill gives an AI agent coding conventions and a suggested layout for WPF projects. It covers naming, explicit types, nullable reference types and file-scoped namespaces, then separates app code into views, models, ViewModels and services.

For MVVM, it describes a shared ViewModelBase that raises property-change notifications, along with RelayCommand implementations for XAML bindings. Project examples include `.csproj` settings for a WPF app and a shared library. These are coding guidelines, not a ready-made application.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add jcurbelo/skills --skill wpf-best-practices -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/wpf-best-practices/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/wpf-best-practices/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add jcurbelo/skills --skill wpf-best-practices -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/wpf-best-practices/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add jcurbelo/skills --skill wpf-best-practices -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/wpf-best-practices/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install jcurbelo/skills wpf-best-practices
```

2. **Manually: put the files in place**
- File: `.github/skills/wpf-best-practices/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add jcurbelo/skills --skill wpf-best-practices -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/jcurbelo/skills --path wpf-best-practices
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/wpf-best-practices/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add jcurbelo/skills --skill wpf-best-practices -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/jcurbelo/skills/tree/HEAD/wpf-best-practices/SKILL.md

## When to use it
- organize files in a WPF project
- separate presentation logic into ViewModels
- bind UI actions to XAML commands
- configure nullable reference types in a C# project

## Example prompts
- Create a settings-window ViewModel using this skill's guidance.
- Review my WPF project layout and suggest how to split its services and ViewModels.
- Add a RelayCommand for this XAML button and explain how the ViewModel connects to it.

## Similar
- [dotnet-wpf-modern](https://affpapa.org/en/nevibecode/skills/dotnet-wpf-modern.md) — skill · 301 installs
- [dotnet-wpf](https://affpapa.org/en/nevibecode/rules/dotnet-wpf.md) — rule · ★ 40451
- [mvvm-toolkit-di](https://affpapa.org/en/nevibecode/skills/mvvm-toolkit-di.md) — skill · 92 installs
- [wpf-dev-pack-mcp](https://affpapa.org/en/nevibecode/mcp/wpf-dev-pack-mcp.md) — MCP server · ★ 41
- [wpf-visual-tree](https://affpapa.org/en/nevibecode/mcp/wpf-visual-tree.md) — MCP server · ★ 20
- [maui-data-binding](https://affpapa.org/en/nevibecode/skills/maui-data-binding.md) — skill · 3200 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
