typescript-circular-dependency

Identify and resolve circular module dependencies in TypeScript and JavaScript codebases.

4|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/k97/dock-tile --skill typescript-circular-dependency-k97
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-circular-dependency
Source: https://github.com/k97/dock-tile/tree/main/website/.claude/skills/claudeception/examples/typescript-circular-dependency
Command: npx skills add https://github.com/k97/dock-tile --skill typescript-circular-dependency-k97

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires madge.

What problem does it solve?

This skill resolves runtime errors and undefined imports caused by circular dependencies in TypeScript and JavaScript projects, which often manifest as initialization failures or unexpected undefined values.

Core Features & Use Cases

  • Dependency Visualization: Generate visual graphs of your module imports to identify cycles.
  • Resolution Strategies: Apply proven patterns like dependency injection, dynamic imports, or type-only imports to break cycles.
  • Prevention: Integrate automated checks into your CI/CD pipeline to catch circular dependencies before they reach production.

Quick Start

Run the typescript-circular-dependency skill to analyze the current project directory and identify all circular import paths.

Frequently Asked Questions about typescript-circular-dependency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix circular dependencies causing undefined imports in TypeScript?

Circular dependencies causing undefined imports in TypeScript are fixed by applying architectural refactoring patterns like dependency injection, dynamic imports, or type-only imports to break the cycles. This skill identifies these problematic import paths and applies the appropriate resolution strategy.

Why does my TypeScript code fail with a runtime initialization error?

Runtime initialization errors in TypeScript often occur because circular dependencies create incomplete module execution cycles. This skill resolves these errors by utilizing static analysis to identify the exact circular import paths and refactor the module architecture.

What is the best way to prevent circular dependencies in a CI/CD pipeline?

The best way to prevent circular dependencies in a CI/CD pipeline is to integrate automated static analysis checks that catch cyclic imports before they reach production. This ensures a clean, acyclic dependency graph is maintained across the codebase.

Does madge work with TypeScript for resolving circular imports?

Madge is utilized by this skill to perform static analysis on TypeScript and JavaScript codebases, generating visual graphs of module imports to successfully identify and resolve circular dependency structures.