dykyi-roman/awesome-claude-code/create-builder
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Generates Builder pattern for PHP 8.4. Creates step-by-step object construction with fluent interface and validation. Includes unit tests.
Install
npx vskill@latest install dykyi-roman/awesome-claude-code/create-builderSKILL.md
Builder Pattern Generator
Creates Builder pattern infrastructure for step-by-step construction of complex objects.
When to Use
| Scenario | Example | |
|---|---|---|
| Many constructor parameters | Order with 10+ fields | |
| Optional parameters | Email with optional CC, BCC | |
| Complex validation | Build-time validation | |
| Step-by-step construction | Query building | |
| Multiple representations | Different order types |
Component Characteristics
Builder Interface
- Defines building steps
- Returns self for fluent interface
- Has build() method for final product
Concrete Builder
- Implements building steps
- Maintains product state
- Validates before building
Director (Optional)
- Defines construction order
- Reusable build sequences
- Hides complexity from client
Generation Process
Step 1: Analyze Requirements
Determine:
- Target product class
- Required vs optional properties
- Validation rules
- Whether Director is needed
Step 2: Generate Builder Components
Path: src/Domain/{BoundedContext}/Builder/
{Name}BuilderInterface.php— Builder contract{Name}Builder.php— Concrete builder implementationBuilderValidationException.php— Validation exception{Name}Director.php— Optional director for common builds
Step 3: Generate Tests
Path: tests/Unit/Domain/{BoundedContext}/Builder/
{Name}BuilderTest.php— Builder functionality tests
File Placement
| Component | Path | |
|---|---|---|
| Builder Interface | src/Domain/{BoundedContext}/Builder/ | |
| Concrete Builder | src/Domain/{BoundedContext}/Builder/ | |
| Director | src/Domain/{BoundedContext}/Builder/ | |
| Exception | src/Domain/{BoundedContext}/Builder/ | |
| Unit Tests | tests/Unit/Domain/{BoundedContext}/Builder/ |
Naming Conventions
| Component | Pattern | Example | |
|---|---|---|---|
| Interface | {Name}BuilderInterface | OrderBuilderInterface | |
| Concrete Builder | {Name}Builder | OrderBuilder | |
| Director | {Name}Director | OrderDirector | |
| Exception | BuilderValidationException | BuilderValidationException | |
| Test | {ClassName}Test | OrderBuilderTest |
Quick Template Reference
Builder Interface
Concrete Builder
Director
Usage Example
Anti-patterns to Avoid
| Anti-pattern | Problem | Solution | |
|---|---|---|---|
| No Validation | Invalid objects built | Validate in build() | |
| Mutable Product | Product can change after build | Return immutable objects | |
| Missing Reset | Builder state persists | Add reset() method | |
| Too Many Steps | Hard to use | Use Director or defaults | |
| No Fluent Interface | Verbose client code | Return self from setters |
References
For complete PHP templates and examples, see:
references/templates.md— Builder, QueryBuilder templatesreferences/examples.md— OrderBuilder, EmailBuilder examples and tests
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/create-builder/SKILL.md
Popularity
- Repository stars
- 96
- Repository forks
- 25
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dykyi-roman/awesome-claude-code/create-builder)