Unsafe singleton

From zakirkun/ice-tea · View interactive version

Unsafe singleton is an AI agent skill from the GitHub repository zakirkun/ice-tea. Detects singleton implementations that are not thread-safe and can result in multiple instances being created under concurrent access.

How to use this skill

Skill file

Thread-Unsafe Singleton

Overview

Lazy-initialized singletons without thread synchronization can result in multiple instances being created when the class is initialized concurrently by multiple threads. This causes inconsistent state, duplicate resource consumption, and potential security issues if security-related objects (loggers, auth managers) are duplicated.

Remediation

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.