Download for MacApple silicon, macOS 14+
Skill

fix-cyclic-deps

@ui5 Updated 2026-10-20

Detect and resolve cyclic module dependencies introduced during UI5 modernization. Trigger when user mentions: "cyclic dependency", "circular import", "undefined module at runtime", "lazy require", "sap.ui.require sync", "import cycle", or when a module returns undefined despite a correct import path. Classic symptom: a module is `undefined` at runtime despite a correct sap.ui.define import path. Auto-fixes 2-node cycles (A↔B) by converting the lesser-used edge to lazy sap.ui.require(). Auto-fixes longer chains (3+ nodes) via hub-based approach. Reports unfixable chains to MODERNIZATION-ISSUES.md. Runs as Phase 3, Step 3.3 (final step) after all other Phase 3 steps.

claudedevelopmentopenui5pluginsapui5ui5

Install

With your agent

Install OMGSkills skill "ui5/plugins-coding-agents:plugins/ui5-modernization/skills/fix-cyclic-deps" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

git clone https://github.com/UI5/plugins-coding-agents /tmp/plugins-coding-agents && ln -s /tmp/plugins-coding-agents/plugins/ui5-modernization/skills/fix-cyclic-deps ~/.claude/skills/fix-cyclic-deps

From README

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.