什么是 test-implement-constructor-validation?
从服务类签名自动生成构造函数验证测试。 在为新服务创建测试、验证快速失败原则时使用 确保构造函数验证或测试所需参数。分析 服务 __init__ 方法并生成 pytest.raises(ValueError) 测试 对于每个必需的参数。适用于以下 Python 服务类 依赖注入模式。高自动化机会(100+ 测试类 使用此模式)。 来源:dawiddutoit/custom-claude。
从服务类签名自动生成构造函数验证测试。 在为新服务创建测试、验证快速失败原则时使用 确保构造函数验证或测试所需参数。分析 服务 __init__ 方法并生成 pytest.raises(ValueError) 测试 对于每个必需的参数。适用于以下 Python 服务类 依赖注入模式。高自动化机会(100+ 测试类 使用此模式)。
通过命令行快速安装 test-implement-constructor-validation AI 技能到你的开发环境
来源:dawiddutoit/custom-claude。
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.
从服务类签名自动生成构造函数验证测试。 在为新服务创建测试、验证快速失败原则时使用 确保构造函数验证或测试所需参数。分析 服务 __init__ 方法并生成 pytest.raises(ValueError) 测试 对于每个必需的参数。适用于以下 Python 服务类 依赖注入模式。高自动化机会(100+ 测试类 使用此模式)。 来源:dawiddutoit/custom-claude。
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/dawiddutoit/custom-claude --skill test-implement-constructor-validation从服务类签名自动生成构造函数验证测试。 在为新服务创建测试、验证快速失败原则时使用 确保构造函数验证或测试所需参数。分析 服务 __init__ 方法并生成 pytest.raises(ValueError) 测试 对于每个必需的参数。适用于以下 Python 服务类 依赖注入模式。高自动化机会(100+ 测试类 使用此模式)。 来源:dawiddutoit/custom-claude。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/dawiddutoit/custom-claude --skill test-implement-constructor-validation 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/dawiddutoit/custom-claude