ClaudeSuperPower

fix-library-init

Skill

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"

Install

git clone https://github.com/UI5/plugins-coding-agents.git ~/.claude/skills/fix-library-init

What is 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.

What this can do

Capabilities declared in this component's own frontmatter — not inferred.

Inherit all session tools

Declares no tool restrictions — inherits every session tool

~129 tokens of context used while enabled, before you invoke anything

Documentation

README · ~6 min read

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 IDMessage PatternThis Skill's Action
no-deprecated-apiDeprecated call to Library.init(). Use the {apiVersion: 2} parameter insteadAdd apiVersion: 2 to the init call
no-deprecated-apiDeprecated call to Lib.init(). Use the {apiVersion: 2} parameter insteadAdd apiVersion: 2 to the init call
no-deprecated-apiDeprecated call to init(). Use the {apiVersion: 2} parameter insteadAdd apiVersion: 2 (destructured init)

When to Use

Apply this skill when you see linter output like:

Reviews

Log in to leave a review.

No reviews yet — be the first.

Explore related

Other things in this space — across every part of the ecosystem, not just skills.