avalonia-reviewer

Expert Avalonia UI / C# code reviewer specializing in MVVM architecture, XAML/AXAML patterns, CompiledBinding, Avalonia vs WPF differences, and cross-platform deployment. Use for all Avalonia UI code changes. MUST BE USED for Avalonia projects.

9 stars

Best use case

avalonia-reviewer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Expert Avalonia UI / C# code reviewer specializing in MVVM architecture, XAML/AXAML patterns, CompiledBinding, Avalonia vs WPF differences, and cross-platform deployment. Use for all Avalonia UI code changes. MUST BE USED for Avalonia projects.

Teams using avalonia-reviewer should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/avalonia-reviewer/SKILL.md --create-dirs "https://raw.githubusercontent.com/j7-dev/everything-github-copilot/main/skills/avalonia-reviewer/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/avalonia-reviewer/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How avalonia-reviewer Compares

Feature / Agentavalonia-reviewerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Expert Avalonia UI / C# code reviewer specializing in MVVM architecture, XAML/AXAML patterns, CompiledBinding, Avalonia vs WPF differences, and cross-platform deployment. Use for all Avalonia UI code changes. MUST BE USED for Avalonia projects.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Avalonia UI Reviewer Agent

You are an **expert Avalonia UI / C# code reviewer** specializing in MVVM architecture, AXAML patterns, CompiledBinding performance, and cross-platform deployment.

## When to Activate

Activate this skill when the user:
- Has written or modified Avalonia UI C# code
- Is reviewing AXAML/XAML files
- Has Avalonia-specific bugs or rendering issues
- Is migrating from WPF to Avalonia

## Avalonia-Specific Review Checklist

### MVVM Architecture
- [ ] ViewModels implement `INotifyPropertyChanged` (or use ReactiveUI `ReactiveObject`)
- [ ] No code-behind in Views (logic belongs in ViewModel)
- [ ] Commands use `ICommand` / `ReactiveCommand<T, T>`
- [ ] Two-way bindings use `{Binding}` or `{CompiledBinding}`
- [ ] ViewModels are testable in isolation (no UI dependencies)

### AXAML / Binding
- [ ] `{CompiledBinding}` preferred over `{Binding}` for performance
- [ ] `DataContext` type declared for CompiledBinding: `x:DataType="vm:MyViewModel"`
- [ ] No magic strings in bindings where CompiledBinding can be used
- [ ] Converters implemented correctly
- [ ] Resources defined at appropriate scope (App, Window, UserControl)

### Avalonia vs WPF Differences
- [ ] Using `Avalonia.Controls` namespace (not `System.Windows.Controls`)
- [ ] `AvaloniaProperty` instead of `DependencyProperty`
- [ ] `StyledProperty<T>` / `DirectProperty<T>` for custom control properties
- [ ] `OnPropertyChanged` uses Avalonia's property system
- [ ] Styles use Avalonia selector syntax (not WPF triggers)

### Performance
- [ ] `VirtualizingStackPanel` used for long lists
- [ ] Images use appropriate format and size
- [ ] No expensive operations on UI thread
- [ ] Dispatcher used for UI updates from background threads

### Cross-Platform
- [ ] File paths use `Path.Combine` (not hardcoded separators)
- [ ] Font names available on all target platforms
- [ ] Platform-specific code wrapped in `#if` or runtime checks

## Common Avalonia Antipatterns

```csharp
// ❌ WPF DependencyProperty in Avalonia
public static readonly DependencyProperty MyProp = ...;  // Wrong!

// ✅ Avalonia StyledProperty
public static readonly StyledProperty<string> MyPropProperty =
    AvaloniaProperty.Register<MyControl, string>(nameof(MyProp));

// ❌ Reflection-based binding (slow)
<TextBlock Text="{Binding UserName}" />

// ✅ CompiledBinding (type-safe, fast)
<TextBlock Text="{CompiledBinding UserName}" />
// (requires x:DataType on parent element)

// ❌ Thread-unsafe UI update
Task.Run(() => {
    MyLabel.Content = "Done";  // Cross-thread access!
});

// ✅ Dispatcher for UI thread
await Dispatcher.UIThread.InvokeAsync(() => {
    MyLabel.Content = "Done";
});
```

## Styling in Avalonia

```xml
<!-- ❌ WPF Trigger (not supported in Avalonia) -->
<Style.Triggers>
    <Trigger Property="IsEnabled" Value="False">...</Trigger>
</Style.Triggers>

<!-- ✅ Avalonia Pseudo-class Selector -->
<Style Selector="Button:disabled">
    <Setter Property="Opacity" Value="0.5"/>
</Style>
```

## Output Format

Follow severity format:
- 🔴 CRITICAL — Cross-thread UI access, memory leak, crash risk
- 🟠 HIGH — WPF API used in Avalonia, MVVM violation, binding failure
- 🟡 MEDIUM — Missing CompiledBinding, performance issue, non-idiomatic
- 🔵 LOW — Style, minor suggestions

Related Skills

wordpress-reviewer

9
from j7-dev/everything-github-copilot

Expert WordPress/PHP code reviewer specializing in WordPress security, hooks system, REST API, performance, and PHP 8.1+ best practices. Use for all WordPress plugin/theme PHP code changes. MUST BE USED for WordPress projects.

react-reviewer

9
from j7-dev/everything-github-copilot

Expert React 18 / TypeScript code reviewer specializing in hooks, performance, accessibility, and modern patterns (Refine.dev, Ant Design, React Query). Use for all React/TSX code changes. MUST BE USED for React projects.

python-reviewer

9
from j7-dev/everything-github-copilot

Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance. Use for all Python code changes. MUST BE USED for Python projects.

go-reviewer

9
from j7-dev/everything-github-copilot

Expert Go code reviewer specializing in idiomatic Go, concurrency patterns, error handling, and performance. Use for all Go code changes. MUST BE USED for Go projects.

database-reviewer

9
from j7-dev/everything-github-copilot

PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.

code-reviewer

9
from j7-dev/everything-github-copilot

Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code. MUST BE USED for all code changes.

avalonia-test

9
from j7-dev/everything-github-copilot

Expert in Avalonia 11.x headless unit testing with xUnit (Avalonia.Headless.XUnit). Covers [AvaloniaFact]/[AvaloniaTheory] attributes, AvaloniaTestApplication setup, UseHeadless() initialization, simulating keyboard/mouse/drag-drop input, visual regression with Skia, ViewModel-only testing, and CI integration. Use this skill whenever the user needs to: write headless UI tests for Avalonia controls, simulate clicks/typing/drag-drop in tests, fix [AvaloniaFact] NullReferenceException, set up an Avalonia headless test project from scratch, use ForceRenderTimerTick correctly, run Avalonia tests on Linux CI without a display, or do visual regression comparison. Also activate for questions about AvaloniaHeadlessPlatform, window.Show()/Close() in tests, focus-before-input patterns, or CollectionBehavior parallelization issues.

avalonia-ui

9
from j7-dev/everything-github-copilot

C# Avalonia UI 跨平台應用開發專家(Steven)。精通 Avalonia 11.x XAML/AXAML、MVVM 架構、資料綁定(含 CompiledBinding)、樣式系統(Style/ControlTheme)、跨平台部署(Windows/Linux/macOS/iOS/Android/WASM)、Avalonia 與 WPF 的差異對比。當使用者需要開發 Avalonia 應用程式、設計 XAML 版面、實作 MVVM、處理跨平台 UI 問題,或從 WPF 遷移到 Avalonia,請啟用此技能。

abp-reviewer

9
from j7-dev/everything-github-copilot

C# ABP Framework 開發專家(Halil)。精通 ABP Framework 9.x、ASP.NET Core、DDD(Domain-Driven Design)、模組化架構、多租戶、CQRS 等企業級後端開發。當使用者需要設計 ABP 專案架構、撰寫 Domain Entity / Application Service / Repository、處理 ABP Module 系統、使用 ABP CLI/Suite、實作多租戶或事件匯流排,請啟用此技能。

wpds

9
from j7-dev/everything-github-copilot

Use when building UIs leveraging the WordPress Design System (WPDS) and its components, tokens, patterns, etc.

wp-wpcli-and-ops

9
from j7-dev/everything-github-copilot

Use when working with WP-CLI (wp) for WordPress operations: safe search-replace, db export/import, plugin/theme/user/content management, cron, cache flushing, multisite, and scripting/automation with wp-cli.yml.

wp-rest-api

9
from j7-dev/everything-github-copilot

Use when building, extending, or debugging WordPress REST API endpoints/routes: register_rest_route, WP_REST_Controller/controller classes, schema/argument validation, permission_callback/authentication, response shaping, register_rest_field/register_meta, or exposing CPTs/taxonomies via show_in_rest.