Dotnet verify

From NikiforovAll/claude-code-rules · View interactive version

Dotnet verify is an AI agent skill from the GitHub repository NikiforovAll/claude-code-rules. This skill should be used when working with Verify snapshot tests in .NET projects. Use when updating verified snapshots after intentional code changes, accepting new snapshots, discovering verify tests, or troubleshooting snapshot mismatches. Trigger phrases include "verify tests", "update snapshot

How to use this skill

Skill file

.NET Verify Snapshot Testing

Manage Verify snapshot tests using the verify.tool dotnet local tool.

Discovery

To list all test files using Verify snapshots:

rg -l "Verifier\.Verify|UsesVerify|\.verified\." --type cs

To scope to a specific directory:

rg -l "Verifier\.Verify|UsesVerify|\.verified\." --type cs <path/to/test/directory>

Update Snapshots

To update snapshots after intentional code changes:

  1. Build the solution:

```bash

dotnet build -p:WarningLevel=0 /clp:ErrorsOnly --verbosity minimal

```

  1. Run affected verify tests (they fail, generating .received. files):

```bash

dotnet test <test-project> --no-build --filter "FullyQualifiedName~<TestClass>" -v m

```

  1. Accept all new snapshots:

```bash

dotnet verify accept -y

```

To scope to a specific directory:

```bash

dotnet verify accept -y -w <path/to/test/directory>

```

  1. Re-run tests to confirm they pass:

```bash

dotnet test <test-project> --no-build --filter "FullyQualifiedName~<TestClass>" -v m

```

File Conventions

Quick Reference

| Command | Purpose |

|---|---|

| dotnet verify accept -y | Accept all pending snapshots |

| dotnet verify accept -y -w <dir> | Accept snapshots in specific directory |

| rg -l "Verifier\.Verify\|UsesVerify\|\.verified\." --type cs | List all test files using Verify |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.