fix-js-globals

fix-js-globals is a skill for Claude Code, Codex from UI5/plugins-coding-agents. It costs 243 tokens per session (4,745 once invoked), scanned A, original, Apache-2.0.

A repair guide for JavaScript global-variable errors reported by the UI5 linter, a tool that checks SAP UI5 code for problems. It covers cases the linter cannot fix automatically.

In plain words
What is it for?
Use it to fix global access in UI5 JavaScript files, including namespace assignments, jQuery references, and files being converted to modern module syntax.
Why use it?
It turns undeclared or incorrectly accessed global names into supported module-based code while following UI5-specific rules.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to fix global access in UI5 JavaScript files, including namespace assignments, jQuery references, and files being converted to modern module syntax.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ui5/plugins-coding-agents/fix-js-globals
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add UI5/plugins-coding-agents --skill fix-js-globals
Clone the repo
git clone --depth 1 https://github.com/UI5/plugins-coding-agents

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fix-js-globals

README.md
[![agentmods](https://agentmods.dev/badge/skills/ui5/plugins-coding-agents/fix-js-globals/github.svg)](https://agentmods.dev/skills/ui5/plugins-coding-agents/fix-js-globals)
Your own site
<a href="https://agentmods.dev/skills/ui5/plugins-coding-agents/fix-js-globals"><img src="https://agentmods.dev/badge/skills/ui5/plugins-coding-agents/fix-js-globals/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fix-js-globals

Your own site · 80×15
<a href="https://agentmods.dev/skills/ui5/plugins-coding-agents/fix-js-globals"><img src="https://agentmods.dev/badge/skills/ui5/plugins-coding-agents/fix-js-globals.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 243 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,745 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 23
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 205
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 376
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00243 $0.04745
Opus 5.5 $0.00097 $0.01898
Sonnet 5.5 $0.00049 $0.00949
Haiku 4.5 $0.00024 $0.00475

Measured 1mo ago against content hash 6c4a1fc80817, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fix-js-globals scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ui5-modernization/skills/fix-js-globals/SKILL.md · 414 lines

How it starts

The opening of the file, as written. The whole thing — 414 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Fix JavaScript Global Access (no-globals)

Fixes no-globals errors in JavaScript files that the UI5 linter detects but cannot auto-fix. Run npx @ui5/linter --details to get replacement suggestions and documentation links.

Key Rules — Read Before Applying Any Fix

  1. jQuery/$ globals — preserve jQuery API calls: When fixing jQuery/$ globals, ONLY add the sap/ui/thirdparty/jquery dependency and replace $ with jQuery. Do NOT replace standard jQuery API calls (jQuery.each, jQuery.extend, jQuery.proxy, jQuery.isEmptyObject, etc.) with native JavaScript equivalents. These are standard jQuery methods, not deprecated SAP APIs.

  2. Case 9/10 — fix ALL globals in a single pass: When converting a file from jQuery.sap.declare/require to sap.ui.define (Case 9 or 10), you MUST also fix ALL other global-access patterns inside the file body in the same pass. There is no second pass — everything must be handled at once. Read the "Apply ALL Applicable Cases in a Single Pass" section below.

  3. Dead code — delete, don't import: If a global assignment stores a value that is never read anywhere else in the file (e.g., this.BarColor = sap.ui.core.BarColor where this.BarColor never appears again), delete the entire statement. Do NOT add an import for it.

  4. No intermediate forms for byId in controllers: sap.ui.getCore().byId("prefix--id") or jQuery("#prefix--id").control(0) inside a controller → this.byId("id") directly. Never leave it as Element.getElementById("prefix--id"). After replacing, remove unused Element or jQuery imports.

  5. merge, not deepExtend: jQuery.sap.extend(true, ...) → merge() from sap/base/util/merge. The module sap/base/util/deepExtend does NOT exist.

Fix Strategies by Case

1. Assignments to Global Namespaces

Problem: Code creates custom namespaces on the global sap object.

// Before
sap.ui.demo = sap.ui.demo || {};
sap.ui.demo.myApp = { formatter: function() { ... } };

// After — convert to AMD module
sap.ui.define("sap/ui/demo/myApp", [], function() {
    "use strict";
    return { formatter: function() { ... } };
});

Read the full file on GitHub · 414 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 414 lines · 243 tokens per session scan A 6c4a1fc80817

Subscribe to this mod's changes

fix-js-globals is a skill published in the GitHub repository UI5/plugins-coding-agents (41 stars, last pushed today), licensed Apache-2.0. It adds 243 tokens to every session and 4,745 once invoked, about $0.0010 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

smalltalk-debugger

Systematic debugging guide for Smalltalk (Pharo/Squeak) development. Provides expertise in error diagnosis (MessageNotUnderstood, KeyNotFound, SubscriptOutOfBounds, AssertionFailure), incremental code execution with eval tool, intermediate value inspection, error handling patterns (on:do: blocks), stack trace…

mumez/smalltalk-dev-plugin · 87 tokens

smalltalk-usage-finder

Class and method usage analyzer for Smalltalk (Pharo/Squeak). Provides expertise in understanding class responsibilities through class comments (getclasscomment), discovering usage patterns via references (searchreferencestoclass), finding example methods (exampleXXX patterns), analyzing method usage in context…

mumez/smalltalk-dev-plugin · 139 tokens

st-eval

Smalltalk code evaluator for Pharo or Squeak via MCP. Use when executing Smalltalk expressions, verifying object state or intermediate values, debugging code incrementally, checking the Smalltalk image connection, or running quick experiments.

mumez/smalltalk-dev-plugin · 49 tokens

gdb-cli

GDB debugging assistant for AI agents - analyze core dumps, debug live processes, investigate crashes and deadlocks with source code correlation.

aboalrejal-ai/skills · 29 tokens

python-performance-optimization

Profile and optimize Python code using cProfile, memory profilers, and performance best practices. Use when debugging slow Python code, optimizing bottlenecks, or improving application performance.

beel-collab/presets.dev · 35 tokens

debugging

Production-grade skill for C++ debugging. Covers GDB, LLDB, sanitizers, memory debugging, crash analysis, and systematic bug investigation techniques.

pluginagentmarketplace/custom-plugin-cpp · 33 tokens