From software-design
Use when designing or reviewing domain-model accessors that expose internal state for persistence, serialization, tests, or framework integration. Applies the breachEncapsulationOf naming pattern so unavoidable getters are visibly treated as encapsulation breaches, not casual domain APIs. Trigger for getter naming conventions, persistence-only getters, serialization accessors, Tell Don't Ask pressure, or requests to prevent getter misuse.
How this skill is triggered — by the user, by Claude, or both
Slash command
/software-design:j5ik2o-breach-encapsulation-namingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Make unavoidable state exposure loud. Domain objects should express behavior first; when an accessor is required for persistence, serialization, debugging, or tests, name it as an explicit encapsulation breach.
Make unavoidable state exposure loud. Domain objects should express behavior first; when an accessor is required for persistence, serialization, debugging, or tests, name it as an explicit encapsulation breach.
Classify every requested accessor by consumer: domain behavior, persistence, serialization, tests, framework glue, or presentation.
Replace domain-behavior access with Tell Don't Ask methods on the object that owns the data.
For unavoidable exposure, use breachEncapsulationOfX() or the idiomatic local equivalent such as breach_encapsulation_of_x.
Keep exposed values immutable or defensively copied.
Add a review note explaining why the breach is tolerated and which callers may use it.
Ordinary getters on entities and aggregates need justification.
Accessors used by domain logic are design smells; move the decision to the model.
Framework-required access should be isolated in adapters, serializers, mappers, or repository glue.
Tests may use breach accessors, but assertions should still prefer observable behavior when possible.
Read references/patterns.md for language-specific naming and migration examples.
For non-trivial implementation, review, or refactoring work, read references/details.md before giving final guidance. It contains the detailed rules, examples, smells, and migration notes that do not belong in the short invocation body.
Return the accessor classification, recommended names, any Tell Don't Ask replacements, and the smallest migration path.
npx claudepluginhub j5ik2o/ai-tools --plugin software-designAnalyzes PHP code for encapsulation violations like public mutable state, getter/setter abuse, Tell Don't Ask breaches, exposed internals, and anemic domain models. Reviews domain entities and aggregates.
Hides a class's internal state and protects invariants by exposing behavior instead of data. Use when callers reach into fields directly, when setters violate invariants, or when internal data structures leak into the public API.
Use when reviewing or refactoring code that queries object state and makes decisions outside the object that owns the data. Moves behavior to the responsible object to improve encapsulation. Trigger for getter misuse, Feature Envy, Tell Don't Ask, encapsulation improvements, or moving responsibility into domain objects.