Agent skill

Avalonia

by managedcode in managedcode/dotnet-skills

Build and debug Avalonia 11/12 .NET applications with XAML, compiled bindings, MVVM, custom controls, desktop lifetimes, and platform publishing.

MITAuto-check passedMobile

Install Avalonia

skills CLI
$ npx skills add managedcode/dotnet-skills --skill avalonia -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install managedcode/dotnet-skills avalonia --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/managedcode/dotnet-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/catalog/Frameworks/Avalonia/skills/avalonia .claude/skills/avalonia && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
avalonia
GitHub stars
485
Token cost
~1.9k tokens
SKILL.md length
565 words
Files
5 (incl. references)
Skills in repo
81
Repo updated
First seen
Licence
MIT

At a glance

Build and debug Avalonia 11/12 .NET applications with XAML, compiled bindings, MVVM, custom controls, desktop lifetimes, and platform publishing.

  • Works in 6 steps: Inspect the SDK, target frameworks,… → Keep Program.BuildAvaloniaApp,… → Use typed compiled bindings and explicit… → …
  • : Avalonia projects
  • SKILL.md covers Workflow, Install, Read: typed view-model bindings and Write: a styleable…, plus 2 more sections
  • Calls dotnet; reaches github.com and schemas.microsoft.com

What it does

Avalonia is an agent skill from managedcode/dotnet-skills. Build and debug Avalonia 11/12 .NET applications with XAML, compiled bindings, MVVM, custom controls, desktop lifetimes, and platform publishing. USE FOR: Avalonia projects, bindings, commands, themes, UI dispatch, trimming, or Native AOT. DO NOT USE FOR: WPF, WinUI, MAUI, Uno, or Avalonia XPF compatibility work. INVOKES: inspect installed versions, implement, and validate on the actual target platforms.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `manifest.json`, `references/bindings-and-controls.md` and `references/official-docs-index.md`). Compatibility notes: Requires a .NET SDK and Avalonia packages; desktop runtime validation requires the target OS and display environment.

It sits in Mobile, covering Cross-platform mobile apps. It works with Avalonia, .NET and Windows. The repository describes itself as: Installable .NET skill catalog and CLI for Codex, Claude Code, GitHub Copilot, and Gemini. The licence is MIT.

When your agent uses it

  • : Avalonia projects
  • Avalonia XPF compatibility work

Example prompts

  • “/avalonia”

Requirements

  • Compatibility (from SKILL.md): Requires a .NET SDK and Avalonia packages; desktop runtime validation requires the target OS and display environment.

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Inspect the SDK, target frameworks, Avalonia package versions, .axaml files, entrypoint, and supported OS/RIDs. Keep Avalonia packages on…
  2. Keep Program.BuildAvaloniaApp, App.axaml, views, view models, and domain/services separate. Desktop hosts use…
  3. Use typed compiled bindings and explicit binding modes. x:DataType describes the binding type; it does not set the runtime DataContext…
  4. Use CommunityToolkit.Mvvm for observable state and commands when appropriate. Prefer cancellable asynchronous service operations, surface…
  5. Choose StyledProperty for styleable/animatable values and DirectProperty for backed state without style precedence. Use DataTemplate to…
  6. Validate native integrations, dialogs, resources, shutdown, DPI, accessibility, and packaging on each supported platform. Read…

What it can do on your machine

Read from SKILL.md and the folder at commit 2a5b41a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • schemas.microsoft.com

    Also links to:

    • docs.avaloniaui.net
    • v11.docs.avaloniaui.net

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires a .NET SDK and Avalonia packages; desktop runtime validation requires the target OS and display environment.

    From compatibility in the SKILL.md frontmatter.

Context cost

Avalonia loads about 1.9k tokens when it runs, and up to ~5.5k if it reads all its reference files. Until then it costs about 104 tokens; SKILL.md has 565 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~104
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from managedcode/dotnet-skills at commit 2a5b41a, republished under its MIT licence (© managedcode). 565 words, ~1,858 tokens.

Download SKILL.mdSave it as .claude/skills/avalonia/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
avalonia
description
Build and debug Avalonia 11/12 .NET applications with XAML, compiled bindings, MVVM, custom controls, desktop lifetimes, and platform publishing. USE FOR: Avalonia projects, bindings, commands, themes, UI dispatch, trimming, or Native AOT. DO NOT USE FOR: WPF, WinUI, MAUI, Uno, or Avalonia XPF compatibility work. INVOKES: inspect installed versions, implement, and validate on the actual target platforms.
compatibility
Requires a .NET SDK and Avalonia packages; desktop runtime validation requires the target OS and display environment.

Avalonia

Workflow

  1. Inspect the SDK, target frameworks, Avalonia package versions, .axaml files, entrypoint, and supported OS/RIDs. Keep Avalonia packages on one compatible version. Use the Avalonia 12 docs for 12 and the Avalonia 11 docs for 11; do not copy 12-only APIs into 11.
  2. Keep Program.BuildAvaloniaApp, App.axaml, views, view models, and domain/services separate. Desktop hosts use StartWithClassicDesktopLifetime and create MainWindow in OnFrameworkInitializationCompleted; single-view targets require their own lifetime. The previewer can have no application lifetime.
  3. Use typed compiled bindings and explicit binding modes. x:DataType describes the binding type; it does not set the runtime DataContext. Avalonia 12 enables compiled bindings by default; explicitly enable them on 11. Read references/bindings-and-controls.md for templates, properties, resources, and command patterns.
  4. Use CommunityToolkit.Mvvm for observable state and commands when appropriate. Prefer cancellable asynchronous service operations, surface errors, and marshal background updates to the UI dispatcher. Keep services independent of controls.
  5. Choose StyledProperty for styleable/animatable values and DirectProperty for backed state without style precedence. Use DataTemplate to display data and ControlTemplate/ControlTheme to change a control's visual structure. Use UserControl for application composition, TemplatedControl for reusable skinnable controls, and custom rendering only when needed.
  6. Validate native integrations, dialogs, resources, shutdown, DPI, accessibility, and packaging on each supported platform. Read references/platforms-and-publishing.md before trimming or Native AOT. Read the documentation map only for the selected topic.
mermaid
flowchart LR
  Packages[Installed Avalonia major] --> Docs[Matching 11 or 12 documentation]
  Docs --> VM[View model and service]
  VM --> Bindings[Typed bindings and commands]
  Bindings --> UI[Views, templates, property system]
  UI --> Desktop[Desktop lifetime and UI dispatcher]
  Desktop --> Verify[Headless tests + native OS checks]
  Verify --> Publish[RID-specific publish and packaging]

Install

For a new application, use the official templates rather than inventing project scaffolding:

bash
dotnet new install Avalonia.Templates
dotnet new avalonia.mvvm -o MyApp
dotnet add MyApp/MyApp.csproj package CommunityToolkit.Mvvm
dotnet run --project MyApp/MyApp.csproj

For an existing project, select versions matching its target framework and installed Avalonia major:

bash
dotnet add MyApp.csproj package Avalonia.Desktop --version <compatible-version>
dotnet add MyApp.csproj package Avalonia.Themes.Fluent --version <compatible-version>

Read: typed view-model bindings

The view model implements notifications through the toolkit. Wire the runtime context when constructing the view:

csharp
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;

public partial class MainViewModel : ObservableObject
{
    [ObservableProperty]
    private string name = "Ada";

    [ObservableProperty]
    private string greeting = "Ready";

    [RelayCommand]
    private void Greet() => Greeting = $"Hello, {Name}";
}

// In App.OnFrameworkInitializationCompleted, after checking desktop lifetime:
// desktop.MainWindow = new MainWindow { DataContext = new MainViewModel() };

In the view, replace MyApp.ViewModels with the actual namespace:

xml
<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="using:MyApp.ViewModels"
        x:Class="MyApp.MainWindow"
        x:DataType="vm:MainViewModel" x:CompileBindings="True">
  <StackPanel Spacing="8" Margin="16">
    <TextBox Text="{Binding Name, Mode=TwoWay}" />
    <Button Content="Greet" Command="{Binding GreetCommand}" />
    <TextBlock Text="{Binding Greeting}" />
  </StackPanel>
</Window>

Write: a styleable custom-control property

csharp
using Avalonia;
using Avalonia.Controls.Primitives;

public class StatusBadge : TemplatedControl
{
    public static readonly StyledProperty<string> TextProperty =
        AvaloniaProperty.Register<StatusBadge, string>(nameof(Text), "Ready");

    public string Text
    {
        get => GetValue(TextProperty);
        set => SetValue(TextProperty, value);
    }
}

Define the visual tree in a control theme; keep CLR accessors limited to GetValue/SetValue, because styles and bindings can bypass them. Use property-change hooks for behavior and SetCurrentValue when changing a value without replacing its existing binding.

Show full SKILL.md (243 more words)Show less

Options and constraints

  • Set <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault> explicitly for consistent 11/12 behavior. Use ReflectionBinding only for a justified dynamic path; review trimming risk.
  • Use Dispatcher.UIThread.InvokeAsync when completion matters, Post for a queued notification, and CheckAccess when deciding whether to marshal. Update bound collections on the UI thread; avoid .Result/.Wait() there.
  • Choose an intentional ShutdownMode and owner for ShowDialog<T>(owner). Inject a dialog service into view models instead of constructing windows there.
  • Fluent themes, selectors, pseudoclasses, theme variants, and avares:// resources differ from WPF. Do not transplant WPF styles or assume platform behavior is identical.
  • Avalonia 12 changes binding APIs, clipboard, window decorations, and diagnostics packages. Review the major-version migration guide before upgrading.
  • A successful build or headless test does not prove native rendering, packaging, accessibility, or AOT compatibility.

Deliver and validate

  • State the installed major, chosen lifetime, supported OS/RIDs, and matching docs.
  • Run dotnet build <solution> -c Release and the repository's focused tests; verify that typed binding paths compile and commands update observable state.
  • Use Avalonia.Headless.XUnit or Avalonia.Headless.NUnit for dispatcher-aware control tests. Keep unrelated tests parallel; constrain only a concrete destructive collision domain.
  • Launch on each promised OS and check resizing, scaling, keyboard navigation, dialogs, resources, and shutdown.
  • Publish for each RID and launch the actual output. Fix trim/AOT warnings and test native dependencies rather than suppressing them.
  • Keep test output to warnings/errors plus one concise result, preserve native progress/ANSI and exit codes, and cap diagnostics at 80 lines / 8 KiB with bounded artifacts outside context.

© managedcode, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in catalog/Frameworks/Avalonia/skills/avalonia of managedcode/dotnet-skills.

  • SKILL.md
  • manifest.json
  • references/bindings-and-controls.md
  • references/official-docs-index.md
  • references/platforms-and-publishing.md

Open the folder on GitHubat commit 2a5b41a

Compare with similar skills

Avalonia next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Avalonia compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Avalonia this skillmanagedcode/dotnet-skills485—~1.9kAutomated safety check: PassMIT
Mvvm Toolkit Digithub/awesome-copilot40k1 repos~2.3kAutomated safety check: PassMIT
Mvvm Toolkitgithub/awesome-copilot40k1 repos~2.7kAutomated safety check: PassMIT
QA TesterJocysCom/FocusLogger213—~12kAutomated safety check: PassGPL-3.0
.NET MAUI Dependency Flow Guidedotnet/maui23k—~10kAutomated safety check: PassMIT
Run Maui Apptig/winprint101—~1.2kAutomated safety check: PassMIT

Similar skills

  • Mvvm Toolkit Di

    github/awesome-copilot

    Official

    Wire CommunityToolkit.Mvvm ViewModels into Microsoft.Extensions.DependencyInjection.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    MobileAuto-check passed
  • Mvvm Toolkit

    github/awesome-copilot

    Official

    CommunityToolkit.Mvvm (the MVVM Toolkit) core: source generators ([ObservableProperty], [RelayCommand], [NotifyPropertyChangedFor], [NotifyCanExecuteChangedFor], [NotifyDataErrorInfo]), base classes…

    40k GitHub starsUsed in 1 repo~2.7k tokens
    Backend & APIsAuto-check passed
  • QA Tester

    JocysCom/FocusLogger

    Create and maintain automated tests in Microsoft-native/.NET projects with a minimal stack — MSTest runner, System.Windows.Automation for Windows desktop, Playwright for real browser smoke.

    213 GitHub stars~12k tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Official

    Adds MAUI-specific guardrails on top of the maestro-cli skill and Maestro MCP tools for darc, BAR, and channel or feed lookups in dotnet/maui.

    23k GitHub stars~10k tokensUpdated yesterday
    MobileAuto-check passed
  • Run Maui App

    tig/winprint

    Build, launch, screenshot, and drive the WinPrint.Maui Windows app (winprint.exe) — including UIA automation of the File button and native Open dialog, and pixel capture that works for WinUI3 content.

    101 GitHub stars~1.2k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Maui AI Debugging

    Redth/Maui.Gtk

    End-to-end workflow for building, deploying, inspecting, and debugging .NET MAUI and MAUI Blazor Hybrid apps as an AI agent.

    101 GitHub stars~4.1k tokensUpdated 5 mo ago
    MobileAuto-check passed

More from managedcode/dotnet-skills

All 82 skills in this repo
  • Analyzer Config

    managedcode/dotnet-skills

    Use a repo-root .editorconfig to configure free .NET analyzer and style rules.

    485 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Archunitnet

    managedcode/dotnet-skills

    Use the open-source free ArchUnitNET library for architecture rules in .NET tests.

    485 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Aspire

    managedcode/dotnet-skills

    Build, upgrade, and operate Aspire 13.5.x C or TypeScript application hosts with the current CLI, AppHost, ServiceDefaults, integrations, dashboard, testing, MCP, and deployment patterns for…

    485 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Aspnet Core

    managedcode/dotnet-skills

    Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET.

    485 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Asynkron Profiler

    managedcode/dotnet-skills

    Use the open-source free Asynkron.Profiler dotnet tool for CLI-first CPU, allocation, exception, contention, and heap profiling of .NET commands or existing trace artifacts.

    485 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Blazor

    managedcode/dotnet-skills

    Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design, state flow, rendering, and hosting choices.

    486 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Avalonia

What does Avalonia do?

Build and debug Avalonia 11/12 .NET applications with XAML, compiled bindings, MVVM, custom controls, desktop lifetimes, and platform publishing. Avalonia is an agent skill from managedcode/dotnet-skills.NET applications with XAML, compiled bindings, MVVM, custom controls, desktop lifetimes, and platform publishing.

When should I use Avalonia?

Avalonia fits situations like: : Avalonia projects; avalonia XPF compatibility work.

How do I install Avalonia in Claude Code?

Run `npx skills add managedcode/dotnet-skills --skill avalonia -a claude-code`. Or copy the skill folder (catalog/Frameworks/Avalonia/skills/avalonia in managedcode/dotnet-skills) into .claude/skills/avalonia in your project. Claude Code loads it when a task matches its description.

How do I install Avalonia in Codex?

Run `npx skills add managedcode/dotnet-skills --skill avalonia -a codex`. Or copy the skill folder (catalog/Frameworks/Avalonia/skills/avalonia in managedcode/dotnet-skills) into .agents/skills/avalonia in your project. Codex loads it when a task matches its description.

Can I use Avalonia in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add managedcode/dotnet-skills --skill avalonia -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/avalonia, .gemini/skills/avalonia, .github/skills/avalonia and .opencode/skills/avalonia in your project.

What does Avalonia need to run?

Going by SKILL.md and its folder, Avalonia needs the command-line tools its instructions call (dotnet). Compatibility (from SKILL.md): Requires a .NET SDK and Avalonia packages; desktop runtime validation requires the target OS and display environment..

Does Avalonia access the network?

SKILL.md names 4 domains. In commands or code: github.com and schemas.microsoft.com; the agent is likely to contact these when it follows the instructions. As links in the text: docs.avaloniaui.net and v11.docs.avaloniaui.net. This is read from the text; nothing was executed.

Is Avalonia safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Avalonia use?

Avalonia is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Avalonia use?

About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.6k tokens, read only when the agent opens those files.

What are the alternatives to Avalonia?

Skills that share tags, products or a category with Avalonia: Mvvm Toolkit Di (github/awesome-copilot, 40k stars), Mvvm Toolkit (github/awesome-copilot, 40k stars), QA Tester (JocysCom/FocusLogger, 213 stars) and .NET MAUI Dependency Flow Guide (dotnet/maui, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Avalonia?

managedcode (a GitHub organization) maintains it in managedcode/dotnet-skills, which has 485 GitHub stars. The repository holds 81 skills in this directory. The repository was last updated on October 11, 2026.

Source: managedcode/dotnet-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.