dykyi-roman/awesome-claude-code/check-immutability
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Analyzes PHP code for immutability violations. Checks Value Objects, Events, DTOs for readonly properties, no setters, final classes, and wither patterns. Ensures domain objects maintain invariants.
Install
npx vskill@latest install dykyi-roman/awesome-claude-code/check-immutabilitySKILL.md
Immutability Analyzer
Overview
This skill analyzes PHP DDD projects for immutability violations in Value Objects, Domain Events, DTOs, and Read Models. Immutability is crucial for maintaining invariants, thread safety, and predictable behavior.
Immutability Requirements by Type
| Type | Must Be Immutable | Key Checks | |
|---|---|---|---|
| Value Object | ✅ Required | readonly, no setters, final | |
| Domain Event | ✅ Required | readonly, no modification after creation | |
| DTO | ✅ Recommended | readonly, no business logic | |
| Read Model | ✅ Required | readonly, projection-only changes | |
| Entity | ⚠️ Controlled | Setters via behavior methods only | |
| Aggregate | ⚠️ Controlled | State changes via domain methods |
Detection Patterns
Phase 1: Identify Immutable Candidates
Phase 2: Readonly Class Check
PHP 8.2+ Recommended Pattern:
Phase 3: Readonly Properties Check
Phase 4: Setter Detection
Phase 5: Final Class Check
Phase 6: Wither Pattern Check
Wither Pattern Example:
Phase 7: Collection Immutability
Phase 8: DateTimeImmutable Check
Report Format
Immutability Patterns
Fully Immutable Class (PHP 8.2+)
Wither Pattern for Modifications
Immutable Collection
Quick Analysis Commands
Integration
Works with:
create-value-object— Generate immutable VOscreate-domain-event— Generate immutable eventscreate-dto— Generate immutable DTOsstructural-auditor— Architectural compliancebehavioral-auditor— Event Sourcing compliance
References
- PHP 8.2 readonly classes RFC
- "Domain-Driven Design" (Eric Evans) — Value Objects chapter
- "Implementing DDD" (Vaughn Vernon) — Immutability patterns
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/check-immutability/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/check-immutability)