formatting-wpf-csharp-code

formatting-wpf-csharp-code is a skill for Claude Code from christian289/dotnet-with-claudecode. It costs 41 tokens per session (845 once invoked), scanned A, original, MIT.

A formatting tool for WPF XAML, the markup used to describe Windows app interfaces, and C# code. It applies shared style rules and creates the needed configuration files.

In plain words
What is it for?
Use it to format all XAML and C# files in a WPF workspace and set rules such as indentation, line endings, and maximum line length.
Why use it?
It removes manual style cleanup and keeps interface markup and C# files consistent across a project.

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 to format all XAML and C# files in a WPF workspace and set rules such as indentation, line endings, and maximum line length.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/christian289/dotnet-with-claudecode/formatting-wpf-csharp-code"><img src="https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/formatting-wpf-csharp-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 845 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 pass 7 Sept 2026
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.00041 $0.00845
Opus 5.5 $0.00016 $0.00338
Sonnet 5.5 $0.00008 $0.00169
Haiku 4.5 $0.00004 $0.00085

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

Security

Grade A, and why

formatting-wpf-csharp-code 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/formatting-wpf-csharp-code/SKILL.md · 133 lines

How it starts

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

WPF and C# Code Formatting

Applies consistent code style to XAML and C# files.


1. Required Tools

.NET 10 SDK

All commands use dotnet dnx for cross-platform compatibility (Windows, Linux, macOS).

# Verify .NET 10 is available
dotnet --version  # Should be 10.0.x or higher

XamlStyler (XAML Formatting)

Run via dotnet dnx (dotnet tool runner). No manual installation required.

dotnet format (C# Formatting)

Included with .NET SDK by default.


2. Configuration Files

Settings.XamlStyler

Copy from template to workspace root if Settings.XamlStyler doesn't exist.

Template location: templates/Settings.XamlStyler

Key settings:

  • AttributesTolerance: 1 - Allow up to 1 attribute on same line
  • KeepFirstAttributeOnSameLine: true - Keep first attribute on element line

.editorconfig

Copy from template to workspace root if .editorconfig doesn't exist.

Template location: templates/.editorconfig

Key settings:

  • Indentation: 4 spaces
  • Line ending: CRLF (Windows)
  • Max line length: 120

3. Formatting Commands

XAML Formatting

# Format all XAML files in workspace
dotnet dnx -y XamlStyler.Console -- -d "{workspace}" -r -c "{workspace}/Settings.XamlStyler"

# Format single file
dotnet dnx -y XamlStyler.Console -- -f "{file.xaml}" -c "{workspace}/Settings.XamlStyler"

dotnet dnx Options:

  • -y: Auto-accept confirmation prompt
  • --: Separator between dnx options and tool arguments

XamlStyler Options:

  • -d: Target directory
  • -f: Target file
  • -r: Recursive processing
  • -c: Configuration file path

C# Formatting

# Format entire solution
dotnet format "{solution.sln}" --no-restore

# Format specific project only
dotnet format "{project.csproj}" --no-restore

# Format single file
dotnet format "{project.csproj}" --include "{file.cs}" --no-restore

Options:

  • --no-restore: Skip NuGet restore (faster)
  • --include: Target specific file

Read the full file on GitHub · 133 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 133 lines · 41 tokens per session scan A fbbaf9792d53

Subscribe to this mod's changes

formatting-wpf-csharp-code is a skill published in the GitHub repository christian289/dotnet-with-claudecode (41 stars, last pushed 2mo ago), licensed MIT. It adds 41 tokens to every session and 845 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

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