es5-compliance

Convert ES6+ ServiceNow server-side scripts to ES5-compatible syntax.

77|23|Updated Jul 16, 2025
One-click install
npx skills add https://github.com/serac-labs/serac --skill es5-compliance-serac-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: es5-compliance
Source: https://github.com/serac-labs/serac/tree/main/packages/opencode/src/bundled-skills/es5-compliance
Command: npx skills add https://github.com/serac-labs/serac --skill es5-compliance-serac-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ServiceNow uses the Rhino engine, which only supports ES5 JavaScript. This skill helps developers write and convert server-side code to ES5 to avoid syntax errors and runtime failures.

Core Features & Use Cases

  • Enforces ES5 syntax for server-side code in ServiceNow (business rules, script includes, background scripts, scheduled jobs, workflows).
  • Provides ES5-friendly patterns and practical conversion guidelines to migrate existing ES6+ code.
  • Offers automatic validation guidance to ensure compatibility across instances.

Quick Start

Convert your server-side ServiceNow scripts to ES5 syntax using the guidelines in this skill.

Frequently Asked Questions about es5-compliance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert ES6+ JavaScript to ES5 for ServiceNow server-side scripts?

To convert ES6+ JavaScript to ES5 for ServiceNow server-side scripts, you must identify and replace modern syntax with ES5-compatible equivalents. This ensures compatibility with the Rhino engine used across business rules, script includes, and scheduled jobs.

Why does my ServiceNow server script fail with ES6 syntax?

ServiceNow server scripts fail with ES6 syntax because the platform uses the Rhino engine, which only supports ES5 JavaScript. Using modern constructs causes syntax errors and runtime failures in business rules, script includes, and background scripts.

What JavaScript syntax is supported in ServiceNow background scripts and scheduled jobs?

ServiceNow background scripts and scheduled jobs support ES5 JavaScript syntax. You must enforce ES5 patterns and avoid ES6+ constructs to ensure Rhino compatibility and prevent runtime failures across instances.

Can I use ES6 features in ServiceNow business rules and script includes?

You cannot use ES6 features in ServiceNow business rules and script includes because the Rhino engine requires ES5 syntax. You must apply ES5-friendly patterns and conversion guidelines to migrate existing code.

What is the best way to validate ES5 compliance for ServiceNow workflows?

The best way to validate ES5 compliance for ServiceNow workflows is to use a guided validation workflow. This process applies pattern mappings and enforces ES5 syntax to ensure compatibility across instances.