What problem does it solve? Writing compile-time code generation in .NET is error-prone without clear patterns: developers struggle with incremental pipeline design, caching pitfalls, diagnostic reporting, and testing generators in-memory. This Skill provides concrete guidance for both authoring Roslyn source generators and consuming built-in generators like GeneratedRegex, LoggerMessage, and System.Text.Json source generation. ## Core Features & Use Cases - Generator Authoring: Build IIncrementalGenerator pipelines with syntax providers, value-equatable data models, deterministic emit patterns, and diagnostic reporting. - Testing & Debugging: Verify generator output with CSharpGeneratorDriver, snapshot testing via Verify.SourceGenerators, and emit generated files to disk for inspection. - Built-In Generator Consumption: Apply [GeneratedRegex], [LoggerMessage], and System.Text.Json source generation with [JsonSerializable] contexts for AOT-compatible serialization. - Use Case: You need a compile-time INotifyPropertyChanged implementation. Use this Skill to scaffold an incremental generator that finds attributed fields, emits partial class properties, reports diagnostics for invalid shapes, and is tested with an in-memory compilation. ## Quick Start Ask the AI to create an incremental source generator that generates properties from fields marked with a custom attribute, including a unit test using CSharpGeneratorDriver.