check-encapsulation

Installation
SKILL.md

Encapsulation Analyzer

Overview

This skill analyzes PHP codebases for encapsulation violations — situations where internal state is exposed, getters/setters replace behavior, or the "Tell, Don't Ask" principle is violated.

When to Use

  • Reviewing Domain layer entities and aggregates
  • Detecting anemic domain models
  • Checking for Law of Demeter violations
  • Auditing collection exposure patterns
  • Evaluating getter/behavior ratio in entities

Encapsulation Principles

Principle Description Violation Indicator
Information Hiding Internal state not exposed Public properties, many getters
Related skills
Installs
4
GitHub Stars
71
First Seen
Mar 17, 2026