Agent skill
testing-domain
Write domain and unit tests for the widget host app. Use when testing entities, value objects, invariants, domain services, and application logic with deterministic fixtures.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/testing/testing-domain
SKILL.md
Testing Domain
Overview
Validate domain rules and invariants without UI or infrastructure dependencies.
Focus areas
- Entity and value object behavior
- Aggregate invariants
- Domain services
- Application use cases (when pure)
Definition of done (DoD)
- New domain logic has corresponding unit tests
- Tests cover happy path + at least one edge/error case
- Tests are deterministic (no random, no DateTime.Now)
- Tests run in under 1 second each
- No infrastructure/UI dependencies in domain tests
Workflow
- Build fixtures for domain objects.
- Test invariants and edge cases.
- Keep tests fast and deterministic.
- Avoid infrastructure dependencies.
Guidance
- Use builders/factories to reduce test setup noise.
- Prefer explicit assertions over snapshots.
- Name tests after the rule being validated.
References
references/fixtures.mdfor fixture patterns.references/invariant-tests.mdfor invariant coverage.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?