csharp-compiler-warnings
Skill1 starsChanged 4 months agoMITView on GitHub
Non-nullability C# compiler warning meanings and examples
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Use this skill for enabled C# compiler diagnostics that are not nullable-reference warnings.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
C# compiler warnings
C# compiler diagnostics (CS)
Use this skill for enabled C# compiler diagnostics that are not nullable-reference warnings. For nullable CS8xxx warnings, use ../nullability-warnings/SKILL.md.
CS0162 - Unreachable code detected
What it flags: The C# compiler reported code that is unreachable, unused, malformed, or inconsistent with language rules.
Example:
- Bad: code after
return,throw, or an always-false branch. - Fix: remove the unreachable statement or correct the control flow.
CS0168 - Variable is declared but never used
What it flags: The C# compiler reported code that is unreachable, unused, malformed, or inconsistent with language rules.
Example:
- Bad:
catch (Exception ex) { LogFailure(); }without usingex. - Fix: remove the variable or use it, for example in logging.
CS0219 - Variable is assigned but its value is never used
What it flags: The C# compiler reported code that is unreachable, unused, malformed, or inconsistent with language rules.
Example:
- Bad:
var result = Calculate();andresultis never read. - Fix: remove the assignment or use the value.
CS0628 - New protected member declared in sealed type
What it flags: The C# compiler reported code that is unreachable, unused, malformed, or inconsistent with language rules.
Example:
- Bad:
protected void M()in a sealed class. - Fix: make the member private or unseal the class if inheritance is intended.
CS1696 - Single-line comment or end-of-line expected
What it flags: The C# compiler reported code that is unreachable, unused, malformed, or inconsistent with language rules.
Example:
- Bad: malformed preprocessor or comment syntax near a directive.
- Fix: correct the directive/comment so the compiler can parse the line.
CS1998 - Async method lacks await operators
What it flags: The C# compiler reported code that is unreachable, unused, malformed, or inconsistent with language rules.
Example:
- Bad:
async Task SaveAsync() { Save(); }with noawait. - Fix: remove
asyncand return a completed task, or await real async work.
In this repository73 other files it gives its agents.
- unsafe-checker/AGENTS.mdAGENTS.md
- activity-tracingSkill
- beadsSkill
- code-analysis-warningsSkill
- coding-guidelinesSkill
- compiler-warningsSkill
- core-actionbookSkill
- core-agent-browserSkill
- core-dynamic-skillsSkill
- core-fix-skill-docsSkill
- csharp-object-designSkill
- domain-cliSkill
- domain-cloud-nativeSkill
- domain-embeddedSkill
- domain-fintechSkill
- domain-iotSkill
- domain-mlSkill
- domain-webSkill
- dotnet-pinvokeSkill
- dreamSkill
- gitSkill
- ide-warningsSkill
- karpathy-guidelinesSkill
- m01-ownershipSkill
- m02-resourceSkill
- m03-mutabilitySkill
- m04-zero-costSkill
- m05-type-drivenSkill
- m06-error-handlingSkill
- m07-concurrencySkill
- m09-domainSkill
- m10-performanceSkill
- m11-ecosystemSkill
- m12-lifecycleSkill
- m13-domain-errorSkill
- m14-mental-modelSkill
- m15-anti-patternSkill
- mermaidSkill
- meta-cognition-parallelSkill
- modern-csharpSkill
- msbuild-warningsSkill
- mx-creative-keypadSkill
- nuget-warningsSkill
- nullability-warningsSkill
- rcs-warningsSkill
- renpySkill
- rust-call-graphSkill
- rust-code-navigatorSkill
- rust-dailySkill
- rust-deps-visualizerSkill
- rust-google-styleSkill
- rust-learnerSkill
- rust-object-designSkill
- rust-refactor-helperSkill
- rust-routerSkill
- rust-skill-creatorSkill
- rustSkill
- rust-symbol-analyzerSkill
- rust-trait-explorerSkill
- translationsSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

