acc-check-singleton-antipattern
Installation
SKILL.md
Singleton Anti-Pattern Detection
Analyze PHP code for Singleton anti-pattern usage that introduces global state and tight coupling.
Detection Patterns
1. Classic Singleton Implementation
// ANTIPATTERN: Static instance with private constructor
final class DatabaseConnection
{
private static ?self $instance = null;
private function __construct(
private readonly PDO $pdo,
) {}