Fixes pseudo module access and implicit global issues that UI5 linter detects but cannot auto-fix. Provides guidance on proper module imports for enums, DataTypes, and OData expression addons.
Ships in ui5-modernization. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill fixes pseudo module access and implicit global issues that the UI5 linter detects but cannot auto-fix because they require understanding proper module import patterns.
| Rule ID | Message Pattern | This Skill's Action |
|---|---|---|
no-pseudo-modules | Deprecated access of enum pseudo module '...' | Import via library module |
no-pseudo-modules | Deprecated access of DataType pseudo module '...' | Import via library module |
no-implicit-globals | Access of module '...' not exported by library '...' | Import module directly |
no-implicit-globals | OData built-in global symbols must not be used implicitly | Import ODataExpressionAddons |
Apply this skill when you see linter output like:
MyController.js:5:5 error Deprecated access of enum pseudo module 'sap/ui/core/BarColor' no-pseudo-modules
MyController.js:8:5 error Deprecated access of DataType pseudo module 'sap/ui/core/CSSSize' no-pseudo-modules
MyController.js:15:5 error Access of module 'sap/ui/unified/DateRange' not exported by library 'sap/ui/unified/library' no-implicit-globals
MyView.view.xml:20:5 error OData built-in global symbols must not be used implicitly no-implicit-globals
In UI5, enums and DataTypes were historically accessed as if they were modules (e.g., sap/ui/core/BarColor). These are "pseudo modules" - they don't exist as real files but are resolved at runtime from the library module. In modern UI5, direct pseudo module imports are deprecated.
Problem: Importing enums as direct modules.
// Before - triggers no-pseudo-modules
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/core/BarColor", // Pseudo module!
"sap/m/ListSeparators" // Pseudo module!
], function(Controller, BarColor, ListSeparators) {
"use strict";
return Controller.extend("my.app.controller.Main", {
onInit: function() {
var color = BarColor.Positive;
var separator = ListSeparators.All;
}
});
});
Fix Strategy: Import from the library module and access the enum as a property.
// After - import from library
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/core/library", // Import library
"sap/m/library" // Import library
], function(Controller, coreLibrary, mLibrary) {
"use strict";
// Extract enums from library
var BarColor = coreLibrary.BarColor;
var ListSeparators = mLibrary.ListSeparators;
return Controller.extend("my.app.controller.Main", {
onInit: function() {
var color = BarColor.Positive;
var separator = ListSeparators.All;
}
});
});
Common Enum Pseudo Modules and Their Libraries:
| Pseudo Module | Library Module | Enum Access |
|---|---|---|
sap/ui/core/BarColor | sap/ui/core/library | coreLibrary.BarColor |
sap/ui/core/ValueState | sap/ui/core/library | coreLibrary.ValueState |
sap/ui/core/TextDirection | sap/ui/core/library | coreLibrary.TextDirection |
sap/ui/core/TextAlign | sap/ui/core/library | coreLibrary.TextAlign |
sap/ui/core/MessageType | sap/ui/core/library | coreLibrary.MessageType |
sap/m/ListSeparators | sap/m/library | mLibrary.ListSeparators |
sap/m/ListMode | sap/m/library | mLibrary.ListMode |
sap/m/ListType | sap/m/library | mLibrary.ListType |
sap/m/ButtonType | sap/m/library | mLibrary.ButtonType |
sap/m/InputType | sap/m/library | mLibrary.InputType |
Problem: Importing DataTypes as direct modules.
// Before - triggers no-pseudo-modules
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/core/CSSSize" // DataType pseudo module!
], function(Controller, CSSSize) {
"use strict";
return Controller.extend("my.app.controller.Main", {
// Using CSSSize type
});
});
Fix Strategy: Import from the library module.
// After - import from library
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/core/library"
], function(Controller, coreLibrary) {
"use strict";
var CSSSize = coreLibrary.CSSSize;
return Controller.extend("my.app.controller.Main", {
// Using CSSSize type
});
});
Common DataType Pseudo Modules:
| Pseudo Module | Library Module |
|---|---|
sap/ui/core/CSSSize | sap/ui/core/library |
sap/ui/core/CSSColor | sap/ui/core/library |
sap/ui/core/URI | sap/ui/core/library |
sap/ui/core/ID | sap/ui/core/library |
sap/ui/core/Percentage | sap/ui/core/library |
Problem: Accessing modules via library exports that aren't actually exported.
// Before - triggers no-implicit-globals
sap.ui.define([
"sap/ui/unified/library",
"sap/ui/core/library"
], function(unifiedLibrary, coreLibrary) {
"use strict";
// These modules are NOT exported by the library!
var DateRange = unifiedLibrary.DateRange; // Error
var DOMAttribute = coreLibrary.tmpl.DOMAttribute; // Error
});
Fix Strategy: Import the module directly.
// After - import modules directly
sap.ui.define([
"sap/ui/unified/DateRange", // Direct import
"sap/ui/core/tmpl/DOMAttribute" // Direct import
], function(DateRange, DOMAttribute) {
"use strict";
// Use directly
});
Rule of Thumb:
library.EnumName)sap/ui/unified/DateRange)Problem: Using OData built-in functions in expression bindings without importing.
// Before - triggers no-implicit-globals
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/m/Text"
], function(Controller, Text) {
"use strict";
return Controller.extend("my.app.controller.Main", {
onInit: function() {
var oText = new Text({
// Using odata.compare without import!
text: "{= odata.compare(${/value1}, ${/value2}) }"
});
}
});
});
Fix Strategy: Import ODataExpressionAddons module.
// After - import ODataExpressionAddons
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/m/Text",
"sap/ui/model/odata/ODataExpressionAddons" // Required for odata.* functions
], function(Controller, Text, ODataExpressionAddons) {
"use strict";
return Controller.extend("my.app.controller.Main", {
onInit: function() {
var oText = new Text({
// Now works - ODataExpressionAddons is imported
text: "{= odata.compare(${/value1}, ${/value2}) }"
});
}
});
});
OData Functions Requiring Import:
| OData Function | Alternative Direct Module |
|---|---|
odata.compare | sap/ui/model/odata/v4/ODataUtils |
odata.fillUriTemplate | sap/ui/thirdparty/URITemplate |
odata.uriEncode | sap/ui/model/odata/ODataUtils |
Note: Importing sap/ui/model/odata/ODataExpressionAddons is the simplest solution as it registers all OData expression functions.
Problem: Using OData functions in XML view bindings without import.
<!-- Before - triggers no-implicit-globals -->
<mvc:View
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m">
<Text text="{= odata.compare(${/price1}, ${/price2}) }" />
</mvc:View>
Fix Strategy: Add core:require for ODataExpressionAddons.
<!-- After - with core:require -->
<mvc:View
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:core="sap.ui.core"
core:require="{
ODataAddons: 'sap/ui/model/odata/ODataExpressionAddons'
}">
<Text text="{= odata.compare(${/price1}, ${/price2}) }" />
</mvc:View>
Identify the issue type from the linter message:
Determine the correct library for enums/DataTypes:
sap/ui/core/ → sap/ui/core/library)Update imports:
Update code references:
var EnumName = library.EnumName;For XML views: Add core:require when needed
Given linter output:
MyController.js:3:5 error Deprecated access of enum pseudo module 'sap/ui/core/ValueState' no-pseudo-modules
MyController.js:4:5 error Access of module 'sap/ui/unified/DateRange' not exported by library 'sap/ui/unified/library' no-implicit-globals
MyController.js:25:5 error OData built-in global symbols must not be used implicitly no-implicit-globals
Before:
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/core/ValueState",
"sap/ui/unified/library"
], function(Controller, ValueState, unifiedLibrary) {
"use strict";
var DateRange = unifiedLibrary.DateRange; // Error: not exported
return Controller.extend("my.app.controller.Main", {
onInit: function() {
var state = ValueState.Error;
var oDateRange = new DateRange({
startDate: new Date()
});
},
formatComparison: function() {
return "{= odata.compare(${/val1}, ${/val2}) }"; // Error: no import
}
});
});
After:
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/core/library", // For ValueState enum
"sap/ui/unified/DateRange", // Direct import
"sap/ui/model/odata/ODataExpressionAddons" // For odata.* functions
], function(Controller, coreLibrary, DateRange, ODataExpressionAddons) {
"use strict";
var ValueState = coreLibrary.ValueState; // Extract from library
return Controller.extend("my.app.controller.Main", {
onInit: function() {
var state = ValueState.Error;
var oDateRange = new DateRange({
startDate: new Date()
});
},
formatComparison: function() {
return "{= odata.compare(${/val1}, ${/val2}) }"; // Now works
}
});
});
ODataExpressionAddons import is needed even though you don't use the variable directly - it registers the functions at load timeno-globals on JS files — e.g., sap.ui.getCore(), jQuery, sap.ui.controller()), use fix-js-globalsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
19 skills in this plugin
/fix-bootstrap-paramsFix HTML bootstrap parameter issues that UI5 linter reports but cannot auto-fix. Use this skill when linter outputs these rules:
- `no-deprecated-api` - For missing/deprecated bootstrap parameters (async, compat-version, animation, binding-syntax, etc.)
- `no-deprecated-theme` - For deprecated theme values in data-sap-ui-theme
- `no-deprecated-library` - For deprecated libraries in data-sap-ui-libs
Trigger on error messages containing: "Missing bootstrap parameter", "Abandoned bootstrap parameter", "Redundant bootstrap parameter", "deprecated value", "bootstrap"
Automatically applies safe fixes to HTML files containing UI5 bootstrap script tags.
/fix-component-asyncFix Component.js async configuration issues that UI5 linter reports but cannot auto-fix. Use this skill when linter outputs these rules:
- `async-component-flags` - For missing IAsyncContentCreation interface, missing manifest declaration, redundant async flags, async:false errors
- `no-removed-manifest-property` - For async flags in inline manifest v2
Trigger on Component.js files with errors about async loading, IAsyncContentCreation, manifest declaration.
Automatically adds the IAsyncContentCreation interface and configures manifest properly.
/fix-control-rendererFix Control renderer issues that UI5 linter reports but cannot auto-fix. Use this skill when linter outputs these rules:
- `no-deprecated-control-renderer-declaration` - For missing renderer declaration, string-based renderer declaration, implicit renderer auto-discovery (removed in modern UI5)
- `no-deprecated-api` - For missing apiVersion:2 in renderer objects, missing IconPool import when using oRm.icon(), deprecated rerender() override. NOTE: For Library.init() apiVersion errors, use fix-library-init instead.
- `ui5-class-declaration` - For non-static renderer property in ES6 classes
Trigger on: "missing a renderer declaration", "Deprecated declaration of renderer", "deprecated renderer", "apiVersion" (in renderer context), "IconPool", "rerender", "renderer must be a static property"
Converts legacy renderer patterns to modern apiVersion: 2 format with proper module imports.
/fix-csp-complianceFix Content Security Policy (CSP) compliance issues that UI5 linter reports but cannot auto-fix. Use this skill when linter outputs:
- `csp-unsafe-inline-script` with message "Use of unsafe inline script"
Trigger on: inline JavaScript in HTML files, script tags without src attribute, onclick/onload handlers in HTML.
Also use when user mentions 'security headers', 'inline script warning', 'CSP policy', 'unsafe-inline', or 'Content-Security-Policy'.
Provides guidance on moving inline scripts to external files for CSP compliance.
/fix-cyclic-depsDetect 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.
/fix-deprecated-controlsFix deprecated control/class/interface/type issues that UI5 linter reports but cannot auto-fix. Use this skill when linter outputs:
- `no-deprecated-api` with messages about deprecated class, interface, type, property, or property of class
- Messages like "Use of deprecated class '...'", "Use of deprecated interface '...'", "Use of deprecated property '...'"
Trigger on: deprecated control usage in JS `new` expressions, deprecated properties in constructor settings, deprecated interfaces/types in metadata, deprecated controls/properties in XML views, sap.m.MessagePage modernization to IllustratedMessage.
Use this skill whenever you see 'deprecated class', 'deprecated property', 'deprecated interface', or 'deprecated type' in linter output, even if the user doesn't explicitly mention deprecation.
Provides replacement guidance for deprecated UI5 controls and their properties.
Other plugins' skills for the same job
/ui5-ui5-modernization-plugins-ui5-modernization:fix-pseudo-modulesfrom ui5-modernization
Generated from the plugin's indexed repository (ui5/plugins-coding-agents) — no native marketplace selected
npx claudepluginhub p/ui5-ui5-modernization-plugins-ui5-modernization