From dotnet Claude Kit
Runs a 7-phase verification pipeline for .NET projects: build, analyzers, antipatterns, tests, security, formatting, and diff review. Use before PRs or after features/refactors.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dotnet-claude-kit:verifyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Runs a sequential, 7-phase verification pipeline that catches issues at every level --
Runs a sequential, 7-phase verification pipeline that catches issues at every level -- from compiler errors to subtle antipatterns to formatting drift. Each phase produces an explicit PASS, WARN, or FAIL with details. "It looks fine" is not a verification result; a table of statuses is. Critical failures (Phase 1 build, Phase 4 tests) short-circuit the pipeline because later phases cannot produce meaningful results on broken code.
The pipeline answers one question: "Is this code ready for review?"
| Phase | Tool | What It Catches | Critical |
|---|---|---|---|
| 1. Build | dotnet build | Compilation errors, missing references | Yes |
| 2. Diagnostics | get_diagnostics (MCP) | New analyzer warnings, nullability issues | FAIL on new errors |
| 3. Antipatterns | detect_antipatterns (MCP) | async void, sync-over-async, DateTime.Now, more | No |
| 4. Tests | dotnet test | Failing tests, regressions | Yes |
| 5. Security | dotnet list package --vulnerable + scan | Secrets, SQL injection, missing auth, vulnerable packages | FAIL on critical/high |
| 6. Format | dotnet format --verify-no-changes | Style drift, formatting inconsistencies | No |
| 7. Diff Review | git diff analysis | Accidental changes, debug leftovers, TODOs | No |
Full pipeline is the default. For scoped changes, run a subset:
| Scenario | Phases | Notes |
|---|---|---|
| Feature complete / Pre-PR / new endpoint | All 7 | No shortcuts |
| Bug fix | 1, 2, 4 | Add a test first if none covers it |
| After refactor | 1, 2, 3, 4 | Correctness focus; add 5-7 if security-sensitive |
| Dependency update | 1, 4, 5 | Build, tests, vulnerability scan |
| Config or test-only change | 1, 4 | Build and test |
| Formatting only | 6 | Format check is sufficient |
When in doubt, run all 7. Extra phases cost minutes; a missed security issue costs days of incident response. Never cherry-pick phases because a change "looks safe".
dotnet build --no-restore --verbosity quiet
Use the Roslyn MCP get_diagnostics tool, scoped to changed files/projects
(full solution for cross-cutting changes). Compare against baseline -- flag only
NEW warnings introduced by the current changes. Common findings: CS8600/CS8602
(nullability), CS0219 (unused variable).
Output: PASS (0 new) / WARN (new warnings) / FAIL (new errors). Treat new warnings as work -- today's CS8600 is next month's production NullReferenceException.
Use the Roslyn MCP detect_antipatterns tool on changed files (full project for
broad changes). Catches: async void, sync-over-async (.Result,
.GetAwaiter().GetResult()), new HttpClient(), DateTime.Now/UtcNow instead
of TimeProvider, broad catch (Exception), string interpolation in logging,
missing CancellationToken, EF read queries without AsNoTracking.
Output: PASS (0 findings) / WARN (findings) / FAIL (critical antipatterns)
dotnet test --no-build --verbosity quiet
Output: PASS (all green) or FAIL (failing test names + error messages)
dotnet list package --vulnerable --include-transitive
Then review changed files for: hardcoded secrets/connection strings/API keys,
SQL injection (raw SQL without parameterization), missing [Authorize] on
endpoints that need it, permissive CORS, missing input validation, disabled
HTTPS or certificate validation.
Output: PASS / WARN (medium/low findings) / FAIL (critical/high vulnerabilities)
dotnet format --verify-no-changes --verbosity quiet
Reports drift without auto-fixing. To resolve, run dotnet format and include
the changes in the commit. If no .editorconfig exists, note it as a recommendation.
Output: PASS / WARN (with file list)
Analyze git diff --stat and git diff (staged + unstaged) for:
.vs/, bin/, obj/, .env, secrets)Console.WriteLine, #if DEBUG in production paths)Output: PASS (clean, matches intent) / WARN (with findings)
A single pass rarely produces all-green. The loop is the point:
## Verification Results
| Phase | Result | Details |
|-------|--------|---------|
| 1. Build | PASS | 0 errors, 0 warnings |
| 2. Diagnostics | PASS | 0 new diagnostics |
| 3. Antipatterns | WARN | 1 missing CancellationToken |
| 4. Tests | PASS | 47 passed, 0 failed |
| 5. Security | PASS | No findings |
| 6. Format | PASS | Clean |
| 7. Diff Review | WARN | 1 TODO marker found |
**Verdict: READY FOR REVIEW** (with 2 non-blocking warnings)
Verdicts: READY FOR REVIEW (all PASS, or only non-blocking WARNs) or NEEDS FIXES (any FAIL, with specific remediation steps). For pre-PR runs, include the verification report in the PR description.
User: /verify
Claude: Running 7-phase verification pipeline...
Phase 1: Build ............ PASS (0 errors)
Phase 2: Diagnostics ...... PASS (0 new warnings)
Phase 3: Antipatterns ..... WARN
- src/Features/Orders/CreateOrder.cs:42 -- DateTime.Now usage, use TimeProvider
Phase 4: Tests ............ PASS (23 passed, 0 failed, 0 skipped)
Phase 5: Security ......... PASS
Phase 6: Format ........... PASS
Phase 7: Diff Review ...... PASS
Verdict: READY FOR REVIEW (1 non-blocking warning)
Recommendation: Replace DateTime.Now with TimeProvider on line 42 before
merging. Not blocking, but it will fail the antipattern check in CI.
/build-fix -- Auto-fix build errors when Phase 1 fails/code-review -- Multi-dimensional review once verification passes/health-check -- Whole-project graded assessment (beyond this change set)npx claudepluginhub codewithmukesh/dotnet-claude-kit --plugin dotnet-claude-kitMulti-dimensional .NET code review combining Roslyn analysis (antipatterns, diagnostics, references, dependency graphs) with blast-radius scoring to prioritize risky changes over style.
Runs a multi-phase verification loop including build, type check, lint, tests, security scan, and diff review. Useful before creating a PR or after significant changes.
Runs phased verification: build, types, lint, tests with coverage, security scans for secrets/console.log, and git diff review before PRs or after changes.