dotnet-csharp-source-generators

Create and consume Roslyn source generators in .NET with incremental patterns.

10|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/AGIBuild/Agibuild.Fulora --skill dotnet-csharp-source-generators
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dotnet-csharp-source-generators
Source: https://github.com/AGIBuild/Agibuild.Fulora/tree/main/.cursor/skills/dotnet-csharp-source-generators
Command: npx skills add https://github.com/AGIBuild/Agibuild.Fulora --skill dotnet-csharp-source-generators

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines .NET development by automating repetitive code generation tasks, reducing boilerplate, and improving performance through compile-time checks and optimizations.

Core Features & Use Cases

  • Create Custom Source Generators: Build your own Roslyn source generators using IIncrementalGenerator for efficient, incremental code generation.
  • Utilize Built-in Generators: Leverage powerful built-in generators like [GeneratedRegex], [LoggerMessage], and System.Text.Json source generation for optimized performance and AOT compatibility.
  • Use Case: Automatically generate INotifyPropertyChanged implementations for ViewModel properties, or create compile-time validated regular expressions to avoid runtime overhead.

Quick Start

Use the dotnet-csharp-source-generators skill to create a new source generator project.

Frequently Asked Questions about dotnet-csharp-source-generators

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a custom Roslyn source generator in C#?▼

Create a custom Roslyn source generator in C# by implementing the IIncrementalGenerator interface. This approach enables efficient, incremental code generation during compilation, reducing boilerplate and improving compile-time safety.

What are .NET source generators used for?▼

.NET source generators are used for automating repetitive code generation tasks at compile-time. They reduce boilerplate, enhance compile-time safety, and optimize performance for AOT compatibility without runtime overhead.

Can I use source generators to implement INotifyPropertyChanged automatically?▼

Yes, you can use source generators to automatically generate INotifyPropertyChanged implementations for ViewModel properties. This automates repetitive code generation tasks and reduces boilerplate in .NET applications.

Does .NET support built-in source generators for JSON serialization?▼

.NET supports built-in source generators for JSON serialization through System.Text.Json. Leveraging these generators optimizes performance and ensures AOT compatibility by generating serialization code at compile-time.

How do I test Roslyn source generators in .NET?▼

Test Roslyn source generators in .NET using dedicated testing methodologies covered by the skill. This includes verifying incremental generator patterns, validating diagnostic reporting, and ensuring generated code correctness.