create-test-builder
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "create-test-builder" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-e35875a52ed5d96e651ae3b149b12dce4818fba45f57513ad04e74f7e7f11faa. Verify the upstream source and version against https://github.com/dykyi-roman/awesome-claude-code before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
A library to generate Test Data Builders and Object Mother patterns for PHP 8.4. Creates fluent builders with sensible defaults and factory methods to produce customizable object instances for testing.
Introduction source: third_party · dykyi-roman · 0.0.1 Reference
SkillPi interpretation
- Tasks
- 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.
- Testing
- Not tested
Browse files
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
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 为PHP 8.4生成测试数据构建器,解决测试数据创建的通用痛点
- 支持Test Data Builder和Object Mother两种模式,覆盖多种测试场景
- 提供清晰的生成指令和最佳实践,实用性强
Highlights
- 触发词精准完整,覆盖多种变体,边界清晰
- description明确描述了Skill的核心功能和用途
Areas to improve
-
Missing referenced files Reported severity: Minor
SKILL.md引用了references/templates.md和references/examples.md文件,但未传入这些文件
Recommendation: 请确保所有被引用的文件都包含在Skill包中,或移除引用
Highlights
- Phase/步骤清晰,有出口条件
- 包含端到端示例和最佳实践
- frontmatter完整
Highlights
- 工具来源明确,参数正确
- 覆盖主要异常,提供了详细的生成指令
- 不可逆操作有确认机制(通过明确的步骤指导)
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.