home / skills / 404kidwiz / claude-supercode-skills / dotnet-core-expert-skill
This skill helps you build cross-platform .NET applications with MAUI, EF Core, and modern C# by guiding deployment, UI, and tooling.
npx playbooks add skill 404kidwiz/claude-supercode-skills --skill dotnet-core-expert-skillReview the files below or copy the command above to add this skill to your agents.
---
name: dotnet-core-expert
description: .NET 8 cross-platform specialist with expertise in MAUI, EF Core, and modern C# development. Use when building cross-platform .NET apps, working with .NET MAUI, or developing applications for multiple operating systems.
---
# .NET Core Expert
## Purpose
Provides expertise in cross-platform .NET development, including .NET MAUI for mobile/desktop, cross-platform console applications, and cloud-native .NET services. Covers .NET 8 features and cross-platform deployment.
## When to Use
- Building cross-platform .NET applications
- Developing with .NET MAUI (mobile/desktop)
- Creating cross-platform console tools
- Deploying .NET to Linux containers
- Building cloud-native .NET services
- Cross-platform file and process handling
- Using .NET Native AOT compilation
## Quick Start
**Invoke this skill when:**
- Building cross-platform .NET applications
- Developing with .NET MAUI
- Creating cross-platform console tools
- Deploying .NET to Linux containers
- Using .NET Native AOT compilation
**Do NOT invoke when:**
- Windows-only WPF/WinForms (use windows-app-developer)
- Legacy .NET Framework (use dotnet-framework-4.8-expert)
- Web APIs specifically (use csharp-developer)
- Azure infrastructure (use azure-infra-engineer)
## Decision Framework
```
Cross-Platform UI:
├── Mobile + Desktop → .NET MAUI
├── Desktop only → Avalonia or MAUI
├── Web → Blazor
└── Console → Cross-platform console app
Deployment Target:
├── Linux containers → Self-contained, Alpine
├── Windows service → Worker service
├── macOS app → .NET MAUI or Avalonia
├── Single file → Publish single-file
└── Fast startup → Native AOT
```
## Core Workflows
### 1. .NET MAUI App Setup
1. Create MAUI project from template
2. Configure target platforms
3. Set up MVVM architecture
4. Implement platform-specific code
5. Add handlers for native features
6. Configure app lifecycle
7. Test on each platform
### 2. Cross-Platform Deployment
1. Configure RuntimeIdentifiers
2. Choose self-contained or framework-dependent
3. Set up trimming if needed
4. Handle platform-specific paths
5. Package for each platform
6. Test on target OS
### 3. Native AOT Compilation
1. Enable PublishAot in project
2. Review AOT compatibility
3. Handle reflection limitations
4. Test trimmed application
5. Verify startup performance
6. Deploy optimized binary
## Best Practices
- Use Path.Combine for cross-platform paths
- Check RuntimeInformation.IsOSPlatform
- Use conditional compilation sparingly
- Test on all target platforms
- Use cross-platform abstractions
- Handle line endings properly
## Anti-Patterns
| Anti-Pattern | Problem | Correct Approach |
|--------------|---------|------------------|
| Windows paths | Breaks on Linux/Mac | Use Path.Combine |
| P/Invoke everywhere | Platform-specific | Use cross-platform APIs |
| Ignoring case sensitivity | Fails on Linux | Consistent casing |
| Untested on targets | Runtime failures | CI for each platform |
| Heavy reflection with AOT | Trimming breaks app | Use source generators |
This skill provides expert guidance for building cross-platform .NET 8 applications, with deep experience in .NET MAUI, EF Core, Native AOT, and modern C# patterns. It helps design, implement, and deploy apps that run on Windows, Linux, macOS, Android, and iOS. Use it to make pragmatic architecture decisions, avoid cross-platform pitfalls, and optimize for startup, size, and reliability.
I inspect your target platforms, project type (MAUI, console, worker, or cloud service), and deployment goals (self-contained, framework-dependent, or Native AOT). I recommend project templates, RuntimeIdentifiers, trimming and AOT settings, platform abstractions, and testing strategies. I also provide concrete fixes for path, file, process, and reflection issues that commonly break cross-platform builds.
Should I always publish self-contained for cross-platform apps?
Not always. Self-contained ensures runtime parity but increases size. Use framework-dependent for smaller images if target hosts have compatible runtimes; choose self-contained for isolated deployment or Alpine containers.
How do I avoid runtime failures on Linux due to file paths?
Use Path.Combine, avoid hard-coded backslashes, normalize casing where needed, and test filesystem behaviors on Linux during CI. Prefer cross-platform APIs for temp directories and special folders.