create-test-builder
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "create-test-builder":https://skillpi.com/zh/skills/deepskill-e35875a52ed5d96e651ae3b149b12dce4818fba45f57513ad04e74f7e7f11faa。安装前核对上游来源和版本:https://github.com/dykyi-roman/awesome-claude-code。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
为 PHP 8.4 生成测试数据构建器(Test Data Builder)和对象母亲(Object Mother)模式的库。创建带有合理默认值和工厂方法的流式构建器,便于在测试中生成可定制的对象实例。
介绍来源: third_party · dykyi-roman · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: create-test-builder
description: Generates Test Data Builder and Object Mother patterns for PHP 8.4. Creates fluent builders with sensible defaults and factory methods for test data creation.Test Data Builder Generator
Generates Test Data Builder and Object Mother patterns for test data creation.
Patterns
Test Data Builder
Fluent interface for constructing test objects with customizable properties.
When to use:
- Complex objects with many properties
- Need to customize specific properties per test
- Want to express test intent clearly
Object Mother
Factory methods returning pre-configured objects for common scenarios.
When to use:
- Standard test fixtures (default user, pending order)
- Shared across many tests
- Named scenarios (premium customer, expired subscription)
References
references/templates.md— Builder and Object Mother class templatesreferences/examples.md— Complete Order example with Value Object builders and usage
Generation Instructions
-
Analyze the target class:
- Constructor parameters
- Required vs optional properties
- Value objects used
- State transitions (for entities)
-
Determine sensible defaults:
- Generate IDs automatically
- Use common/valid values
- Consider relationships
-
Create Builder with:
- Private constructor with defaults
- Static factory method (
aOrder,anEmail) with*methods for each property- Immutable (clone in each method)
build()method
-
Create Mother with:
default()method- Named scenarios (
pending,confirmed,premium) - Parameterized methods (
forCustomer,withTotal)
-
File placement:
- Builders:
tests/Builder/{ClassName}Builder.php - Mothers:
tests/Mother/{ClassName}Mother.php
- Builders:
Best Practices
- Sensible defaults — Tests should work without customization
- Fluent interface — Chain method calls
- Immutable builders — Clone in each
with*method - Expressive names —
pending()notwithStatus(pending) - Composition — Builders can use other Mothers/Builders
- Single Responsibility — One builder per aggregate/entity
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 为PHP 8.4生成测试数据构建器,解决测试数据创建的通用痛点
- 支持Test Data Builder和Object Mother两种模式,覆盖多种测试场景
- 提供清晰的生成指令和最佳实践,实用性强
亮点
- 触发词精准完整,覆盖多种变体,边界清晰
- description明确描述了Skill的核心功能和用途
待提升项
-
引用文件缺失 原报告严重程度:轻微
SKILL.md引用了references/templates.md和references/examples.md文件,但未传入这些文件
改进建议:请确保所有被引用的文件都包含在Skill包中,或移除引用
亮点
- Phase/步骤清晰,有出口条件
- 包含端到端示例和最佳实践
- frontmatter完整
亮点
- 工具来源明确,参数正确
- 覆盖主要异常,提供了详细的生成指令
- 不可逆操作有确认机制(通过明确的步骤指导)
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。