dotnet-verify
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 snapshots", "accept snapshots", "verified files", ".verified.txt".
适合你,如果使用 .NET 项目的 Verify 快照测试并需要管理测试结果。
npx oh-my-skill add nikiforovall/claude-code-rules/dotnet-verifycurl -fsSL https://oh-my-skill.com/install.sh | bash -s -- nikiforovall/claude-code-rules/dotnet-verifynpx oh-my-skill verify nikiforovall/claude-code-rules/dotnet-verify怎么用
商店整理自技能原文 · 版本 642e21e · 表述以原文为准当您需要管理.NET项目中的Verify快照测试时,Claude可以帮您发现测试文件、更新快照、接受新快照等操作。
当您提到“verify tests”、“update snapshots”、“accept snapshots”等关键词,或者需要处理.verified.txt文件时触发。
技能原文 SKILL.md
.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:
- Build the solution: ```bash dotnet build -p:WarningLevel=0 /clp:ErrorsOnly --verbosity minimal ```
- Run affected verify tests (they fail, generating
.received.files): ```bash dotnet test <test-project> --no-build --filter "FullyQualifiedName~<TestClass>" -v m ```
- 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> ```
- Re-run tests to confirm they pass: ```bash dotnet test <test-project> --no-build --filter "FullyQualifiedName~<TestClass>" -v m ```
File Conventions
ClassName.MethodName.verified.txt— accepted snapshot (committed to git)ClassName.MethodName.received.txt— latest test output (not committed, gitignored)- Parameterized tests:
ClassName.MethodName_param=value.verified.txt
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 |