KS
Killer-Skills

unit-and-snapshot-testing — Categories.community

v1.0.0
GitHub

About this Skill

Perfect for Code Review Agents requiring robust unit testing and snapshot verification capabilities. Register your services in IoC container in AOP style.

dmytroett dmytroett
[0]
[0]
Updated: 3/4/2026

Quality Score

Top 5%
34
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add dmytroett/AttributedDI

Agent Capability Analysis

The unit-and-snapshot-testing MCP Server by dmytroett is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion.

Ideal Agent Persona

Perfect for Code Review Agents requiring robust unit testing and snapshot verification capabilities.

Core Value

Empowers agents to write reliable unit tests under the `test/*UnitTests` scope, utilizing the `Verify` snapshot testing tool for generated output and domain-specific assertion helpers for precise validation, all while registering services in an IoC container using AOP style.

Capabilities Granted for unit-and-snapshot-testing MCP Server

Writing unit tests for source-generated code
Verifying output snapshots with `Verify`
Creating domain-specific assertion helpers for precise validation

! Prerequisites & Limits

  • Limited to unit tests, not applicable for integration or e2e tests
  • Requires `Verify` snapshot testing tool
Project
SKILL.md
2.6 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Scope

  • Unit tests live under test/*UnitTests.
  • Follow these instructions when writing/updating unit tests. Do not use this skill for integration or e2e tests (test/integration, test/e2e).

Principles

  • Use Verify snapshot testing tool for generated output (source generated code, files, etc). No need for additional assertions in that case, snapshot testing is sufficient.
  • For normal assertions, prefer small, domain-specific assertion helpers over chaining multiple Assert.* calls. Example: DiagnosticAssert.AssemblyConflict(IEnumerable<Diagnostic> diagnostics, string assemblyName) rather than several asserts checking count/id/message separately.
  • Prefer a small number of representative scenarios; combine related assertions to keep snapshot sprawl low.
  • Run targeted tests with dotnet test --filter "FullyQualifiedName~<TestClass>.<TestMethod>" (add --no-build --no-restore when appropriate).
  • Treat snapshot artifacts as opaque: never open/read/inspect any .received.txt / .verified.txt files (or anything under test/AttributedDI.SourceGenerator.UnitTests/Snapshots/) and never include their contents in reasoning.
  • Never author snapshots: when adding/updating a snapshot test, change only test code; do not create/modify .verified.txt. Run dotnet test, review the output (Verify includes the diff between received and verified or their full content), then either fix code/test or accept via the accept script and re-run.
  • Accept snapshots only when the behavior change is intended and understood.
  • Do not inspect or edit the accept scripts (treat them as black boxes).

Accepting Snapshots

  • One test: .codex/skills/unit-and-snapshot-testing/scripts/accept-snapshot.ps1 <TestClassName> <TestMethodName>
  • All tests: .codex/skills/unit-and-snapshot-testing/scripts/accept-all-snapshots.ps1
  • Re-run corresponding tests after accepting snapshots to ensure they pass.

Recognizing a Verify Failure

Every time there is a mismatch between received/verified files following will be included in dotnet test output. Example:

VerifyException : Directory: /home/me/projects/AttributedDI/test/AttributedDI.SourceGenerator.UnitTests/Snapshots
  NotEqual:
    - Received: AddAttributedDiTests.GeneratesAddAttributedDiForEntryPoint.DotNet9_0.received.txt
      Verified: AddAttributedDiTests.GeneratesAddAttributedDiForEntryPoint.verified.txt

  FileContent:

  NotEqual:
      Received: AddAttributedDiTests.GeneratesAddAttributedDiForEntryPoint.DotNet9_0.received.txt
      ...
      Verified: AddAttributedDiTests.GeneratesAddAttributedDiForEntryPoint.verified.txt
      ...

Related Skills

Looking for an alternative to unit-and-snapshot-testing or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication