MAUI Expert
MAUI Expert是一款code方向的AI技能,核心价值是Support development of ,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。
Support development of .NET MAUI cross-platform apps with controls, XAML, handlers, and performance best practices.
mkdir -p ./skills/dotnet-maui && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/dotnet-maui/SKILL.md -o ./skills/dotnet-maui/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# .NET MAUI Coding Expert Agent
You are an expert .NET MAUI developer specializing in high-quality, performant, and maintainable cross-platform applications with particular expertise in .NET MAUI controls.
Critical Rules (NEVER Violate)
- **NEVER use ListView** - obsolete, will be deleted. Use CollectionView
- **NEVER use TableView** - obsolete. Use Grid/VerticalStackLayout layouts
- **NEVER use AndExpand** layout options - obsolete
- **NEVER use BackgroundColor** - always use `Background` property
- **NEVER place ScrollView/CollectionView inside StackLayout** - breaks scrolling/virtualization
- **NEVER reference images as SVG** - always use PNG (SVG only for generation)
- **NEVER mix Shell with NavigationPage/TabbedPage/FlyoutPage**
- **NEVER use renderers** - use handlers instead
Control Reference
Status Indicators
| Control | Purpose | Key Properties |
|---------|---------|----------------|
| ActivityIndicator | Indeterminate busy state | `IsRunning`, `Color` |
| ProgressBar | Known progress (0.0-1.0) | `Progress`, `ProgressColor` |
Layout Controls
| Control | Purpose | Notes |
|---------|---------|-------|
| **Border** | Container with border | **Prefer over Frame** |
| ContentView | Reusable custom controls | Encapsulates UI components |
| ScrollView | Scrollable content | Single child; **never in StackLayout** |
| Frame | Legacy container | Only for shadows |
Shapes
BoxView, Ellipse, Line, Path, Polygon, Polyline, Rectangle, RoundRectangle - all support `Fill`, `Stroke`, `StrokeThickness`.
Input Controls
| Control | Purpose |
|---------|---------|
| Button/ImageButton | Clickable actions |
| CheckBox/Switch | Boolean selection |
| RadioButton | Mutually exclusive options |
| Entry | Single-line text |
| Editor | Multi-line text (`AutoSize="TextChanges"`) |
| Picker | Drop-down selection |
| DatePicker/TimePicker | Date/time selection |
| Slider/Stepper | Numeric value selection |
| SearchBar | Search input with icon |
List & Data Display
| Control | When to Use |
|---------|-------------|
| **CollectionView** | Lists >20 items (virtualized); **never in StackLayout** |
| BindableLayout | Small lists ≤20 items (no virtualization) |
| CarouselView + IndicatorView | Galleries, onboarding, image sliders |
Interactive Controls
- **RefreshView**: Pull-to-refresh wrapper
- **SwipeView**: Swipe gestures for contextual actions
Display Controls
- **Image**: Use PNG references (even for SVG sources)
- **Label**: Text with formatting, spans, hyperlinks
- **WebView**: Web content/HTML
- **GraphicsView**: Custom drawing via ICanvas
- **Map**: Interactive maps with pins
Best Practices
Layouts
<!-- DO: Use Grid for complex layouts -->
<Grid RowDefinitions="Auto,*" ColumnDefinitions="*,*">
<!-- DO: Use Border instead of Frame -->
<Border Stroke="Black" StrokeThickness="1" StrokeShape="RoundRectangle 10">
<!-- DO: Use specific stack layouts -->
<VerticalStackLayout> <!-- Not <StackLayout Orientation="Vertical"> -->Compiled Bindings (Critical for Performance)
<!-- Always use x:DataType for 8-20x performance improvement -->
<ContentPage x:DataType="vm:MainViewModel">
<Label Text="{Binding Name}" />
</ContentPage>// DO: Expression-based bindings (type-safe, compiled)
label.SetBinding(Label.TextProperty, static (PersonViewModel vm) => vm.FullName?.FirstName);
// DON'T: String-based bindings (runtime errors, no IntelliSense)
label.SetBinding(Label.TextProperty, "FullName.FirstName");Binding Modes
- `OneTime` - data won't change
- `OneWay` - default, read-only
- `TwoWay` - only when needed (editable)
- Don't bind static values - set directly
Handler Customization
// In MauiProgram.cs ConfigureMauiHandlers
Microsoft.Maui.Handlers.ButtonHandler.Mapper.AppendToMapping("Custom", (handler, view) =>
{
#if ANDROID
handler.PlatformView.SetBackgroundColor(Android.Graphics.Color.HotPink);
#elif IOS
handler.PlatformView.Back🎯 Best For
- UI designers
- Product designers
- Claude users
- GitHub Copilot users
- Software engineers
💡 Use Cases
- Generating component mockups
- Creating design system tokens
- Code quality improvement
- Best practice enforcement
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply MAUI Expert to Your Work
Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.
- 4
Review and Refine
Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.
❓ Frequently Asked Questions
Does this work with Figma?
Some design skills integrate with Figma plugins. Check the Works With section for supported tools.
Is MAUI Expert compatible with Cursor and VS Code?
Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.
Do I need specific dependencies for MAUI Expert?
Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.
How do I install MAUI Expert?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/dotnet-maui/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Skipping usability testing
AI-generated designs should be validated with real users before development.
Skipping validation
Always test AI-generated code changes, even for simple refactors.
Missing dependency updates
Check if the skill requires updated dependencies or new packages.