dykyi-roman/awesome-claude-code/create-aggregate
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Generates DDD Aggregates for PHP 8.4. Creates consistency boundaries with root entity, domain events, and invariant protection. Includes unit tests.
Install
npx vskill@latest install dykyi-roman/awesome-claude-code/create-aggregateSKILL.md
Aggregate Generator
Generate DDD-compliant Aggregates with root, domain events, and tests.
Aggregate Characteristics
- Consistency boundary: All changes atomic
- Root entity: Single entry point
- Transactional consistency: Invariants always valid
- Domain events: Records what happened
- Encapsulation: Children accessed through root
- Identity: Referenced by root ID
Generation Process
Step 1: Generate Base AggregateRoot
Path: src/Domain/Shared/Aggregate/
AggregateRoot.php— Base class with event recording
Step 2: Generate Aggregate Root Entity
Path: src/Domain/{BoundedContext}/Entity/
{Name}.php— Main aggregate root
Step 3: Generate Child Entities (if needed)
Path: src/Domain/{BoundedContext}/Entity/
{ChildName}.php— Child entity inside aggregate
Step 4: Generate Domain Events
Path: src/Domain/{BoundedContext}/Event/
{Name}CreatedEvent.php{Name}{Action}Event.phpfor each behavior
Step 5: Generate Tests
Path: tests/Unit/Domain/{BoundedContext}/Entity/
File Placement
| Component | Path | |
|---|---|---|
| Base AggregateRoot | src/Domain/Shared/Aggregate/ | |
| Aggregate Entity | src/Domain/{BoundedContext}/Entity/ | |
| Child Entities | src/Domain/{BoundedContext}/Entity/ | |
| Domain Events | src/Domain/{BoundedContext}/Event/ | |
| Unit Tests | tests/Unit/Domain/{BoundedContext}/Entity/ |
Naming Conventions
| Component | Pattern | Example | |
|---|---|---|---|
| Aggregate Root | {Name} | Order | |
| Child Entity | {Parent}{Name} | OrderLine | |
| Created Event | {Name}CreatedEvent | OrderCreatedEvent | |
| State Event | {Name}{Action}Event | OrderConfirmedEvent |
Quick Template Reference
Base AggregateRoot
Aggregate Root Entity
Child Entity
Design Rules
| Rule | Good | Bad | |
|---|---|---|---|
| Transaction Boundary | One aggregate per transaction | Multiple aggregates | |
| Reference | By ID only | Full entity reference | |
| Size | Small, focused | Large with many collections | |
| Invariants | Always valid | Can be in invalid state | |
| Events | Record all state changes | No event recording |
Anti-patterns to Avoid
| Anti-pattern | Problem | Solution | |
|---|---|---|---|
| Large Aggregate | Performance issues | Split into smaller aggregates | |
| Entity References | Tight coupling | Use IDs only | |
| Public Setters | No invariant protection | Use behavior methods | |
| Missing Events | Can't track history | Record event for each change | |
| No Root | Multiple entry points | Single root entity |
References
For complete PHP templates and examples, see:
references/templates.md— AggregateRoot, Entity, Child Entity, Test templatesreferences/examples.md— Order aggregate with OrderLine, events, and tests
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/create-aggregate/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-aggregate)