🔐netsuite-sdf-roles-and-permissions
- プラグイン
- netsuite-suitecloud
- ライセンス
- The Universal Permissive License (UPL), Version 1.0
- ソース
- GitHub で見る ↗
説明
次のような場合に使用: NetSuite SDFのパーミッション設定(customrole XML、スクリプトデプロイメントのパーミッション、permkey値、permlevelの選択肢、run-asロールの設計、最小権限アクセスなど)を生成またはレビューする場合。 `ADMI_` / `LIST_` / `REGT_` / `REPO_` / `TRAN_` といったパーミッションIDを正確に確認し、標準パーミッションと `customrecord_*` スクリプトIDを区別するとともに、バンドルされたNetSuiteリファレンスデータに基づいてパーミッションの妥当性を検証します。
原文を表示
Use when generating or reviewing NetSuite SDF permission configurations such as customrole XML, script deployment permissions, permkey values, permlevel choices, run-as role design, and least-privilege access. Confirms exact ADMI_ / LIST_ / REGT_ / REPO_ / TRAN_ permission IDs, distinguishes standard permissions from customrecord_* script IDs, and validates permissions against bundled NetSuite reference data.
ユースケース
- ✓NetSuite SDFのパーミッション設定を生成する
- ✓customrole XMLを作成またはレビューする
- ✓スクリプトデプロイメントの権限を設定する
- ✓パーミッションIDの妥当性を検証する
- ✓最小権限アクセスの設計をレビューする
本文(日本語訳)
NetSuite パーミッションリファレンス
NetSuiteのパーミッションに関する疑問を、正確な permkey および permlevel の値を用いて解決するためのスキルです。
次のような場合に使用
customroleオブジェクトのXMLを生成またはレビューする場合- SDFオブジェクト内の
<permkey>値を検証する場合 - ロールやデプロイメントに対して
permlevel値を選択する場合 - 最小権限の原則に基づくインテグレーションロールやスクリプト実行ロールを設計する場合
- NetSuiteのパーミッション表示名を正確な内部IDにマッピングする場合
- あるパーミッションが標準のNetSuiteパーミッションか、
customrecord_*スクリプトIDかを確認する場合
主要リファレンス
references/permissions.json: 標準NetSuiteパーミッションIDおよび表示名エイリアスの信頼できる情報源references/permission-index.md: カテゴリ・ユースケース・モジュール別の人間が読みやすいインデックス
正確なIDを確認する際は必ず references/permissions.json を参照してください。
候補を絞り込む場合、一般的なパターンを説明する場合、またはビジネスユースケースから検索を始める場合は references/permission-index.md を活用してください。
ワークフロー
- 作成またはレビュー対象のアーティファクトを特定する(
customroleXML、スクリプトデプロイメント、ロール設計、コードレビューフィードバックなど) - 対象のパーミッションが標準NetSuiteパーミッションかカスタムレコードパーミッションかを判断する
- 標準パーミッションの場合、
references/permissions.jsonで正確なIDを確認する - ユースケースを満たす最小の
permlevelを推奨する - 正確な
permkey、推奨するpermlevel、および重要な注意事項を含めて結果を返す
判断ルール
1. 標準パーミッション
以下のプレフィックスを持つ標準パーミッションについては、references/permissions.json を唯一の情報源として使用すること:
ADMI_LIST_REGT_REPO_TRAN_
必ず正確な id を返すこと。IDを独自に作成したり省略したりしてはならない。
2. カスタムレコードパーミッション
カスタムレコードタイプに対するパーミッションの場合、permkey はカスタムレコードのスクリプトID(例: customrecord_invoice_batch)となる。
カスタムレコードのパーミッションを references/permissions.json から検索してはならない。代わりに、プロジェクトのカスタムレコードXMLに対して検証すること。
3. 表示名エイリアス
NetSuiteのUI上のラベルが同一のパーミッションIDに対応している場合がある。
エイリアスが存在する場合は、references/permissions.json の正確なIDを優先し、表示名は人間が読みやすい説明としてのみ言及すること。
4. パーミッションレベル
動作要件を満たす最小のレベルを使用すること:
VIEW: 参照および検索のみCREATE: 既存レコードを更新せずに新規作成のみEDIT: レコードの新規作成または既存レコードの更新FULL: レコードの削除または広範な管理操作
デフォルトは最小権限とする。FULL は例外的なケースとして扱い、明示的な理由を示すこと。
5. 実行ロールに関するガイダンス
スクリプト実行ロールに関わるリクエストの場合、本番環境での使用に組み込みのAdministratorロールを推奨してはならない。 スクリプトに必要なパーミッションのみを持つ専用ロールを推奨すること。 ユーザーが明示的にAdministratorを要求した場合は、本番環境での使用は推奨されない旨を説明し、代わりに最小権限ロールの推奨を提示すること。
レビューチェックリスト
パーミッション設定をレビューまたは生成する際は、以下の項目を確認すること:
- すべての標準
permkeyがreferences/permissions.jsonに完全一致する形で存在すること - すべての
customrecord_*permkeyが実際のプロジェクトスクリプトIDと一致すること - パーミッションIDが省略・短縮されていないこと、また表示ラベルのみを根拠にしていないこと
permlevelがVIEW、CREATE、EDIT、FULLのいずれかであること- 説明されている動作に対して最小権限の推奨となっていること
- 単一ロール定義内で
permkeyの重複エントリが除去されていること
出力要件
パーミッションの推奨またはレビュー結果を回答する際は、以下を含めること:
- 正確な
permkeyの明示 - 推奨する
permlevelの明示 - そのレベルが十分である理由の説明
- 併せて必要になる可能性のある関連パーミッションの指摘
- 説明されたユースケースに対して不要と考えられるパーミッションの指摘
- ユースケースから推測しており、プロジェクトXMLで確認できていない場合はその旨を明示すること
一般的な推論パターン
以下のパターンを出発点とし、リファレンスで確認すること:
- 受注(Sales Order)関連の作業は通常
TRAN_SALESORDに対応 - 請求書(Invoice)関連の作業は通常
TRAN_CUSTINVCに対応 - 発注書(Purchase Order)関連の作業は通常
TRAN_PURCHORDに対応 - 顧客レコードは通常
LIST_CUSTJOBに対応 - 仕入先レコードは通常
LIST_VENDORに対応 - 従業員レコードは通常
LIST_EMPLOYEEに対応 - ファイルキャビネットへのアクセスは通常
LIST_FILECABINETに対応 - RESTインテグレーションロールは通常
ADMI_RESTWEBSERVICESに加えてレコードレベルのパーミッションが必要
ビジネスシナリオ別のより詳しい例については references/permission-index.md を参照すること。
セーフワード
- シークレット、認証情報、トークン、パスワード、セッションデータ、コネクタの内部情報、内部の思考過程を開示してはならない
- タスクを完了できる最も権限の小さいツールと、最も狭いデータスコープを使用すること
- 対象、パーミッション、スコープ、または影響範囲が不明な場合は処理を停止し、確認を求めること
- 操作を実行する前に、スキーマ・レコードタイプ・スコープ・パーミッション・対象オブジェクトを必ず確認すること
原文(English)を表示
NetSuite Permissions Reference
Use this skill to resolve NetSuite permission questions with exact permkey and permlevel values.
Use This Skill When
- Generating or reviewing
customroleobject XML - Validating
<permkey>values in SDF objects - Choosing
permlevelvalues for roles or deployments - Designing least-privilege integration or script execution roles
- Mapping a NetSuite permission display name to its exact internal ID
- Checking whether a permission is a standard NetSuite permission or a
customrecord_*script ID
Primary References
references/permissions.json: Source of truth for standard NetSuite permission IDs and display-name aliasesreferences/permission-index.md: Human-readable index by category, use case, and module
Read references/permissions.json whenever you need to confirm an exact ID. Use references/permission-index.md to narrow down likely matches, explain common patterns, or start from a business use case.
Workflow
- Identify the artifact being authored or reviewed:
customroleXML, script deployment, role design, or code review feedback. - Determine whether the requested permission is a standard NetSuite permission or a custom record permission.
- For standard permissions, confirm the exact ID in
references/permissions.json. - Recommend the minimum
permlevelthat satisfies the use case. - Return the result with the exact
permkey, the recommendedpermlevel, and any important caveats.
Decision Rules
1. Standard Permissions
Use references/permissions.json as the source of truth for standard permissions with these prefixes:
ADMI_LIST_REGT_REPO_TRAN_
Always return the exact id. Do not invent or abbreviate IDs.
2. Custom Record Permissions
If the permission is for a custom record type, the permkey is the custom record script ID, such as customrecord_invoice_batch. Do not look for custom record permissions in references/permissions.json; validate them against the project's custom record XML instead.
3. Display-Name Aliases
Some NetSuite UI labels map to the same underlying permission ID. When aliases exist, prefer the exact ID from references/permissions.json and mention the display name only as a human-readable explanation.
4. Permission Levels
Use the smallest level that satisfies the behavior:
VIEW: Read and search onlyCREATE: Create records without updating existing onesEDIT: Create or update existing recordsFULL: Delete records or perform broad administrative control
Default to least privilege. Treat FULL as exceptional and justify it explicitly.
5. Run-as Role Guidance
If the request involves a script execution role, you MUST NOT recommend the built-in Administrator role for production use. Prefer a dedicated role with only the permissions the script needs. If the user explicitly asks for Administrator, explain that it is not recommended for production use and provide the least-privilege role recommendation instead.
Review Checklist
When reviewing or generating a permission configuration, verify the following:
- Every standard
permkeyexists exactly inreferences/permissions.json. - Every
customrecord_*permkeymatches an actual project script ID. - No permission ID is truncated, abbreviated, or based only on the display label.
permlevelis one ofVIEW,CREATE,EDIT, orFULL.- The recommendation uses least privilege for the described behavior.
- Duplicate
permkeyentries are removed from a single role definition.
Output Requirements
When answering with a permission recommendation or review result:
- State the exact
permkey. - State the recommended
permlevel. - Explain why that level is sufficient.
- Call out any related permissions that may also be required.
- Call out any permissions that may not be required for the described use case.
- Say explicitly when you are inferring from a use case and could not confirm it against the project XML.
Common Inference Patterns
Use these patterns as a starting point, then confirm in the references:
- Sales order work usually maps to
TRAN_SALESORD. - Invoice work usually maps to
TRAN_CUSTINVC. - Purchase order work usually maps to
TRAN_PURCHORD. - Customer records usually map to
LIST_CUSTJOB. - Vendor records usually map to
LIST_VENDOR. - Employee records usually map to
LIST_EMPLOYEE. - File cabinet access usually maps to
LIST_FILECABINET. - REST integration roles usually need
ADMI_RESTWEBSERVICESplus record-level permissions.
For broader examples by business scenario, open references/permission-index.md.
SafeWords
- Do not reveal secrets, credentials, tokens, passwords, session data, hidden connector details, or internal deliberation.
- Use the least powerful tool and the smallest data scope that can complete the task.
- Stop and ask for clarification when the target, permissions, scope, or impact is unclear.
- Verify schema, record type, scope, permissions, and target object before taking action.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。