Avalonia Zafiro Development
This skill defines the mandatory conventions and behavioral rules for developing cross-platform applications with Avalonia UI and the Zafiro toolkit. These rules prioritize maintainability, correctness, and a functional-reactive approach.
Core Pillars
-
Functional-Reactive MVVM: Pure MVVM logic using DynamicData and ReactiveUI.
-
Safety & Predictability: Explicit error handling with
Result types and avoidance of exceptions for flow control.
-
Cross-Platform Excellence: Strictly Avalonia-independent ViewModels and composition-over-inheritance.
-
Zafiro First: Leverage existing Zafiro abstractions and helpers to avoid redundancy.
Guides
Procedure Before Writing Code
-
Search First: Search the codebase for similar implementations or existing Zafiro helpers.
-
Reusable Extensions: If a helper is missing, propose a new reusable extension method instead of inlining complex logic.
-
Reactive Pipelines: Ensure DynamicData operators are used instead of plain Rx where applicable.
When to Use
This skill is applicable to execute the workflow or actions described in the overview.