Help us improve
Share bugs, ideas, or general feedback.
Validates SAP Analytics Cloud custom widget JSON metadata and JavaScript structure for schema compliance, required fields, lifecycle functions, data bindings, and security best practices. Outputs a report with status, critical issues, and warnings.
npx claudepluginhub andreafusar/https-github.com-secondsky-sap-skills --plugin sap-sac-custom-widgetHow this command is triggered — by the user, by Claude, or both
Slash command
/sap-sac-custom-widget:widget-validate file_pathThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# SAC Custom Widget Validation Command Validate SAP Analytics Cloud custom widget files (widget.json and widget.js) for schema compliance, required fields, and best practices. ## Usage ## Validation Categories ### 1. widget.json Schema Validation **Required Root Fields**: - `id` - Unique identifier (reverse domain notation: com.company.widget) - `version` - Semantic version (1.0.0) - `name` - Display name - `vendor` - Company/author name - `webcomponents` - Array of component definitions **Required webcomponents Fields**: - `kind` - Component type (main, styling, builder) - `tag` - ...
/widget-validateValidates SAP Analytics Cloud custom widget JSON metadata and JavaScript structure for schema compliance, required fields, lifecycle functions, data bindings, and security best practices. Outputs a report with status, critical issues, and warnings.
/sac-debugGuides debugging of SAC script issues via info gathering, common error analysis (e.g., undefined functions, null checks), code fixes, and console logging tips. Optional error arg.
/auditAudits the current codebase for SvelteKit and Svelte 5 best practice violations, reporting file/line locations, explanations, correct patterns, and severity ratings (critical/warning/info).
/validate-apiValidates JavaScript API class implementation for a Scopy plugin against A1-A7 quality checks, generating a summary report with PASS/FAIL table.
/json-validatorValidates JSON against schemas (draft-07, 2019-09, 2020-12), formats and minifies JSON, runs JSONPath queries, compares JSON diffs, and reports detailed syntax and type errors.
/release-checkRuns pre-release validation pipeline on a component, auditing design alignment, accessibility, tokens, docs, guidelines, and changes. Produces release package, sign-off checklist, and gate decisions.
Share bugs, ideas, or general feedback.
Validate SAP Analytics Cloud custom widget files (widget.json and widget.js) for schema compliance, required fields, and best practices.
/widget-validate [file_path]
/widget-validate widget.json
/widget-validate src/widget.js
/widget-validate --all
Required Root Fields:
id - Unique identifier (reverse domain notation: com.company.widget)version - Semantic version (1.0.0)name - Display namevendor - Company/author namewebcomponents - Array of component definitionsRequired webcomponents Fields:
kind - Component type (main, styling, builder)tag - HTML custom element tag (lowercase with hyphens)url - JavaScript file URLOptional but Recommended:
description - Widget descriptionlicense - License typeicon - Widget icon pathintegrity - SHA256 hash for productionproperties - Property definitionsmethods - Script-callable methodsevents - Custom eventsdataBindings - Data binding configurationRequired Elements:
customElements.define() call matching tag in JSONattachShadow({ mode: "open" }) for Shadow DOMRequired Lifecycle Functions:
onCustomWidgetBeforeUpdate(changedProperties)onCustomWidgetAfterUpdate(changedProperties)Recommended Lifecycle Functions:
onCustomWidgetResize()onCustomWidgetDestroy()Property Patterns:
propertiesChanged event dispatch on setIf dataBindings is defined:
feeds arrayid, description, typedimension, mainStructureMember, measureProduction Readiness:
ignoreIntegrity should be false for productionintegrity hash should be present and validWarning-Level:
ignoreIntegrity: true (development only)## SAC Widget Validation Report
**File**: [filename]
**Type**: [widget.json / widget.js]
**Status**: [PASS / FAIL / WARNINGS]
### Critical Issues (X found)
1. [Line X]: [Issue description]
**Current**: `[problematic code]`
**Required**: `[correct pattern]`
### Warnings (X found)
1. [Line X]: [Issue description]
**Recommendation**: [How to fix]
### Suggestions (X found)
1. [Issue description]
**Best Practice**: [Recommendation]
### Summary
- Critical: X (must fix)
- Warnings: X (should fix)
- Suggestions: X (consider)
### Cross-Validation
[Results of JSON ↔ JS consistency check if applicable]
/widget-validate widget.json
/widget-validate widget.js
/widget-validate --all
// GOOD: lowercase with hyphens
"tag": "my-custom-widget"
// BAD: uppercase or underscores
"tag": "MyCustomWidget"
"tag": "my_custom_widget"
// Valid types
"type": "string"
"type": "integer"
"type": "number"
"type": "boolean"
"type": "array"
"type": "object"
"type": "Color" // SAC special type
"type": "Selection" // SAC special type
// REQUIRED - will fail validation if missing
onCustomWidgetBeforeUpdate(changedProperties) { }
onCustomWidgetAfterUpdate(changedProperties) { }
// RECOMMENDED - warning if missing
onCustomWidgetResize() { }
onCustomWidgetDestroy() { }
// Tag in widget.json
"tag": "my-widget"
// Must match in widget.js
customElements.define("my-widget", MyWidget);
When this command is invoked:
--all, find all widget.json and widget.js files in the project