/servicenow:es5-compliancefrom ServiceNow
Enforces ES5-only syntax for ServiceNow server-side scripts (Rhino engine). Converts ES6+ features (const/let, arrow functions, template literals, destructuring, for-of, async/await) to ES5 equivalents.
Ships in ServiceNow. 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.
ServiceNow runs on Mozilla Rhino engine which only supports ES5 JavaScript (2009 standard). All server-side scripts MUST use ES5 syntax.
| ES6+ Syntax | ES5 Alternative |
|---|---|
const x = 5 | var x = 5 |
let items = [] | var items = [] |
() => {} | function() {} |
`Hello ${name}` | 'Hello ' + name |
for (x of arr) | for (var i = 0; i < arr.length; i++) |
{a, b} = obj | var a = obj.a; var b = obj.b; |
[a, b] = arr | var a = arr[0]; var b = arr[1]; |
...spread | Use Array.prototype.slice.call() |
class MyClass {} | Use constructor functions |
async/await | Use GlideRecord callbacks |
Promise | Use GlideRecord with callbacks |
// WRONG - ES6
const MAX_RETRIES = 3
let currentUser = gs.getUser()
// CORRECT - ES5
var MAX_RETRIES = 3
var currentUser = gs.getUser()
// WRONG - Arrow functions
var active = incidents.filter((inc) => inc.active)
var process = () => {
return "done"
}
// CORRECT - ES5 functions
var active = []
for (var i = 0; i < incidents.length; i++) {
if (incidents[i].active) {
active.push(incidents[i])
}
}
var process = function () {
return "done"
}
// WRONG - Template literals
var message = `Incident ${number} assigned to ${user}`
// CORRECT - String concatenation
var message = "Incident " + number + " assigned to " + user
// WRONG - for...of
for (var item of items) {
gs.info(item)
}
// CORRECT - Traditional for loop
for (var i = 0; i < items.length; i++) {
gs.info(items[i])
}
// WRONG - Default parameters
function process(incident, priority = 3) {
// ...
}
// CORRECT - Manual defaults
function process(incident, priority) {
if (typeof priority === "undefined") {
priority = 3
}
// ...
}
Before deploying any server-side script:
const/let declarations - convert to var=> - convert to function()` - convert to string concatenation{a, b} - convert to explicit property accessfor...of loops - convert to index-based loopsClient-side scripts (Client Scripts, UI Policies) run in the browser and MAY support ES6+ depending on user's browser. However, for maximum compatibility, ES5 is still recommended.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
servicenow, es5, rhino-engine, javascript, code-conversion, server-side-scripts
70 skills in this plugin
/acl-securityCreate and debug ServiceNow ACLs (record, field, REST, script-include). Covers role/condition/script patterns, which ACL names can apply to a table or field, field-level visibility, and impersonation testing for row- and field-level security./agent-workspaceBuild ServiceNow Agent Workspace configurations — workspaces, lists, forms, contextual side panels, Agent Assist similar-record finders, and workspace-specific UI actions on sys_aw_* tables./agile-developmentServiceNow Agile Development 2.0 — the rm_team → rm_sprint → rm_story → rm_epic model, the state and point values ServiceNow actually accepts, how a story is attached to a sprint, and the reporting tools (board, burndown, velocity, capacity, standup, retrospective)./approval-workflowsConfigure ServiceNow approval rules and sysapproval_approver records — manager/group/script approvers, multi-level routing, delegation via sys_user_delegate, and parent-record state rollup./asset-managementManage ServiceNow hardware assets, software licenses, and lifecycle states on alm_hardware/alm_license — license allocation, CMDB-to-asset linking, warranty tracking, inventory aggregation (HAM/SAM)./atf-testingBuild ServiceNow Automated Test Framework tests and suites — impersonation, form steps, assertions, server-side script steps, test parameters, and execution via snow_create_atf_test / snow_execute_atf_test.npx claudepluginhub serac-labs/serac --plugin servicenowOther plugins' skills for the same job