widget-coherence

Validate ServiceNow Service Portal widget coherence across Server Script, Client Controller, and HTML Template.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ServiceNow Service Portal widgets can break when server data, client actions, and HTML bindings drift apart. This skill enforces a clear three-way contract to keep server, client, and UI in sync.

Core Features & Use Cases

  • Enforces three-way coordination between Server Script, Client Controller, and HTML Template.
  • Validates data initialization, action handling, and binding consistency across the widget lifecycle.
  • Use Case: when building or debugging a widget, ensure ng-click actions trigger server responses and HTML reflect updated data.

Quick Start

Validate widget coherence by ensuring the server initializes all data, the client implements every action, and the HTML only references server-provided data, then test ng-click and data flow end-to-end.

Frequently Asked Questions about widget-coherence

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

FAQPage Schema
Why does my ServiceNow Service Portal widget break when ng-click actions trigger server responses?

Service Portal widgets break when server data, client actions, and HTML bindings drift apart. Enforcing a three-way contract ensures the server initializes data, the client implements actions, and HTML only references server-provided data to keep them in sync.

How do I validate data binding consistency across Server Script, Client Controller, and HTML Template?

To validate data binding consistency, ensure the server initializes all data, the client exposes methods for every server action, and the HTML template references only server-provided data. Then test ng-click interactions and data flow end-to-end.

What is the three-way contract for Service Portal widget development?

The three-way contract requires the server script to initialize data, the client controller to implement actions for server calls, and the HTML template to reference only server-provided data. This coordination prevents widget communication failures.

Can I use this widget coherence check for debugging existing Service Portal widgets?

Yes, the widget coherence check applies to widget creation, modification, and debugging scenarios. It validates that ng-click actions trigger proper server responses and that HTML reflects updated data across the widget lifecycle.

What's the best way to ensure ng-click flows trigger correct server responses in Service Portal widgets?

The best approach is enforcing the three-way contract where the client controller implements every action method that ng-click references, ensuring server responses update data that the HTML template properly binds and displays.