fix-cyclic-deps

Installation
SKILL.md

Fix Cyclic Module Dependencies

This skill detects and resolves cyclic module dependencies that arise during UI5 modernization. When modernization converts global namespace access to sap.ui.define imports, new dependency edges can create circular imports (A imports B, B imports A), causing the UI5 AMD loader to return undefined for the back-edge module.

The fix: replace the back-edge sap.ui.define dependency with a lazy sap.ui.require("path/to/Module") (synchronous form) at each call site, retrieving the already-loaded module from the loader cache without creating a dependency edge.

Linter Rule

Rule ID Message Pattern This Skill's Action
(none — structural) Runtime: module is undefined despite correct import path Detect cycle in dependency graph, convert back-edge to lazy sap.ui.require()

This skill is NOT triggered by a UI5 linter rule. It addresses a structural problem in the module dependency graph. It is triggered as the final fix phase in the modernization workflow, or standalone when a developer encounters undefined modules at runtime.

When to Use

  • In modernization workflow: As Phase 3, Step 3.3 (final step) after ALL other Phase 3 steps complete. Multiple steps add sap.ui.define edges that can create cycles — running once at the end operates on the final dependency graph.
  • Standalone: When a module returns undefined at runtime despite a correct import path.
  • After manual refactoring: When a developer adds a new sap.ui.define dependency and gets an unexpected undefined.
Installs
96
GitHub Stars
35
First Seen
Jun 25, 2026
fix-cyclic-deps — ui5/plugins-coding-agents