typescript-circular-dependency
CommunityResolve TS/JS circular imports automatically.
AuthorHankanman
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Detects and resolves circular import dependencies in TypeScript and JavaScript projects, preventing runtime errors caused by partially initialized modules.
Core Features & Use Cases
- Circular dependency detection in TS/JS project graphs.
- Concrete resolution strategies: dependency extraction, DI, type-only imports, and barrel-file adjustments.
- Use Case: When runtime errors like Cannot access 'X' before initialization or undefined imports appear, often due to import cycles.
Quick Start
Run a dependency graph analysis to locate cycles and apply fixes:
- Install and use Madge to visualize cycles in your codebase.
- Identify patterns such as service-to-service, type imports, or barrel files.
- Implement fixes (e.g., extract shared interfaces, introduce DI, or restructure imports).
- Re-run the analysis and tests to confirm cycles are resolved.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: typescript-circular-dependency Download link: https://github.com/Hankanman/claude-config/archive/main.zip#typescript-circular-dependency Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.