dotnet / dotnet/skills

Skill idea: Source Generator / Analyzer Authoring

Open
#7 1 comment 1 reaction 0 assignees View on GitHub
area-dotnet skill
Dominant language
C#
Stars
5.4k
Forks
415
Avg merge
1d 6h
Merged PRs (30d)
82

Description

## Problem

Source generator and Roslyn analyzer authoring is extremely hard to get right. The official documentation is insufficient, and generic AI confidently produces patterns that degrade IDE performance or break incremental compilation. The Roslyn team has hard-won lessons that are largely tribal knowledge.

## What expert .NET knowledge would this encode?

- Incremental generator pipeline design (what to cache, equality semantics)
- Avoiding IDE perf degradation (lessons from the Roslyn team)
- Proper diagnostic reporting patterns
- Testing source generators (the `GeneratorDriver` dance)
- Interop with the compilation model without causing GC pressure

## Skill concept

A "scaffold and review a source generator" skill that follows Roslyn team best practices — guiding both the initial design and ongoing review of generator code for correctness and performance.

## Why customers would value this

Source generators are increasingly central to .NET (JSON, regex, logging, DI, gRPC, Blazor). Customers writing their own generators hit a wall where docs run out and the only guidance lives in Roslyn team PR reviews and internal discussions.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the proposed skill concept and its listed Roslyn concerns: incremental pipelines, IDE performance, diagnostics, GeneratorDriver testing, and compilation-model interop. Define a scoped scaffold-and-review skill, and consider the work done when it gives actionable guidance covering these areas without relying on unspecified tribal knowledge.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
compilers, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.