avalonia-zafiro-development
它能做什么
这个技能可以帮你使用 Avalonia 和 Zafiro 工具构建外观美观、功能完善的应用。它能确保代码结构清晰、易于理解,并且在不同操作系统上都能良好运行。
适用场景
- ✓当你用 Avalonia 和 Zafiro 开始一个新项目时。
- ✓当你需要确保代码遵循最佳实践时。
- ✓当你要加入一些需要稳定可靠、便于长期维护的新功能时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/avalonia-zafiro-development/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我该如何组织代码,让它在 Windows、Mac 和 Linux 上都能良好运行(使用 Avalonia 和 Zafiro)?”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会遵循一套具体的代码编写规则:重点关注程序各部分之间如何通信(MVVM),并使用能让代码更安全、更可预测的工具。它还鼓励复用代码,并在动手创建新东西之前先搜索现有的解决方案。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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
Resulttypes 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
- Core Technical Skills & Architecture: Fundamental skills and architectural principles.
- Naming & Coding Standards: Rules for naming, fields, and error handling.
- Avalonia, Zafiro & Reactive Rules: Specific guidelines for UI, Zafiro integration, and DynamicData pipelines.
- Zafiro Shortcuts: Concise mappings for common Rx/Zafiro operations.
- Common Patterns: Advanced patterns like
RefreshableCollectionand Validation.
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.
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.
常见问题
Avalonia 和 Zafiro 是什么?
Avalonia 是一个用于创建用户界面的框架,可以在多种操作系统上运行。Zafiro 是一个工具包,它让 Avalonia 更容易上手,并额外提供了一些功能,简化了开发过程。
“MVVM”是什么意思?
MVVM 是一种设计模式,它把用户界面(你看到的部分)和程序逻辑(它如何运作)分开,让代码更有条理,也更容易测试。
为什么写代码之前要“先搜索”?
先搜索可以避免重复劳动,并直接使用已经过测试和认可的解决方案,让代码更高效,风格也更统一。
详情
作者的原始描述
Mandatory skills, conventions, and behavioral rules for Avalonia UI development using the Zafiro toolkit.
热度
- GitHub 星标
- 48k
- 排名
- #3848
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。