スキルOfficialdevelopment
🔍idmp-openapi-explorer
- プラグイン
- idmp-plugin
- ソース
- GitHub で見る ↗
説明
IDMP OpenAPI エクスプローラスキル(API の仕様や実装内容を調べるツール)。 スキーマパス(APIの構成図)、必須入力項目、生成されたコマンドを確認するときに使用します。スキーマと生成されたコマンドのオプションをすべて試し尽くした後に、初めて生のAPI直叩きへ切り替えてください。
原文を表示
IDMP OpenAPI explorer skill. Use it to inspect schema paths, required inputs, and generated commands; fall back to raw API only after schema and generated commands are exhausted.
ユースケース
- ✓APIのスキーマパスを確認するとき
- ✓必須入力項目を調べるとき
- ✓生成されたコマンドを確認するとき
- ✓APIオプションを試し尽くすとき
本文(日本語訳)
OpenAPI エクスプローラ
最初に ../idmp-shared/SKILL.md をお読みください。
このスキルで学べること
- IDMP操作の正確な
service.resource.methodを見つける - 実行前に必要なパス、クエリ、本体の入力内容を確認する
- 検証、ページネーション(複数ページの取得)、リスク対応には生成されたコマンドを優先する
- 生のAPI(生APIと呼ぶ)は管理された代替手段としてのみ使用する
推奨リファレンス
事前に解決が必要な文脈
| 文脈 | 生API、または生成されたコマンドによる書き込み前に解決が必須な理由 |
|---|---|
| 対象操作 | ペイロード(送信するデータ構造)の形を信用する前に、正確な service.resource.method または生API のパスが必要です |
| 所有スコープ | elementId、elementTemplateId、eventId などのパス、クエリのIDは、データ変更前に確定する必要があります |
| 生成コマンドの利用可否 | 生APIへの代替前に、構造化されたコマンドがすでに存在するか判断します |
| 検証対象 | データ書き込みが意図した範囲に実際に合致したかを証明する、その後の読み込みを決定します |
| リスクレベル | 操作がプレビューのみで安全か、それとも実際の --ack-risk(リスク承認フラグ)実行に適するか判断します |
制限付きの実行ルール
- データ書き込みの場合、最初にスキーマ(データ構造の仕様書)を確認し、
--dry-run(試行実行)でプレビュー、--ack-riskで実行、読み込みで結果を検証する - 生成されたコマンドがあれば常に優先する。生APIは標準ではなく管理された代替手段である
- 見た目が近いスキーマパスはデータ変更には不十分。書き込み前に正確なパスと必須フィールドを確認する
- 生API成功は、等価な生成コマンドのスコープと再度の読み込みが一致しない限り、正しさの証拠にはならない
利用者の作業フロー
- element(要素)、attribute(属性)、analysis(分析)、panel(パネル)、dashboard(ダッシュボード)、event(イベント)、notification(通知)などの最寄りの領域別スキルから始める
idmp-cli schemaまたはidmp-cli schema searchでスキーマパス、リスクレベル、必須フィールドを特定する- スキーマ確認後、生成されたコマンドを優先する。これにより検証とリスク確認が機能したまま保たれる
- 生成されたコマンドがない場合、または低レベルなリクエスト確認が必要な場合のみ生APIを使用する
- データ書き込みの場合、スキーマを最初に確認し、
--dry-runでプレビュー、--ack-riskで実行、読み込みで検証する
主要コマンド
idmp-cli schema
idmp-cli schema search element
idmp-cli schema element.elements.list
idmp-cli schema attribute.historydata.list
idmp-cli element elements list --params '{"parentId":123}'
idmp-cli attribute historydata list --params '{"elementId":1,"attributeId":2,"current":1,"size":20,"start":1704067200000,"end":1704153600000}'
idmp-cli api GET /api/v1/elements --params '{"parentId":123}'
idmp-cli api POST /api/v1/elements/batch/attributes/data --data '{"elementIds":[123],"attributeNames":["temperature"]}'
idmp-cli api POST /api/v1/elements/batch/attributes/data --ack-risk --dry-run --data '{"elementIds":[123],"attributeNames":["temperature"]}'
例外的な対応パターン
schema searchが結果を返さない場合:検索用語を広げて、隣接する領域を確認してから生APIを検討する- 生成されたコマンドは存在するが検証に失敗する場合:すぐに生APIに切り替えず、
idmp-cli schema ...を使って入力を修正する - パネル検証の分割が不明な場合:
panel verify createは時間範囲の本体(fromとto)だけを平文の--dataで受け取ります。elementIdなどの所有者パラメータとパネル全体の情報はpanel.panels.query/panel.panels.createに属し、panel verify create-postは高度なクエリ用に予約されています - ページネーション付きの読み込みが不完全に見える場合:
--page-all、--page-limit、小さい--page-delayを使用する - 生APIは成功するがシステムの結果が誤っている場合:生成されたコマンドフローと同じID、スコープ、ルート文脈を使用したことを確認する
- データ書き込みのパスが不明な場合:停止し、スキーマを改めて確認し、リクエスト本体を推測しない
検証シナリオ
idmp-cli schema search elementでスキーマパスを見つけるidmp-cli schema element.elements.listなど特定のスキーマを確認する- 既知の要素スコープに対応する生成されたコマンドを実行する
- 別領域のスキーマ(例:
attribute.historydata.list)を確認する - スキーマ確認後、
idmp-cli api POST /api/v1/elements/batch/attributes/data --data '{"elementIds":[123],"attributeNames":["temperature"]}'で生APIを呼び出し、安全なプレビューパスと生成されたコマンドの動作が一致することを確認する
原文(English)を表示
OpenAPI Explorer
Read ../idmp-shared/SKILL.md first.
What this skill covers
- Find the exact
service.resource.methodfor an IDMP operation. - Inspect required path, query, and body inputs before execution.
- Prefer generated commands for validation, paging, and risk handling.
- Use raw API only as a controlled fallback.
Recommended reference
Missing context to resolve first
| Context | Why it must be resolved before a raw or generated write |
|---|---|
| Target operation | You need the exact service.resource.method or raw API path before you can trust the payload shape. |
| Owner scope | Path or query IDs such as elementId, elementTemplateId, or eventId must be fixed before mutation. |
| Generated-command availability | Decide whether a structured command already exists before falling back to raw API. |
| Verification target | Decide which follow-up read will prove the write actually matched the intended scope. |
| Risk level | Decide whether the operation is safe for preview only or for a real --ack-risk execution. |
Constrained live behaviors
- For writes, inspect schema first, preview with
--dry-run, execute with--ack-risk, and verify by reading the result back. - Prefer generated commands whenever they exist; raw API is the controlled fallback, not the default path.
- A schema path that looks close is not good enough for mutation; confirm the exact path and required body before sending the write.
- Raw API success is not proof of correctness unless the equivalent generated-command scope and reread match.
Operator workflow
- Start with the nearest domain skill first, such as element, attribute, analysis, panel, dashboard, event, notification, or a workflow skill.
- Use
idmp-cli schemaoridmp-cli schema searchto identify the exact schema path, risk level, and required fields. - Prefer generated commands after the schema check so validation, paging, and risk prompts stay intact.
- Use raw API only when no generated command covers the case or when low-level request confirmation is necessary.
- For writes, inspect schema first, preview with
--dry-run, execute with--ack-risk, and verify by reading the result back.
Key commands
idmp-cli schema
idmp-cli schema search element
idmp-cli schema element.elements.list
idmp-cli schema attribute.historydata.list
idmp-cli element elements list --params '{"parentId":123}'
idmp-cli attribute historydata list --params '{"elementId":1,"attributeId":2,"current":1,"size":20,"start":1704067200000,"end":1704153600000}'
idmp-cli api GET /api/v1/elements --params '{"parentId":123}'
idmp-cli api POST /api/v1/elements/batch/attributes/data --data '{"elementIds":[123],"attributeNames":["temperature"]}'
idmp-cli api POST /api/v1/elements/batch/attributes/data --ack-risk --dry-run --data '{"elementIds":[123],"attributeNames":["temperature"]}'
Exception paths
schema searchreturns no match: broaden the search term, inspect the adjacent domain, and only then consider raw API.- A generated command exists but validation fails: fix the inputs using
idmp-cli schema ...instead of switching immediately to raw API. - The panel verify split is unclear:
panel verify createonly accepts the time-range body withfromandtovia plain--data; owner params such aselementIdand full panel DTO fields belong onpanel.panels.query/panel.panels.create, whilepanel verify create-postis reserved for the advanced-query DTO. - A paginated read looks incomplete: use
--page-all,--page-limit, and a small--page-delay. - Raw API works but the product still looks wrong: confirm you used the same IDs, scope, and root context as the generated command flow.
- A write path is unclear: stop, inspect schema again, and do not guess the request body.
Validation scenarios
- Find a schema path with
idmp-cli schema search element. - Inspect an exact schema such as
idmp-cli schema element.elements.list. - Run the corresponding generated command for a known element scope.
- Inspect a second schema in another domain, such as
attribute.historydata.list. - Use a raw API call only after the schema check with
idmp-cli api POST /api/v1/elements/batch/attributes/data --data '{"elementIds":[123],"attributeNames":["temperature"]}', then confirm the safe preview path and the generated-command behavior still match.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。