circular-dependencies
Installation
SKILL.md
Circular Dependencies
Find and break import cycles — the class of bugs where module A imports B which imports A (directly or through a chain), causing one module to be partially initialized when the other loads. The goal: a directed acyclic import graph where every module's dependencies are fully initialized before it runs.
When to Apply This Skill
Trigger on any of:
undefinedvalue at import time that is defined correctly inside the moduleReferenceError: Cannot access 'X' before initialization- Jest/Vitest warning:
Jest has detected the following N circular dependencies - webpack warning:
WARNING in Circular dependency detected - Test behavior that changes depending on which test file runs first
TypeError: Class extends value undefined(classic circular class inheritance)- An import that works in isolation but fails inside the full application