·test-implement-constructor-validation
</>

test-implement-constructor-validation

Auto-generate constructor validation tests from service class signatures. Use when creating tests for new services, validating fail-fast principle, ensuring constructor validation, or testing required parameters. Analyzes service __init__ methods and generates pytest.raises(ValueError) tests for each required parameter. Works with Python service classes following dependency injection pattern. High automation opportunity (100+ test classes use this pattern).

4Installs·0Trend·@dawiddutoit

Installation

$npx skills add https://github.com/dawiddutoit/custom-claude --skill test-implement-constructor-validation

How to Install test-implement-constructor-validation

Quickly install test-implement-constructor-validation AI skill to your development environment via command line

  1. Open Terminal: Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.)
  2. Run Installation Command: Copy and run this command: npx skills add https://github.com/dawiddutoit/custom-claude --skill test-implement-constructor-validation
  3. Verify Installation: Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Source: dawiddutoit/custom-claude.

SKILL.md

View raw

Automatically generate comprehensive constructor validation tests for service classes that follow the fail-fast principle. This skill ensures every required parameter has a corresponding test that validates the service raises ValueError when that parameter is None.

Fixture Exclusion Pattern: Each validation test excludes the fixture for the parameter being tested:

For a complex service with 5 parameters, follow the same pattern as Example 1 above. Create a test class with fixtures for each parameter, a success case test, and one validation failure test for each required parameter. See references/reference.md for detailed pattern analysis and edge cases.

Auto-generate constructor validation tests from service class signatures. Use when creating tests for new services, validating fail-fast principle, ensuring constructor validation, or testing required parameters. Analyzes service __init__ methods and generates pytest.raises(ValueError) tests for each required parameter. Works with Python service classes following dependency injection pattern. High automation opportunity (100+ test classes use this pattern). Source: dawiddutoit/custom-claude.

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/dawiddutoit/custom-claude --skill test-implement-constructor-validation
Category
</>Dev Tools
Verified
First Seen
2026-02-25
Updated
2026-03-11

Browse more skills from dawiddutoit/custom-claude

Quick answers

What is test-implement-constructor-validation?

Auto-generate constructor validation tests from service class signatures. Use when creating tests for new services, validating fail-fast principle, ensuring constructor validation, or testing required parameters. Analyzes service __init__ methods and generates pytest.raises(ValueError) tests for each required parameter. Works with Python service classes following dependency injection pattern. High automation opportunity (100+ test classes use this pattern). Source: dawiddutoit/custom-claude.

How do I install test-implement-constructor-validation?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/dawiddutoit/custom-claude --skill test-implement-constructor-validation Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Where is the source repository?

https://github.com/dawiddutoit/custom-claude