avalonia-layout-zafiro
What it does
This guide teaches how to create beautiful and maintainable user interfaces for Avalonia applications. It focuses on using smart components and shared styles to avoid repetition and simplify code.
When to use it
- ✓When starting a new Avalonia project and wanting a good structure.
- ✓When you need to organize or improve your app's visual styles.
- ✓If you're having trouble organizing a screen's layout.
Skill link
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/avalonia-layout-zafiro/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“How can I organize the visual styles in my Avalonia app so they are easy to reuse?”
5 new skills a week. 1 minute to read.
How it works
The AI reads instructions on how to organize layouts in Avalonia, focusing on using ready-made components and shared styles. It avoids code repetition and suggests the best way to structure screens.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
| File | Description | When to Read |
|---|---|---|
themes.md |
Theme organization and shared styles | Setting up or refining app themes |
containers.md |
Semantic containers (HeaderedContainer, EdgePanel, Card) |
Structuring views and layouts |
icons.md |
Icon usage with IconExtension and IconOptions |
Adding and customizing icons |
behaviors.md |
Xaml.Interaction.Behaviors and avoiding Converters |
Implementing complex interactions |
components.md |
Generic components and avoiding nesting | Creating 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.,
HeaderedContainerinstead ofBorderwith manual header) - Avoided redundant properties? Use shared styles in
axamlfiles. - Minimized nesting? Flatten layouts using
EdgePanelor generic components. - Icons via extension? Use
{Icon fa-name}andIconOptionsfor styling. - Behaviors over code-behind? Use
Interaction.Behaviorsfor 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
GridandStackPanel. - Repeat visual properties across multiple elements (use Styles).
- Use
IValueConverterfor simple logic that belongs in the ViewModel.
DO:
- Use
DynamicResourcefor colors and brushes. - Extract repeated layouts into generic components.
- Leverage
Zafiro.Avaloniaspecific panels likeEdgePanelfor 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.
FAQ
What are 'semantic containers'?
These are UI building blocks that already have a clear function, like a header or a side panel, instead of using generic elements and having to configure them manually.
Why should I avoid 'redundant properties'?
Repeating the same visual settings (colors, sizes) in multiple places makes the code larger and harder to update. Using shared styles solves this.
What are 'anti-patterns'?
These are common practices that seem to work but cause problems in the future, such as maintenance difficulties or performance issues. This guide shows what to avoid.
Details
Original description by the author
Guidelines for modern Avalonia UI layout using Zafiro.Avalonia, emphasizing shared styles, generic components, and avoiding XAML redundancy.
Popularity
- GitHub stars
- 48k
- Ranking position
- #3846
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
48kHelps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
007
48kLets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
10-andruia-skill-smith
48kHelps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
20-andruia-niche-intelligence
48kLets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
Similar skills
canvas
394kLets your agent show a hosted visual widget on a connected Mac panel, then hide the panel or move it to another page.
control-ui
394kHelps your agent organize and troubleshoot the OpenClaw Control UI, including sessions, dashboards, and connected Gateways.
diagram-maker
394kHelps your agent create clear diagrams as SVG, HTML, or editable Excalidraw files for processes, system architecture, and whiteboard sketches.