maui: Instructions file for GitHub Copilot

.github/instructions/resizetizer.instructions.md

maui resizetizer.instructions.md is an instructions file for GitHub Copilot from dotnet/maui. It costs 4,795 tokens per session, scanned C, original, MIT.

A set of instructions for .NET MAUI's Resizetizer build system, which turns images, fonts, splash screens, and other assets into platform-specific app resources. It also explains how its MSBuild files are loaded and tested.

In plain words
What is it for?
Use it when working on Resizetizer MSBuild targets, asset properties, file-loading order, or local build tests in the .NET MAUI repository.
Why use it?
It gives the agent repository-specific context before changing build targets, reducing the risk of breaking asset processing or incremental builds.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is dotnet/maui's own configuration. It tells GitHub Copilot how to work on maui itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything maui configures →

About the project

.NET MAUI is a C# and XAML framework for building native mobile and desktop applications from one shared codebase. Developers use it to create apps for Android, iOS, iPadOS, macOS, and Windows. The catalogue entries provide skills, instructions, and agents for working with .NET MAUI.

dotnet/maui · 23,322 stars · on GitHub · dot.net

Reuse

Borrowing it

Nothing to install: this file belongs to dotnet/maui. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dotnet/maui/main/.github/instructions/resizetizer.instructions.md
Clone the repo
git clone --depth 1 https://github.com/dotnet/maui

Made for: GitHub Copilot.

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 maui resizetizer.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dotnet/maui/resizetizer/github.svg)](https://agentmods.dev/instructions/dotnet/maui/resizetizer)
Your own site
<a href="https://agentmods.dev/instructions/dotnet/maui/resizetizer"><img src="https://agentmods.dev/badge/instructions/dotnet/maui/resizetizer/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 maui resizetizer.instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dotnet/maui/resizetizer"><img src="https://agentmods.dev/badge/instructions/dotnet/maui/resizetizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,795 This file is loaded in full into every session.
When invoked 4,795 The same file — it is already loaded in full.
Security scan C 1 finding. 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.04795 $0.04795
Opus 5.5 $0.01918 $0.01918
Sonnet 5.5 $0.00959 $0.00959
Haiku 4.5 $0.00479 $0.00479

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

Security

Grade C, and why

maui resizetizer.instructions.md scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf artifacts/obj/Maui.Controls.Sample.Sandbox/Release/net10.0-android/
.github/instructions/resizetizer.instructions.md · 331 lines

How it starts

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

Resizetizer MSBuild Targets Guidelines

Guidance for working with .NET MAUI's Resizetizer build system, which processes images, fonts, splash screens, and assets at build time.

See also: .NET for Android's MSBuild Best Practices is the canonical guide for MSBuild target authoring. Its Incremental Builds, Stamp Files, FileWrites and IncrementalClean, When to not use Inputs and Outputs?, and Should I use BeforeTargets or AfterTargets? sections directly inform the patterns documented below.

Architecture Overview

The Resizetizer is an MSBuild-integrated pipeline that processes MauiImage, MauiFont, MauiSplashScreen, and MauiAsset items into platform-specific resources during the build. All core logic lives in a single file:

src/SingleProject/Resizetizer/src/nuget/buildTransitive/Microsoft.Maui.Resizetizer.After.targets

File Loading Order

These files are auto-imported by the NuGet package (<PackageId>.props / <PackageId>.targets), which then pulls in the named hook files:

File Loaded Purpose
Microsoft.Maui.Resizetizer.props auto (package) Early property defaults — currently empty (<Project />)
Microsoft.Maui.Resizetizer.targets auto (package) SDK registration: sets UsingMicrosoftMauiResizetizerSdk, imports Before.targets, and appends After.targets to AfterMicrosoftNETSdkTargets
Microsoft.Maui.Resizetizer.Before.targets imported by .targets Pre-SDK target hooks — currently empty (<Project />)
Microsoft.Maui.Resizetizer.After.targets via AfterMicrosoftNETSdkTargets All logic — targets, item registration, platform dispatch

Microsoft.Maui.Resizetizer.targets appends After.targets to AfterMicrosoftNETSdkTargets, ensuring the logic runs after the .NET SDK targets are loaded.

Local Testing with .buildtasks/

The .buildtasks/ directory at the repo root contains a local copy of the Resizetizer targets used by Sandbox and sample builds. It is NOT git-tracked. When testing MSBuild target changes locally:

Read the full file on GitHub · 331 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 · 331 lines · 4,795 tokens per session scan C 088011d8449b

Subscribe to this mod's changes

maui resizetizer.instructions.md is an instructions file published in the GitHub repository dotnet/maui (23,322 stars, last pushed today), licensed MIT. It adds 4,795 tokens to every session, about $0.0192 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-12.