New to Claude Skills? Learn how to install them →

sickn33 on GitHub

Avalonia Layout with Zafiro

Free

Create clean and maintainable Avalonia UI layouts.

Get this skill

Free · Opens the source repo

What Avalonia Layout with Zafiro does

Avalonia Layout with Zafiro provides a set of guidelines and best practices for building modern user interfaces using the Zafiro.Avalonia framework. This skill emphasizes the importance of using semantic containers, shared styles, and minimizing redundancy in XAML code. By following the structured approach laid out in this skill, developers can create layouts that are not only visually appealing but also maintainable and scalable.

The skill is organized into several key components, each addressing a specific aspect of UI layout. The themes.md file helps developers set up and refine application themes, ensuring a consistent look and feel across the UI. The containers.md file introduces semantic containers like HeaderedContainer, EdgePanel, and Card, which are essential for structuring views effectively. Additionally, the icons.md file provides guidance on using icons with the IconExtension and IconOptions, allowing for easy customization and integration of icons into the UI.

For developers looking to implement complex interactions without resorting to cumbersome code-behind, the behaviors.md file discusses the use of Xaml.Interaction.Behaviors, promoting a cleaner separation of UI logic from the visual elements. The components.md file focuses on creating reusable UI elements, encouraging developers to avoid deep nesting and redundancy by leveraging generic components.

This skill is ideal for developers and designers working with Avalonia UI who wish to enhance their layout practices and produce high-quality interfaces. It provides a clear checklist for maintaining clean layouts and identifies common anti-patterns to avoid, ensuring that users can build effective and efficient UI designs.

When to use it

Use this skill when developing Avalonia UIs, especially when aiming for a structured and semantic layout approach.

When not to use it

This skill may not be suitable for projects that require extensive customization beyond the guidelines provided or for those that do not use Avalonia UI.

What you can build with it

Setting Up App Themes

Utilize the `themes.md` file to organize and refine your application's themes for a consistent user experience.

Creating Reusable UI Components

Refer to `components.md` to learn how to build generic components that can be reused across different parts of your application.

Implementing UI Behaviors

Use the `behaviors.md` file to implement complex UI interactions using `Xaml.Interaction.Behaviors`, reducing the need for code-behind.

How to install Avalonia Layout with Zafiro

View source

1. Install with the skills CLI

npx skills add sickn33/agentic-awesome-skills/avalonia-layout-zafiro --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by sickn33

Avalonia Layout with Zafiro.Avalonia

Master modern, clean, and maintainable Avalonia UI layouts. Focus on semantic containers, shared styles, and minimal XAML.

🎯 Selective Reading Rule

Read ONLY files relevant to the layout challenge!


📑 Content Map

FileDescriptionWhen to Read
themes.mdTheme organization and shared stylesSetting up or refining app themes
containers.mdSemantic containers (HeaderedContainer, EdgePanel, Card)Structuring views and layouts
icons.mdIcon usage with IconExtension and IconOptionsAdding and customizing icons
behaviors.mdXaml.Interaction.Behaviors and avoiding ConvertersImplementing complex interactions
components.mdGeneric components and avoiding nestingCreating reusable UI elements

🔗 Related Project (Exemplary Implementation)

For a real-world example, refer to the Angor project: /mnt/fast/Repos/angor/src/Angor/Avalonia/Angor.Avalonia.sln


✅ Checklist for Clean Layouts

  • Used semantic containers? (e.g., HeaderedContainer instead of Border with manual header)
  • Avoided redundant properties? Use shared styles in axaml files.
  • Minimized nesting? Flatten layouts using EdgePanel or generic components.
  • Icons via extension? Use {Icon fa-name} and IconOptions for styling.
  • Behaviors over code-behind? Use Interaction.Behaviors for UI-logic.
  • Avoided Converters? Prefer ViewModel properties or Behaviors unless necessary.

❌ Anti-Patterns

DON'T:

  • Use hardcoded colors or sizes (literals) in views.
  • Create deep nesting of Grid and StackPanel.
  • Repeat visual properties across multiple elements (use Styles).
  • Use IValueConverter for simple logic that belongs in the ViewModel.

DO:

  • Use DynamicResource for colors and brushes.
  • Extract repeated layouts into generic components.
  • Leverage Zafiro.Avalonia specific panels like EdgePanel for common UI patterns.

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Frequently asked questions about Avalonia Layout with Zafiro

Similar skills