unit-and-snapshot-testing — community unit-and-snapshot-testing, AttributedDI, community, ide skills, Claude Code, Cursor, Windsurf

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/5/2026

Agent Capability Analysis

The unit-and-snapshot-testing skill by dmytroett is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

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

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
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

unit-and-snapshot-testing

Install unit-and-snapshot-testing, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command...

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
      ...

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is unit-and-snapshot-testing?

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

How do I install unit-and-snapshot-testing?

Run the command: npx killer-skills add dmytroett/AttributedDI/unit-and-snapshot-testing. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for unit-and-snapshot-testing?

Key use cases include: Writing unit tests for source-generated code, Verifying output snapshots with `Verify`, Creating domain-specific assertion helpers for precise validation.

Which IDEs are compatible with unit-and-snapshot-testing?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for unit-and-snapshot-testing?

Limited to unit tests, not applicable for integration or e2e tests. Requires `Verify` snapshot testing tool.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add dmytroett/AttributedDI/unit-and-snapshot-testing. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use unit-and-snapshot-testing immediately in the current project.

Related Skills

Looking for an alternative to unit-and-snapshot-testing or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

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
AI

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
AI