/ancplua-skills:qyl-tfm-mapfrom ancplua-skills
Know, without being told, which target framework every project in ~/RiderProjects/qyl-workspace compiles for and what that allows or forbids — the net10.0 baseline (full modern BCL, AOT/trim-aware) versus the small netstandard2.0 Roslyn island (source generators + analyzers + the multi-targeted OTel libs). USE FOR: editing or reviewing any C# in qyl, Qyl.AutoInstrumentation, qyl-dotnet-autoinstrumentation, Qyl.OpenTelemetry.SemanticConventions; choosing whether an API/language feature is legal in the file you are touching; a build error like CS0103/CS1061/CS8370/"is not available in netstandard2.0" inside a *.SourceGenerators / *.Analyzers / *.generators project; "can I use HashCode / System.Text.Json / ArgumentNullException.ThrowIfNull / Span here"; reviewing a PR that spans both a generator and its runtime consumer. ESPECIALLY use it before you assume a *.SourceGenerators project can call net10 BCL (it cannot — it is netstandard2.0), or that netstandard2.0 forbids records / init / required (it does NOT — those are polyfilled). Both of those instincts are wrong here and this skill exists to override them. DO NOT USE FOR: the agent-framework-dotnet-rootsource checkout (that is upstream Microsoft source, not a qyl project); picking a test framework or test platform; NuGet publishing mechanics (use nuget-trusted-publishing).
Trending skills
7-day visitors to each skill page
Ships in ancplua-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Provenance: every TFM in this skill was read directly from the .csproj files in ~/RiderProjects/qyl-workspace on 2026-06-13 — not remembered, not assumed. Counts at that time: 75 project targets on net10.0, 7 on netstandard2.0. The exact per-project list lives in references/project-tfm-map.md; re-derive it any time with the command at the bottom of this file. Treat anything you remember about "generators can use modern .NET" as wrong here.
🚨 The compiler hosts source generators and analyzers in a
netstandard2.0process. Any project that ships INTO the Roslyn compiler must benetstandard2.0— it cannot see the net10 BCL. This is the one fact that, missed, produces a green-on-your-machine edit that breaks the build for everyone.
Two opposite mistakes, both common, both wrong in this workspace:
System.Text.Json / HashCode / ArgumentNullException.ThrowIfNull / a Span BCL overload." — ❌ No. Those are net10 runtime APIs and the project is netstandard2.0. Use the polyfilled equivalent (see the cookbook).netstandard2.0, so no records, no init, no required, no collection expressions." — ❌ Also no. LangVersion=latest applies even on the island, and ANcpLua.Roslyn.Utilities.Sources (source-only, PrivateAssets=all) ships the compiler-required attributes. Modern C# syntax is fully legal; only the net10 runtime API surface is not.The dividing line is syntax (allowed) vs runtime BCL (not), not "old framework = old language." Get that one distinction right and almost every island question answers itself. Details and the substitution table: references/netstandard20-cookbook.md.
Use this skill whenever you are working anywhere under ~/RiderProjects/qyl-workspace and one of these is true:
agent-framework-dotnet-rootsource/ — that is upstream Microsoft source with its own TFM rules; this skill does not describe it.use nuget-trusted-publishing).Resolve TFM from the nearest enclosing .csproj, in this order (stop at the first that sets it):
<TargetFramework> / <TargetFrameworks>.Directory.Build.props (qyl and qyl-tracker-companion set <TargetFramework>net10.0</TargetFramework> there as the default; a project that does not override it is net10).# which TFM does the file I'm editing compile for?
f="src/Foo/Bar.cs"; d=$(dirname "$f")
while [ "$d" != "." ] && [ -z "$(ls "$d"/*.csproj 2>/dev/null)" ]; do d=$(dirname "$d"); done
grep -iE '<TargetFrameworks?>' "$d"/*.csproj || echo "inherits Directory.Build.props default (net10.0)"
Decision table:
| What the nearest csproj says | Group | Write code for… |
|---|---|---|
<TargetFramework>net10.0</TargetFramework> or nothing (inherits) | net10 baseline | Full modern BCL; keep it AOT/trim-safe |
<TargetFramework>netstandard2.0</TargetFramework> (+ IsRoslynComponent / analyzer) | Roslyn island | netstandard2.0 BCL only; modern syntax OK; polyfills via the source pack |
<TargetFrameworks>net10.0;netstandard2.0</TargetFrameworks> | multi-target lib | The netstandard2.0 lowest common denominator — it must compile on both |
⚠️ Two false friends.
Qyl.OpenTelemetry.SemanticConventions.Analyzers.DocsGeneratorlooks like an analyzer but is net10.0 (it is an Exe build tool, not loaded into the compiler).Qyl.AutoInstrumentation(the runtime lib) is net10.0 — only its siblingQyl.AutoInstrumentation.SourceGeneratorsis the island. Don't pattern-match on the name; read the csproj.
LangVersion=latest, Nullable=enable, ImplicitUsings=enable — SDK-owned. Full BCL.qyl/Directory.Build.props sets <WarningsAsErrors>CA1816;CA2000;CA2012;CA2016</WarningsAsErrors> with EnableNETAnalyzers. (Each repo's Directory.Build.props owns its exact set; check it.) Dispose IDisposables, pass CancellationToken, don't fire-and-forget ValueTask.WarningsAsErrors): the two qyl/internal/*generators*, the OTel SourceGeneration + Analyzers, and Qyl.AutoInstrumentation.SourceGenerators.net10.0;netstandard2.0) — Qyl.OpenTelemetry.SemanticConventions and .Incubating. Code here must compile on both legs, so it obeys the netstandard2.0 ceiling.💡 Adding a public
DiagnosticDescriptor? You must add a row toAnalyzerReleases.Unshipped.md(RS2000/RS2008 are live). The banned-API analyzer (RS0030) is on. Analyzer packs ship underanalyzers/dotnet/cs/, notlib/(NU5017 suppressed by design). These gates are easy to forget and fail the build.
Both blocks below live in a netstandard2.0 source-generator project (e.g. Qyl.AutoInstrumentation.SourceGenerators).
// ❌ BAD — net10 runtime BCL inside a netstandard2.0 generator: does NOT compile
var hash = System.HashCode.Combine(name, kind); // HashCode: netstandard2.1+
ArgumentNullException.ThrowIfNull(symbol); // ThrowIf*: net6+
var json = System.Text.Json.JsonSerializer.Serialize(m); // modern STJ: absent on ns2.0
// ✅ GOOD — same intent via the polyfills from ANcpLua.Roslyn.Utilities.Sources
var hash = HashCombiner.Combine(name, kind);
Guard.AgainstNull(symbol);
// a generator emits source text — build the string directly; don't serialize at generate time
// modern C# SYNTAX is fine here: LangVersion=latest + polyfilled compiler attributes
public sealed record AttributeModel(string Name, EquatableArray<string> Tags)
{
public required string SchemaUrl { get; init; } // 'required' + 'init' compile on ns2.0
}
| Pitfall | Symptom | Fix |
|---|---|---|
| net10 BCL call inside a generator | CS0103/CS1061 only in the *.SourceGenerators build | Swap for the polyfill — HashCode→HashCombiner, ArgumentNullException.ThrowIfNull→Guard, System.Text.Json→hand-rolled/EquatableArray (cookbook) |
Assuming records/init/required are banned on the island | Over-cautious rewrite to verbose boilerplate | They compile — the source pack ships IsExternalInit, RequiredMemberAttribute, CompilerFeatureRequiredAttribute |
| Editing a multi-target lib with a net10-only API | Builds on the net10 leg, fails the netstandard2.0 leg | Target the netstandard2.0 ceiling; or #if NET guard the net10-only branch |
| New analyzer diagnostic, no release-tracking row | RS2000/RS2008 build error | Add the descriptor to AnalyzerReleases.Unshipped.md |
| Reflection/codegen in a net10 library | Trim/AOT analyzer warning → error | Annotate ([RequiresUnreferencedCode]) or redesign to be trim-safe |
Before committing a change in a qyl project, confirm:
.csproj — not guessed from the folder or assembly name.netstandard2.0 (or a net10.0;netstandard2.0 leg): no net10 runtime BCL — polyfilled equivalents used instead.init / required compile on the island.DiagnosticDescriptor → a row was added to AnalyzerReleases.Unshipped.md.net10.0 library: the change stays AOT/trim-safe (no unbounded reflection or runtime codegen) and disposes / passes CancellationToken correctly.nuget-trusted-publishing — for publishing the NuGet packages these qyl projects produce.dotnet-test skill pack.cd ~/RiderProjects/qyl-workspace
for d in qyl Qyl.AutoInstrumentation Qyl.OpenTelemetry.SemanticConventions qyl-dotnet-autoinstrumentation qyl-api-schema qyl-tracker-companion; do
find "$d" -name '*.csproj' -print0 | xargs -0 grep -lE '<TargetFrameworks?>[^<]*netstandard2\.0' 2>/dev/null
done # everything else inherits net10.0
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub ancplua/ancplua-skills --plugin ancplua-skills43 skills in this plugin
/agent-log-scanScan agent transcripts and turn antipatterns into config and routine changes, not just an allowlist like fewer-permission-prompts. Use when asked to scan agent logs or session history, "why do my agents keep failing", "what happened across my sessions", to find retry loops, permission thrash, API dead-ends or limit interrupts, or raise autonomy./analyzer-purityKeep Roslyn analyzers, source generators and code fixes pure, loadable and cache-friendly inside every compiler host. Use when creating, changing, reviewing or packaging a netstandard2.0 project with IsRoslynComponent, EnforceExtendedAnalyzerRules or Microsoft.CodeAnalysis references, or when an RS1xxx/RS2xxx diagnostic, a sluggish IDE or a generator that reruns on every keystroke points at one./animation-vocabularyReverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one./apple-designApple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces./archcheck-evaluationDevelop and evaluate ArchCheck analysis - static rules SR1-SR6, runtime rules RT1-RT3, ownership inference, SARIF interpretation, finding aggregation, coverage. Use when changing a rule, analyzing repository or trace evidence, or making precision/recall or empirical result claims./c4-diagramGenerate C4 Container diagrams using C4 model conventions as editable .drawio XML files. Use when the user asks for architecture diagrams, system diagrams, C4 diagrams, container diagrams, or wants to visualize system architecture. Also use proactively when explaining systems with 3+ components where a visual would clarify the architecture.