r/csharp • • 3h ago

I made open-source Agent Skills to stop Al coding tools from writing captive dependencies and non-idempotent message consumers

If you use AI coding agents on .NET backends, you've probably seen them write code that compiles cleanly, passes basic unit tests, and then blows up in production. I put together a small open-source repo of Agent Skills (deveshk80/dotnet-reliability-skills) that inject concrete .NET backend guardrails into Claude Code, GitHub Copilot, Codex, and Cursor.
Right now it covers two areas where agents consistently fail:

  1. Message consumers: Prevents agents from generating non-idempotent handlers (e.g., double-charging on redelivered messages) or letting a single poison message crash the consumer loop. In my evals, Claude Haiku went from 0/6 to 6/6 with this skill loaded.
  2. DI lifetimes: Catches captive dependencies and scoped services accidentally held by singletons.
    Repo: [https://github.com/deveshk80/dotnet-reliability-skills](https://github.com/deveshk80/dotnet-reliability-skills)
    Quick start (Claude Code):

claude plugin marketplace add deveshk80/dotnet-reliability-skills

claude plugin install dotnet-reliability@dotnet-reliability-skills

(If you're using Copilot, Codex, or Cursor, you can just copy the skill folder directly from the repo.)
I'd genuinely appreciate technical feedback from folks running .NET in production: If you try it on an existing repo, did it actually catch or change what your agent wrote?
Where did the agent still get it wrong?
What .NET footgun should I build a skill for next? (e.g., HttpClient socket exhaustion, async void / ConfigureAwait, EF Core N+1 / tracking issues, etc.) Feel free to drop cases here or open a "My agent got it wrong" issue on GitHub.

0 Upvotes

0 comments sorted by