Logo Avalonia Pro Max/Design System

Avalonia Pro Max/Design System

Cộng đồng
linuxdevel
avalonia-pro-max/design-system

Use when establishing or refactoring an Avalonia app's design system — semantic color tokens, theme-variant dictionaries (light/dark), typography scale, spacing rhythm, radius and elevation tokens. Produces production-ready Resources/Tokens.axaml.

Tổng quan

Nhà phát hànhlinuxdevel
Kho mãAvalonia-skills
Tên kỹ năngavalonia-pro-max/design-system
Sao
50
Bản fork
4
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được linuxdevel công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Avalonia Pro Max/Design System trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/linuxdevel/Avalonia-skills/tree/main/skills/avalonia/avalonia-pro-max/design-system
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/linuxdevel/Avalonia-skills.git /tmp/Avalonia-skills
mkdir -p .claude/skills
cp -r /tmp/Avalonia-skills/skills/avalonia/avalonia-pro-max/design-system .claude/skills/linuxdevel-avalonia-pro-max-design-system
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Avalonia Pro Max/Design System trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Avalonia Pro Max/Design System ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Avalonia Pro Max/Design System với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Design System for Avalonia

Goal

A design system in Avalonia is a set of named resources (colors, brushes, fonts, doubles, thicknesses) that:

  1. Live in ResourceDictionary files merged into App.axaml.
  2. Are referenced via {DynamicResource Name} in views — never hard-coded hex/numbers.
  3. Are split by theme variant (Light/Dark) so the entire UI re-themes instantly.
  4. Follow a 3-layer naming model: primitive → semantic → component.

3-Layer Token Model

Layer 1 — Primitives (raw values, never used in views)

xml
<!-- Resources/Primitives.axaml -->
<ResourceDictionary xmlns="https://github.com/avaloniaui"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <!-- Color ramp: 50..950 like Tailwind -->
  <Color x:Key="Slate50">#F8FAFC</Color>
  <Color x:Key="Slate100">#F1F5F9</Color>
  <Color x:Key="Slate200">#E2E8F0</Color>
  <Color x:Key="Slate500">#64748B</Color>
  <Color x:Key="Slate700">#334155</Color>
  <Color x:Key="Slate900">#0F172A</Color>
  <Color x:Key="Slate950">#020617</Color>

  <Color x:Key="Blue500">#3B82F6</Color>
  <Color x:Key="Blue600">#2563EB</Color>
  <Color x:Key="Blue700">#1D4ED8</Color>

  <Color x:Key="Red500">#EF4444</Color>
  <Color x:Key="Green500">#22C55E</Color>
  <Color x:Key="Amber500">#F59E0B</Color>
</ResourceDictionary>

Layer 2 — Semantic tokens (theme-variant aware)

xml
<!-- Resources/Semantic.axaml -->
<ResourceDictionary xmlns="https://github.com/avaloniaui"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <ResourceDictionary.MergedDictionaries>
    <ResourceInclude Source="avares://MyApp/Resources/Primitives.axaml"/>
  </ResourceDictionary.MergedDictionaries>

  <ResourceDictionary.ThemeDictionaries>

    <ResourceDictionary x:Key="Light">
      <!-- Surfaces -->
      <SolidColorBrush x:Key="SurfaceBackgroundBrush" Color="{StaticResource Slate50}"/>
      <SolidColorBrush x:Key="SurfaceBrush"           Color="#FFFFFF"/>
      <SolidColorBrush x:Key="SurfaceElevatedBrush"   Color="#FFFFFF"/>
      <SolidColorBrush x:Key="SurfaceMutedBrush"      Color="{StaticResource Slate100}"/>

      <!-- Text -->
      <SolidColorBrush x:Key="TextPrimaryBrush"   Color="{StaticResource Slate900}"/>
      <SolidColorBrush x:Key="TextSecondaryBrush" Color="{StaticResource Slate700}"/>
      <SolidColorBrush x:Key="TextMutedBrush"     Color="{StaticResource Slate500}"/>
      <SolidColorBrush x:Key="TextOnAccentBrush"  Color="#FFFFFF"/>

      <!-- Borders / dividers -->
      <SolidColorBrush x:Key="BorderBrush"         Color="{StaticResource Slate200}"/>
      <SolidColorBrush x:Key="BorderStrongBrush"   Color="{StaticResource Slate500}"/>

      <!-- Brand / status -->
      <SolidColorBrush x:Key="AccentBrush"  Color="{StaticResource Blue600}"/>
      <SolidColorBrush x:Key="DangerBrush"  Color="{StaticResource Red500}"/>
      <SolidColorBrush x:Key="SuccessBrush" Color="{StaticResource Green500}"/>
      <SolidColorBrush x:Key="WarningBrush" Color="{StaticResource Amber500}"/>
    </ResourceDictionary>

    <ResourceDictionary x:Key="Dark">
      <SolidColorBrush x:Key="SurfaceBackgroundBrush" Color="{StaticResource Slate950}"/>
      <SolidColorBrush x:Key="SurfaceBrush"           Color="{StaticResource Slate900}"/>
      <SolidColorBrush x:Key="SurfaceElevatedBrush"   Color="#1E293B"/>
      <SolidColorBrush x:Key="SurfaceMutedBrush"      Color="#1E293B"/>

      <SolidColorBrush x:Key="TextPrimaryBrush"   Color="{StaticResource Slate50}"/>
      <SolidColorBrush x:Key="TextSecondaryBrush" Color="{StaticResource Slate200}"/>
      <SolidColorBrush x:Key="TextMutedBrush"     Color="{StaticResource Slate500}"/>
      <SolidColorBrush x:Key="TextOnAccentBrush"  Color="#FFFFFF"/>

      <SolidColorBrush x:Key="BorderBrush"       Color="#1E293B"/>
      <SolidColorBrush x:Key="BorderStrongBrush" Color="{StaticResource Slate700}"/>

      <SolidColorBrush x:Key="AccentBrush"  Color="{StaticResource Blue500}"/>
      <SolidColorBrush x:Key="DangerBrush"  Color="#F87171"/>
      <SolidColorBrush x:Key="SuccessBrush" Color="#4ADE80"/>
      <SolidColorBrush x:Key="WarningBrush" Color="#FBBF24"/>
    </ResourceDictionary>

  </ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

Layer 3 — Component-specific (optional)

xml
<SolidColorBrush x:Key="ButtonPrimaryBackgroundBrush" Color="{DynamicResource AccentBrush}"/>
<SolidColorBrush x:Key="CardBackgroundBrush"          Color="{DynamicResource SurfaceElevatedBrush}"/>

Rule: Views use Layer 2/3 only. Never reference Slate900 directly from a view.


Typography Scale

Choose ONE scale and stick to it. Modular scale 1.25 (Major Third) is a safe default.

xml
<!-- Resources/Typography.axaml -->
<ResourceDictionary xmlns="https://github.com/avaloniaui"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:sys="using:System">

  <!-- Font families -->
  <!-- Static font files (Regular/Medium/SemiBold/Bold .ttf/.otf) in Assets/Fonts; family name after '#' -->
  <FontFamily x:Key="FontSans">avares://MyApp/Assets/Fonts#Inter</FontFamily>
  <FontFamily x:Key="FontMono">avares://MyApp/Assets/Fonts#JetBrains Mono</FontFamily>

  <!-- Sizes (modular scale 1.25) -->
  <sys:Double x:Key="FontSizeXs">12</sys:Double>
  <sys:Double x:Key="FontSizeSm">13</sys:Double>
  <sys:Double x:Key="FontSizeBase">14</sys:Double>   <!-- desktop body -->
  <sys:Double x:Key="FontSizeMd">16</sys:Double>
  <sys:Double x:Key="FontSizeLg">18</sys:Double>
  <sys:Double x:Key="FontSizeXl">22</sys:Double>
  <sys:Double x:Key="FontSize2xl">28</sys:Double>
  <sys:Double x:Key="FontSize3xl">36</sys:Double>
  <sys:Double x:Key="FontSize4xl">48</sys:Double>

  <!-- Line heights (multipliers) -->
  <sys:Double x:Key="LineHeightTight">1.2</sys:Double>
  <sys:Double x:Key="LineHeightNormal">1.5</sys:Double>
  <sys:Double x:Key="LineHeightRelaxed">1.65</sys:Double>
</ResourceDictionary>

Type ramp Styles:

xml
<Style Selector="TextBlock.h1">
  <Setter Property="FontFamily" Value="{StaticResource FontSans}"/>
  <Setter Property="FontSize"   Value="{StaticResource FontSize3xl}"/>
  <Setter Property="FontWeight" Value="SemiBold"/>
  <Setter Property="LineHeight" Value="44"/>
  <Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
</Style>

<Style Selector="TextBlock.body">
  <Setter Property="FontSize"   Value="{StaticResource FontSizeBase}"/>
  <Setter Property="LineHeight" Value="21"/>
  <Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
</Style>

<Style Selector="TextBlock.muted">
  <Setter Property="Foreground" Value="{DynamicResource TextMutedBrush}"/>
</Style>

Usage: <TextBlock Classes="h1">Dashboard</TextBlock>

Fonts, variable fonts, letter spacing, text rendering

  • Ship static font files (one .ttf/.otf per weight). Variable-font axis control is not a released Avalonia feature: as of the last check, the fvar/avar parsing and FontVariations property PRs were still open on GitHub (AvaloniaUI/Avalonia #22179, #22185), so do not rely on wght/wdth axes or FontVariations. Weight selection works by matching static files via FontWeight.
  • (12.0+) Only TrueType (.ttf) and OpenType (.otf) fonts are supported; legacy Type 1 (.pfb/.pfm) fonts no longer load.
  • Letter spacing: TextElement.LetterSpacing is an inherited attached property on all templated controls (12.0+), so you can set it once on a parent control. In 11.x it is TextBlock.LetterSpacing only (not inherited). XAML on a TextBlock is source-compatible across versions. Use small positive values (e.g. 0.5) for uppercase labels, slightly negative for large headings.
  • Text rendering options (12.0+): TextOptions.TextRenderingMode, TextOptions.TextHintingMode and TextOptions.BaselinePixelAlignment live on TextOptions. In 11.x the mode is RenderOptions.TextRenderingMode (11.x) — do not mix.
  • (12.0+) If you call UseSkia() explicitly in AppBuilder you must also call UseHarfBuzz() (package Avalonia.HarfBuzz) or startup throws "No text shaping system configured". UsePlatformDetect() handles it.

Spacing Scale (4 / 8 rhythm)

xml
<sys:Double x:Key="Space0">0</sys:Double>
<sys:Double x:Key="Space1">4</sys:Double>
<sys:Double x:Key="Space2">8</sys:Double>
<sys:Double x:Key="Space3">12</sys:Double>
<sys:Double x:Key="Space4">16</sys:Double>
<sys:Double x:Key="Space5">20</sys:Double>
<sys:Double x:Key="Space6">24</sys:Double>
<sys:Double x:Key="Space8">32</sys:Double>
<sys:Double x:Key="Space10">40</sys:Double>
<sys:Double x:Key="Space12">48</sys:Double>
<sys:Double x:Key="Space16">64</sys:Double>

For Margin/Padding use Thickness:

xml
<Thickness x:Key="PaddingCard">20</Thickness>
<Thickness x:Key="PaddingCardCompact">12</Thickness>
<Thickness x:Key="PaddingPage">24,16</Thickness>

Padding="{StaticResource PaddingCard}".


Radius & Elevation

xml
<CornerRadius x:Key="RadiusSm">4</CornerRadius>
<CornerRadius x:Key="RadiusMd">8</CornerRadius>
<CornerRadius x:Key="RadiusLg">12</CornerRadius>
<CornerRadius x:Key="RadiusXl">16</CornerRadius>
<CornerRadius x:Key="RadiusFull">9999</CornerRadius>

<!-- Elevation via BoxShadow -->
<BoxShadows x:Key="ShadowSm">0 1 2 0 #19000000</BoxShadows>
<BoxShadows x:Key="ShadowMd">0 4 8 -2 #26000000, 0 2 4 -2 #1A000000</BoxShadows>
<BoxShadows x:Key="ShadowLg">0 12 24 -8 #33000000, 0 4 8 -4 #1F000000</BoxShadows>

Apply to Border:

xml
<Border Background="{DynamicResource SurfaceBrush}"
        CornerRadius="{StaticResource RadiusLg}"
        BoxShadow="{StaticResource ShadowMd}"
        Padding="{StaticResource PaddingCard}">
  <!-- card content -->
</Border>

For dark mode, halve shadow opacity in the dark theme dictionary (or use a subtle 1px border instead).


Wire Everything Up

xml
<!-- App.axaml -->
<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             x:Class="MyApp.App"
             RequestedThemeVariant="Default">

  <Application.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceInclude Source="avares://MyApp/Resources/Primitives.axaml"/>
        <ResourceInclude Source="avares://MyApp/Resources/Semantic.axaml"/>
        <ResourceInclude Source="avares://MyApp/Resources/Typography.axaml"/>
        <ResourceInclude Source="avares://MyApp/Resources/Spacing.axaml"/>
        <ResourceInclude Source="avares://MyApp/Resources/Radius.axaml"/>
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </Application.Resources>

  <Application.Styles>
    <FluentTheme/>
    <StyleInclude Source="avares://MyApp/Styles/Typography.axaml"/>
    <StyleInclude Source="avares://MyApp/Styles/Components.axaml"/>
  </Application.Styles>
</Application>

Theme Switching at Runtime

csharp
Application.Current!.RequestedThemeVariant =
    Application.Current.ActualThemeVariant == ThemeVariant.Dark
        ? ThemeVariant.Light
        : ThemeVariant.Dark;

Persist to settings; restore on launch in OnFrameworkInitializationCompleted.


Palette Selection by Product Type

Product typeAccent suggestionTone
Productivity / SaaS dashboardBlue 600 / Indigo 600Cool, professional
Developer tool / IDESlate + accent (Cyan 500 or Violet 500)Neutral, dark-mode first
Finance / bankingGreen 600 or Navy 800Trust, conservative
Health / wellnessTeal 500 / Emerald 500Calm, fresh
Creative / mediaBold gradient or Magenta 500Vibrant
Gaming / entertainmentPurple 600 + Neon accentEnergetic
Enterprise B2BSlate + Brand color from logoRestrained
Education / kidsSaturated multi-color (Amber/Sky/Pink)Friendly

Always validate accent on white and the dark surface for ≥4.5:1 contrast on text overlays.


Common Mistakes

  • Hex literals in views — kills theming. Always DynamicResource.
  • Missing dark-mode variant — app looks broken if user's OS is dark.
  • Using StaticResource for theme-variant brushes — won't switch at runtime.
  • More than ~3 accent colors — visual noise; pick one accent + one optional secondary.
  • Inventing one-off spacing values (Margin="13,7") — breaks rhythm.
  • Body text below 13px on desktop — readability suffers.
  • Pure black #000 text on pure white — too harsh; use Slate 900 / Slate 50.
  • Same shadow opacity in dark mode — looks muddy. Reduce or replace with a 1px border.

Câu hỏi thường gặp

Kỹ năng AI Avalonia Pro Max/Design System làm được gì?

Use when establishing or refactoring an Avalonia app's design system — semantic color tokens, theme-variant dictionaries (light/dark), typography scale, spacing rhythm, radius and elevation tokens. Produces production-ready Resources/Tokens.axaml.

Vì sao nên dùng Avalonia Pro Max/Design System trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Avalonia Pro Max/Design System là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Avalonia Pro Max/Design System trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/linuxdevel/Avalonia-skills/tree/main/skills/avalonia/avalonia-pro-max/design-system. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Avalonia Pro Max/Design System?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Avalonia Pro Max/Design System với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Avalonia Pro Max/Design System với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Avalonia Pro Max/Design System có miễn phí không?

Có. Kỹ năng này được linuxdevel phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇