The PHP Side Effect Analyzer is a specialized skill designed for Claude Code to audit PHP applications for patterns that hinder testability and maintainability. By detecting state mutations, global variable access, static property writes, and I/O operations mixed with business logic, this skill provides actionable refactoring strategies like Command/Query Separation and dependency injection. It is an essential tool for developers implementing Clean Architecture, DDD, or Hexagonal patterns, helping to ensure that core business logic remains deterministic, decoupled from infrastructure, and easy to unit test.
主要功能
01Classifies issues by severity to prioritize critical architectural improvements.
02Identifies architectural anti-patterns like superglobal and global variable access.
03Provides specific refactoring suggestions to transform side effects into pure functions.
04Highlights I/O operations incorrectly mixed with domain business logic.
0545 GitHub stars
06Detects hidden state mutations and unauthorized input modifications.
使用场景
01Enforcing Clean Architecture and SOLID principles during automated code reviews.
02Refactoring legacy PHP codebases to increase unit test coverage and reliability.
03Isolating core business logic from infrastructure concerns like databases, APIs, and file systems.