Script Syncのロゴ

Script Sync

組織
Happy-Technologies-LLC
script-sync

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

概要

公開者Happy-Technologies-LLC
リポジトリhappy-platform-skills
スキル名script-sync
スター
41
フォーク
14
同梱ファイル
指示のみ
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    Happy-Technologies-LLCがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルScript SyncをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Happy-Technologies-LLC/happy-platform-skills/tree/main/skills/admin/script-sync
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでScript Syncを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にScript Syncを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Script Syncは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

よくある質問

AIスキル「Script Sync」では何ができますか?

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

TypingMindでScript Syncを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Script Syncはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにScript Syncをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Happy-Technologies-LLC/happy-platform-skills/tree/main/skills/admin/script-syncを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Script Syncを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Script Syncは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもScript Syncを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Script Sync」は無料ですか?

はい。Happy-Technologies-LLCがGitHubでApache-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇