claude-skills/

Anthropic公式スキル・プラグインの日本語ディレクトリ

last sync 22h ago
スキルOfficialdevelopment

🔧now-sdk

プラグイン
servicenow-sdk
引数
[topic]

説明

次のような場合に使用: - ユーザーが fluent、ServiceNow、または now-sdk に言及したとき - ユーザーが fluent アプリケーション内での編集を求めたとき(プロジェクトルートに `now.config.json` が存在することで識別) - ユーザーがライブインスタンスのデータを必要としているとき。具体的には以下の操作が該当する: - `sys_id` の検索 - テーブルのカラムやスキーマの確認 - レコードがすでに存在するかどうかのチェック - 選択肢(choice)の値の取得 - ロールまたはスコープ情報の参照

原文を表示

Use whenever the user mentions fluent, ServiceNow, or the now-sdk, OR when the user prompts for edits within a fluent application (identified by a now.config.json at the project root). Also use when the user needs live instance data — looking up a sys_id, inspecting table columns or schema, checking whether a record already exists, fetching choice values, or reading role or scope info.

ユースケース

  • fluent、ServiceNow、now-sdkに言及したとき
  • fluent内での編集を求めるとき
  • sys_idを検索するとき
  • テーブルのカラムやスキーマを確認するとき
  • レコード存在確認や選択肢値を取得するとき

本文(日本語訳)

初期セットアップ(オリエンテーション)

このスキルがセッション内で初めて呼び出された際は、利用可能なすべてのCLI機能とフルエントの基礎を把握するために、以下の2つのコマンドを実行してください:

npx @servicenow/sdk --help
npx @servicenow/sdk explain quickstart --list --format=raw

npx @servicenow/sdk --help は利用可能なサブコマンドの一覧を表示しますが、各フラグは表示されません。 サブコマンドを初めて使用する前には、必ず npx @servicenow/sdk <subcommand> --help を実行して、完全なオプションを確認してください。 フラグ名を推測することは絶対に避けてください — フラグはサブコマンドごとに異なり、推測するとエラーの原因になります。

その後、各クイックスタートのトピックを全文で読んでください:

npx @servicenow/sdk explain <quickstart-topic> --format=raw

SDKドキュメント(explain)

重要: --peek オプションでサマリーを確認してから、トピックの全文を開いてください。これを怠ると、誤ったトピックを開いてコンテキストの無駄遣いにつながります。

利用可能なすべてのトピックをタグ付きで表示するには:

npx @servicenow/sdk explain --list --format=raw

トピックを検索し、マッチした項目の説明を表示するには:

npx @servicenow/sdk explain <topic> --list --peek --format=raw

トピックをプレビューするには:

npx @servicenow/sdk explain <topic> --peek --format=raw

全文を読むことを確認したら、以下のように開いてください:

npx @servicenow/sdk explain <topic> --format=raw

検索対象の例

  • メタデータタイプBusinessRuleTableAclFlowScriptIncludeClientScript
  • スキルbuildtransformdeployauth などのワークフロー
  • 規約namingstructurescopingfile-layout

あらゆるタスクにおける作業の起点

  • まず npx @servicenow/sdk explain <search-term> --list --format=raw でトピックを検索することから始めてください。
  • 次に、関連するトピックを読み進めます。全文を読む前に、必ず npx @servicenow/sdk explain <topic> --peek --format=raw で説明をプレビューしてください。
  • 説明が関連していると判断できた場合は、npx @servicenow/sdk explain <topic> --format=raw で全文を読んでください。
  • 多くの項目は複数のトピックにまたがっています。そのため、変更を加える前に関連するすべてのトピックを読むことが非常に重要です。

explainが失敗した場合

  • explain@servicenow/sdk バージョン 4.6.0 以降でのみ利用可能です。コマンドが見つからない場合はアップグレードしてください。
  • No documentation found for "<topic>" — トピック名が誤っています。--list を試してください。
  • No match for "<topic>" — 別の検索キーワードを使用してください。

ライブインスタンスへのクエリ(query)

query@servicenow/sdk バージョン 4.8.0 以降でのみ利用可能です。 コマンドが見つからない場合は、インストール済みバージョンを確認し、ユーザーにアップグレードを促してください。

query の呼び出しを記述する前に、正確なフラグ名を確認するためにサブコマンドのヘルプを実行してください。 トップレベルの --help ではサブコマンドのフラグは表示されないため、推測は避けてください:

npx @servicenow/sdk query --help

より詳しい使い方とエンコードクエリの形式については、以下のガイドを全文で読んでください:

npx @servicenow/sdk explain query --format=raw
npx @servicenow/sdk explain encoded-query-guide --format=raw

フィルタリングに必要なフラグは -q / --query です。すべてのクエリ呼び出しには、テーブル名とともにこのフラグが必要です。 また、機械可読なJSON形式で出力するために、必ず -o json フラグを指定してください:

npx @servicenow/sdk query <table> -q '<query>' -o json
原文(English)を表示

Getting oriented

The first time this skill is invoked in a session, run these two commands to orient yourself on all available CLI features and fluent fundamentals:

npx @servicenow/sdk --help
npx @servicenow/sdk explain quickstart --list --format=raw

npx @servicenow/sdk --help lists available subcommands but does not show their flags. Before using any subcommand for the first time, always run npx @servicenow/sdk <subcommand> --help to see its full options. Never guess flag names — they vary by subcommand and guessing leads to errors.

Then read each quickstart topic in full:

npx @servicenow/sdk explain <quickstart-topic> --format=raw

SDK Documentation (explain)

IMPORTANT: Never open a full topic without first viewing the summary via the --peek option! This will prevent you from accidentally opening the wrong topic and wasting context space.

To show all available topics with their related tags:

npx @servicenow/sdk explain --list --format=raw

To search for topics, showing the descriptions of all matches:

npx @servicenow/sdk explain <topic> --list --peek --format=raw

To preview a topic:

npx @servicenow/sdk explain <topic> --peek --format=raw

Once you are certain you want to read the full topic, open it like this:

npx @servicenow/sdk explain <topic> --format=raw

What to search for

  • Metadata typesBusinessRule, Table, Acl, Flow, ScriptInclude, ClientScript
  • Skills — workflows like build, transform, deploy, auth
  • Conventionsnaming, structure, scoping, file-layout

For any task — always start here

  • Start by searching for topics using npx @servicenow/sdk explain <search-term> --list --format=raw.
  • Continue by reading the relevant topics, always using npx @servicenow/sdk explain <topic> --peek --format=raw, to preview the description before committing to read the full topic.
  • Provided the description is relevant, continue to read the full topic using npx @servicenow/sdk explain <topic> --format=raw.
  • Many items are spread out across multiple topics. As such, it is very important to read all relevant topics before making any changes.

If explain fails

  • explain is only available in @servicenow/sdk versions >= 4.6.0 — upgrade if the command is not found.
  • No documentation found for "<topic>" — wrong topic name, try --list
  • No match for "<topic>" — use a different search term

Live Instance Queries (query)

query is only available in @servicenow/sdk versions >= 4.8.0. If the command is not found, check the installed version and inform the user to upgrade.

Before writing any query call, run the subcommand help to get the exact flag names — the top-level --help does not show subcommand flags, so do not guess:

npx @servicenow/sdk query --help

Then read the full usage guide and encoded query format guide for deeper context:

npx @servicenow/sdk explain query --format=raw
npx @servicenow/sdk explain encoded-query-guide --format=raw

The required flag for filtering is -q / --query. Every query call needs it along with the table name Always include the -o json flag to output machine readable json

npx @servicenow/sdk query <table> -q '<query>' -o json

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。