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,
    ) {}

    public static function getInstance(): self
Related skills
Installs
1
GitHub Stars
71
First Seen
Feb 11, 2026