techmefr/mentis/dotnet-null-pattern-matching

Claude Code and agent skill by techmefr/mentis

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when testing a value for null: prefer the pattern form (is null / is not null) over the equality operator — and never == inside an equality operator's own body, that's infinite recursion, not a style choice.

Install

npx vskill@latest install techmefr/mentis/dotnet-null-pattern-matching

SKILL.md

The same SKILL.md was published earlier as techmefr/mentis/dotnet-null-pattern-matching.

dotnet-null-pattern-matching

Narrow trigger extracted from skills/dotnet-conventions §5.6, so a null check routes here directly instead of only through the whole .NET block.

When

Writing or reviewing a null check — especially inside a type's own operator ==/Equals override, where the wrong form is a functional bug, not just a style deviation.

Steps

  1. Test null with the pattern form (is null / is not null) rather than the equality operator,

and avoid the roundabout not-null spellings.

  1. This is a preference in ordinary code — an informed override is fine.
  2. Inside an equality-operator body, using the equality operator is infinite recursion, not a

style choice. is null/is not null is the only correct form there, because == calls the very operator being defined.

Output / checkpoint

Null checks in the diff use is null/is not null; any operator ==/Equals override in the diff never compares to null with == inside its own body.

Guardrails

  • The pattern form isn't just style inside an overload — a type that overrides == and then checks

x == null inside that same overload recurses until it stack-overflows, which is why this is a correctness rule at that one call site specifically.

  • The rest of the disposal/nullability/enumeration section lives in skills/dotnet-conventions §5 —

read it for the neighbouring rules this one sits beside.

Origin

No external source: this is skills/dotnet-conventions §5.6 extracted to its own trigger. Written 2026-09-09, same restructuring pilot as laravel-no-db-enums.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/techmefr/mentis/dotnet-null-pattern-matching/badge)](https://verified-skill.com/skills/techmefr/mentis/dotnet-null-pattern-matching)

Something wrong with this skill or its page? Tell us.