client-scripts

Generate ServiceNow client scripts for onLoad, onChange, and onSubmit events.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers rapidly create ServiceNow client-side scripts (onLoad, onChange, onSubmit) and related patterns, reducing repetitive boilerplate and improving consistency across forms.

Core Features & Use Cases

  • Generate ready-to-use client script templates for common events (onLoad, onChange, onSubmit, onCellEdit) leveraging g_form API and GlideAjax patterns.
  • Enforce best practices for client-side validation, field manipulation, and UI behavior, enabling rapid prototyping and deployment.
  • Use Case: A developer asks to create a new client script for form field validation and dynamic field visibility, and the skill outputs a complete script ready to customize.

Quick Start

Create a new ServiceNow client script for a given form event (onLoad, onChange, onSubmit) using best practices.

Frequently Asked Questions about client-scripts

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

FAQPage Schema
How do I create a ServiceNow client script for onChange field validation?

You can generate a syntactically correct ServiceNow client script for onChange field validation by applying g_form API patterns. This ensures proper client-side validation and dynamic field behavior without repetitive boilerplate.

What is the best way to use GlideAjax in an onLoad ServiceNow script?

The best way to use GlideAjax in an onLoad ServiceNow script is to leverage established GlideForm patterns. This allows the form to retrieve server-side data upon loading, ensuring rapid prototyping and consistent UI logic deployment across forms.

How do I generate an onSubmit client script for ServiceNow form submission?

You can generate an onSubmit client script for ServiceNow form submission by utilizing g_form API best practices. This prevents invalid data entry by applying client-side validation rules right before the form is submitted to the server.

Does this approach support onCellEdit scripts for ServiceNow UI interactions?

Yes, this approach supports generating onCellEdit scripts alongside onLoad, onChange, and onSubmit events. It applies g_form API patterns to handle list editing interactions, ensuring consistent client-side validation and UI behavior across different ServiceNow interfaces.

Why use generated templates for ServiceNow client-side scripts instead of writing from scratch?

Using generated templates for ServiceNow client-side scripts reduces repetitive boilerplate and improves consistency across forms. It enforces best practices for g_form usage and GlideAjax patterns, allowing rapid prototyping and deployment of syntactically correct UI logic.