Logo van Script Sync

Script Sync

Organisatie
Happy-Technologies-LLC
script-sync

Explicit pull, local edit, freshness check, and push workflow for ServiceNow scripts with Happy Platform MCP 6.1

Overzicht

UitgeverHappy-Technologies-LLC
Repositoryhappy-platform-skills
Skillnaamscript-sync
Sterren
41
Forks
14
Meegeleverde bestanden
Alleen instructies
LicentieApache-2.0
Links
  • Instructies in Markdown

    Een SKILL.md-bestand dat het model laadt wanneer nodig, zodat het alleen tokens kost als een verzoek er daadwerkelijk bij past.

  • Werkt met elk LLM

    AI-skills zijn gewone Markdown, geen aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door Happy-Technologies-LLC op GitHub. Lees de broninhoud voordat je de skill installeert.

Installatie

Installeer de AI-skill Script Sync in TypingMind om deze met elke LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map — het leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/Happy-Technologies-LLC/happy-platform-skills/tree/main/skills/admin/script-sync
  4. Schakel de skill in elke chat in waarin je deze beschikbaar wilt hebben.
Plug-ins → Skills → Nieuwe skill → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Happy-Technologies-LLC/happy-platform-skills.git /tmp/happy-platform-skills
mkdir -p .claude/skills
cp -r /tmp/happy-platform-skills/skills/admin/script-sync .claude/skills/script-sync
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Script Sync in een willekeurige chat in TypingMind in en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek erbij past, laadt het model zelf de volledige instructies — je hoeft de skill nooit handmatig aan te roepen en deze kost pas tokens wanneer je de skill daadwerkelijk gebruikt.

Het model laadt Script Sync automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Script Sync niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Script Pull, Edit, and Push Workflow

Overview

Happy Platform MCP 6.1 has no automatic script synchronization or watch tool. Use this explicit workflow to pull the current record, edit a local copy, check that the remote record has not changed, and push the intended script field with SN-Update-Record.

This workflow favors reviewable changes and conflict detection over background automation. It works for Business Rules, Script Includes, Client Scripts, UI Scripts, UI Actions, Scheduled Jobs, and other records whose script is stored in a table field.

Prerequisites

  • Read and write access to the target script table
  • The target ServiceNow instance name
  • A local directory outside the installed npm package
  • Git or another local version-control system
  • The table name, record sys_id, and script field name
  • The correct application scope and update set selected before any push

Procedure

1. Discover the record

Use a bounded query with explicit fields. Always route the request to the intended instance.

text
Tool: SN-Query-Table
Parameters:
  table_name: sys_script_include
  query: name=IncidentUtils
  fields: sys_id,name,script,sys_updated_on,sys_mod_count,sys_scope
  limit: 5
  instance: dev

Stop if the query is ambiguous. Select one sys_id; do not update multiple same-named scripts by assumption.

2. Pull the authoritative record

text
Tool: SN-Get-Record
Parameters:
  table_name: sys_script_include
  sys_id: <script_sys_id>
  fields: sys_id,name,script,sys_updated_on,sys_mod_count,sys_scope
  instance: dev

Write only the returned script value to a local .js file. In adjacent local metadata, record the table, sys_id, instance, sys_updated_on, and sys_mod_count from this pull. Do not put ServiceNow credentials in the file or repository.

Example layout:

text
scripts/servicenow/script_includes/IncidentUtils.js
scripts/servicenow/script_includes/IncidentUtils.metadata.json

3. Edit and review locally

Edit the JavaScript in the IDE, run applicable static checks or tests, and inspect the Git diff. Keep the change scoped to the script field you intend to deploy.

4. Check remote freshness before pushing

Immediately before updating, retrieve the record again:

text
Tool: SN-Get-Record
Parameters:
  table_name: sys_script_include
  sys_id: <script_sys_id>
  fields: sys_id,script,sys_updated_on,sys_mod_count
  instance: dev

Compare both sys_updated_on and sys_mod_count with the saved pull metadata. Also compare the returned script with the original local base. If any value has changed, stop: pull the new version, review the remote changes, and merge them locally. Never overwrite a fresher remote edit automatically.

5. Push the reviewed script field

After the freshness check passes, update only the intended field:

text
Tool: SN-Update-Record
Parameters:
  table_name: sys_script_include
  sys_id: <script_sys_id>
  data:
    script: <reviewed_local_script>
  instance: dev

Do not use a background script for this normal record update. The generic MCP update is the primary operation and preserves per-call instance routing.

6. Verify the push

Read the record again with SN-Get-Record. Confirm that the remote script matches the reviewed local content and record the new sys_updated_on and sys_mod_count. Then verify the associated sys_update_xml capture in the current update set with a bounded SN-Query-Table query.

7. Repeat explicitly for later edits

There is no watch mode in Happy Platform MCP 6.1. For each change, repeat the freshness check, update, and verification. A local file watcher may run linting or tests, but it must not push ServiceNow changes without the explicit conflict check and update sequence above.

Supported Record Patterns

Script typeTableCommon script field
Business Rulesys_scriptscript
Script Includesys_script_includescript
Client Scriptsys_script_clientscript
UI Scriptsys_ui_scriptscript
UI Actionsys_ui_actionscript
Scheduled Jobsysauto_scriptscript
Fix Scriptsys_script_fixscript

Confirm unfamiliar table and field names with SN-Get-Table-Schema before adapting this workflow.

Best Practices

  • Set the application scope and update set before pushing configuration.
  • Use explicit instance on every live record call, especially in concurrent work or critical environments.
  • Pull immediately before editing and check freshness immediately before push.
  • Limit field selection to the script and concurrency metadata you need.
  • Keep the original pulled version until verification succeeds.
  • Commit local changes only after reviewing the diff and remote verification.
  • Never store instance credentials or access tokens with local script files.

Troubleshooting

The remote record changed after the pull

Do not push. Save the local edits, retrieve the new remote script, and perform a three-way merge using the original pull as the base. Re-run the freshness check after resolving the merge.

The update succeeded but no update-set record appears

Confirm the correct application scope and current update set, then inspect sys_update_xml. Do not retry blindly: first determine whether the table or field is update-set captured.

The local and remote scripts differ after update

Retrieve the record again and compare exact content. Check whether a business rule, formatter, or scoped-app policy transformed the value. Treat the remote record as authoritative until the discrepancy is understood.

Continuous synchronization is required

Happy Platform MCP 6.1 does not provide automatic pull, push, or watch tools. Keep the explicit workflow, or build a separately reviewed deployment pipeline with equivalent freshness and verification gates.

Related Skills

  • admin/update-set-management
  • development/business-rules
  • development/script-includes

Veelgestelde vragen

Wat doet de AI-skill Script Sync?

Explicit pull, local edit, freshness check, and push workflow for ServiceNow scripts with Happy Platform MCP 6.1

Waarom Script Sync gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Script Sync bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model, en je kunt midden in een chat van model wisselen zonder dat de skill niet meer werkt. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Script Sync in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/Happy-Technologies-LLC/happy-platform-skills/tree/main/skills/admin/script-sync. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Script Sync gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Script Sync gebruiken?

Zoveel als je wilt. Zolang een model skills ondersteunt, kun je Script Sync ermee gebruiken: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama en meer. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Script Sync gratis?

Ja. Deze skill is door Happy-Technologies-LLC op GitHub gepubliceerd onder de licentie Apache-2.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. Deze volgt het open Agent Skills-formaat: een bestand met de naam SKILL.md met een naam en beschrijving, plus eventuele scripts, sjablonen of referentiebestanden die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇