fix-library-init
Fix Library.init() apiVersion issues and modernize enums to DataType.registerEnum. Use this skill when linter outputs: - `no-deprecated-api` with message "Deprecated call to ... Use the {apiVersion: 2} parameter instead" Trigger on library.js files with errors about: "Deprecated call to", "Lib.init", "Library.init", "{apiVersion: 2} parameter" Adds apiVersion: 2 to Library.init() calls and modernizes enum definitions to use DataType.registerEnum, which is required for type validation when using apiVersion: 2.
Install
With your agent
Install OMGSkills skill "ui5/plugins-coding-agents:plugins/ui5-modernization/skills/fix-library-init" 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-library-init ~/.claude/skills/fix-library-init
From README
Fix Library.init() Modernization This skill fixes Library.init() / Lib.init() calls that the UI5 linter detects as missing apiVersion: 2, and modernizes enum definitions to use DataType.registerEnum — which is required when using apiVersion: 2. Linter Rules Handled | Rule ID | Message Pattern | This Skill's Action | |---------|-----------------|---------------------| | no-deprecated-api | Deprecated call to Library.init(). Use the {apiVersion: 2} parameter instead | Add apiVersion: 2 to the init call | | no-deprecated-api | Deprecated call to Lib.init(). Use the {apiVersion: 2} parameter instead | Add apiVersion: 2 to the init call | | no-deprecated-api | Deprecated call to init().
More from this repo
fix-bootstrap-params
Used to fix HTML bootstrap parameter issues that UI5 linter reports but cannot auto-fix.
fix-component-async
Used to fix Component.js async configuration issues that UI5 linter reports but cannot auto-fix.
fix-control-renderer
Used to fix Control renderer issues that UI5 linter reports but cannot auto-fix.
