cs0618-hunter
Skill14 starsChanged 4 months agoMITView on GitHub
Detects and fixes CS0618 obsolete API warnings in .NET builds. The compiler is the authoritative source for what your project actually triggers — it catches transitive obsoletions, overload-resolution surprises, and project-local [Obsolete] attributes that static inspection cannot see. Pair with the repository-pinned dotnet-inspect@0.9.1 for the static / pre-build view.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- dotnet-inspectSkill
- maf-anti-pattern-scannerSkill
- maf-doctor-self-evolutionSkill
- maf-fan-out-validatorSkill
- maf-from-semantic-kernelSkill
- maf-issue-reporterSkill
- maf-migration-guideSkill
- maf-migration-plan-creatorSkill
- maf-migration-retrospectiveSkill
- maf-obsolete-api-registrySkill
- maf-release-watcherSkill
- maf-remediation-playbookSkill
- maf-workflow-smoke-testerSkill
- nuget-diff-analyzerSkill
The file
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 22
When MafRunCs0618Hunt is unavailable:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
cs0618-hunter — compiler ground-truth for obsolete API usage
⚡ Prefer the MCP tool. The
maf-autopilotMCP server exposesMafRunCs0618Hunt(projectPath)— it shellsdotnet build, parses every CS0618 / CS0246 diagnostic, joins each one to its canonical fix in the obsolete-API registry, and returns a structured report. The procedural walkthrough below is preserved for when you need to run the steps manually (offline, debugging the tool itself, etc.).
Why the compiler stays authoritative
dotnet-inspect@0.7.8 was the first release to surface [Obsolete] in member listings (PR #318 closes issue #316); this repository pins 0.9.1. That's an excellent pre-build static check, but three classes of obsoletion remain compiler-only:
- Transitive obsoletions — the API your code calls isn't obsolete, but it forwards to one that is.
- Overload-resolution surprises — a more-specific overload was added in a minor release and your literal types now bind to it.
- Project-local
[Obsolete]— types your team marked obsolete in this solution. Static inspection of NuGet packages can't see those.
For all three, dotnet build | Select-String "warning CS0618" is the only authoritative answer.
Manual fallback workflow
When MafRunCs0618Hunt is unavailable:
# Step 1: get the baseline
dotnet build 2>&1 | Select-String "warning CS0618"
# Step 2: for each warning, look up the canonical fix in the registry
# (the LLM should call MafRegistryLookup with the matching entry ID,
# or open .github/skills/maf-obsolete-api-registry/registry.yaml)
# Step 3: apply the fix; re-run the build; confirm the warning is gone
# Step 4: move on to the next warning. Never batch.
# Step 5: declare done only when:
dotnet build 2>&1 | Select-String "warning CS0618" | Measure-Object | Select-Object -ExpandProperty Count
# returns 0.Quick reference
| Command | Purpose |
MafRunCs0618Hunt(projectPath) (MCP) | Full automated CS0618/CS0246 hunt |
MafApiSafety(apiName) (MCP) | Is a single API safe? (registry only) |
MafRegistryLookup(entryId) (MCP) | Full fix details for entry ID |
dotnet build 2>&1 | Select-String "CS0618" | Manual baseline scan |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

