fix-circular-deps

Resolve circular dependency and layer-check violations in the FluidFramework repository.

Updated Jan 7, 2026
One-click install
npx skills add https://github.com/tylerbutler/repo-overlays --skill fix-circular-deps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fix-circular-deps
Source: https://github.com/tylerbutler/repo-overlays/tree/main/tylerbutler/FluidFramework/jikim-superskills/.claude/skills/fix-circular-deps
Command: npx skills add https://github.com/tylerbutler/repo-overlays --skill fix-circular-deps

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses and resolves circular dependency issues and layer-check violations within the FluidFramework repository, ensuring code integrity and maintainability.

Core Features & Use Cases

  • Violation Detection: Identifies cross-package layer boundary violations and intra-package import cycles.
  • Pattern Classification: Categorizes circular dependency patterns (e.g., barrel imports, mutual runtime dependencies, type-only cycles, cross-layer violations).
  • Automated Fixes: Applies targeted fixes by adjusting import paths and converting imports to import type where appropriate.
  • Verification: Includes steps to verify fixes using pnpm layer-check, package builds, depcruise, linting, and tests.
  • Use Case: When pnpm layer-check reports an error, use this Skill to automatically identify the problematic packages and apply the correct import path adjustments to resolve the violation.

Quick Start

Use the fix-circular-deps skill to resolve import cycles in the 'common' package.

Frequently Asked Questions about fix-circular-deps

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

FAQPage Schema
How do I resolve circular dependency errors in TypeScript packages?

To resolve circular dependency errors in TypeScript packages, analyze import patterns to identify intra-package import cycles and apply targeted fixes like adjusting import paths or converting to `import type` statements to break the loops.

How do I fix cross-package layer violations reported by pnpm layer-check?

Fix cross-package layer violations reported by pnpm layer-check by identifying the problematic packages violating the strict layer hierarchy and adjusting their import paths to comply with the defined architectural boundaries.

What is the best way to handle barrel imports causing circular dependencies?

The best way to handle barrel imports causing circular dependencies is to classify the import cycle pattern and bypass the barrel file by applying targeted import path adjustments directly to the specific modules required.

Can I use dependency management tools to automatically fix import cycles in FluidFramework?

Yes, you can resolve import cycles in FluidFramework by using automated dependency management processes to classify patterns like mutual runtime dependencies or type-only cycles, apply code modifications, and verify fixes using depcruise and pnpm layer-check.

How do I verify circular dependency fixes after refactoring imports?

Verify circular dependency fixes after refactoring imports by running package builds, executing depcruise for cycle detection, linting the codebase, running tests, and confirming pnpm layer-check passes without boundary errors.