All skills
davila7 avatar

/avalonia-zafiro-development

@1deb97c

Mandatory skills, conventions, and behavioral rules for Avalonia UI development using the Zafiro toolkit.

Use this Skill: https://skilld.dev/gh/davila7/claude-code-templates/avalonia-zafiro-development

This session only. Nothing lands on disk.

zafiro-shortcuts.md

≈392 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Zafiro Reactive Shortcuts

Use these Zafiro extension methods to replace standard, more verbose Reactive and DynamicData patterns.

General Observable Helpers

Standard Pattern Zafiro Shortcut
Replay(1).RefCount() ReplayLastActive()
Select(_ => Unit.Default) ToSignal()
Select(b => !b) Not()
Where(b => b).ToSignal() Trues()
Where(b => !b).ToSignal() Falses()
Select(x => x is null) Null()
Select(x => x is not null) NotNull()
Select(string.IsNullOrWhiteSpace) NullOrWhitespace()
Select(s => !string.IsNullOrWhiteSpace(s)) NotNullOrEmpty()

Result & Maybe Extensions

Standard Pattern Zafiro Shortcut
Where(r => r.IsSuccess).Select(r => r.Value) Successes()
Where(r => r.IsFailure).Select(r => r.Error) Failures()
Where(m => m.HasValue).Select(m => m.Value) Values()
Where(m => !m.HasValue).ToSignal() Empties()

Lifecycle Management

Description Method
Dispose previous item before emitting new one DisposePrevious()
Manage lifecycle within a disposable DisposeWith(disposables)

Command & Interaction

Description Method
Add metadata/text to a ReactiveCommand Enhance(text, name)
Automatically show errors in UI HandleErrorsWith(notificationService)

[!TIP] Always check Zafiro.Reactive.ObservableMixin and Zafiro.CSharpFunctionalExtensions.ObservableExtensions before writing custom Rx logic.

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill defines development conventions and architectural standards for Avalonia UI and the Zafiro toolkit. It consists exclusively of documentation and coding guidelines with no executable scripts or malicious patterns.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    6/6 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 1deb97c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 16 hours ago.

Activeupdated 8 months ago

README badge

README badge for davila7/claude-code-templates/avalonia-zafiro-development