claude-skills/

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

last sync 1h ago
スキルOfficialdevelopment

📊idmp-panel

プラグイン
idmp-plugin

説明

IDMP パネルスキル(医療データ管理の情報表示機能) パネルの一覧表示、詳細情報の確認、パネル検索機能の作成と検証、およびパネルのライフサイクル(利用開始から終了までの過程)をダッシュボード上の配置から独立させて管理するためのスキルです。

原文を表示

IDMP panel skill for listing panels, reading details, creating and validating panel queries, and separating panel lifecycle from dashboard placement.

ユースケース

  • パネルの一覧を表示する
  • パネルの詳細情報を確認する
  • パネル検索機能を作成・検証する
  • パネルのライフサイクルを管理する

本文(日本語訳)

パネル

先に../idmp-shared/SKILL.mdをお読みください。

書き込み前の注意: 🛑 破壊的操作の確認プロトコルに従ってください。読み取り専用コマンドはここでも読み取り専用のままですが、削除・書き込み・修正の操作フローは共有の確認ゲートが必要です。

推奨されるショートカット

ショートカット 目的
+list 1つの要素配下のパネルを一覧表示
+search パネルをグローバルに検索
+templates 1つの要素で利用可能なパネルテンプレートを一覧表示

推奨される参考資料

解決が必要なコンテキスト情報

コンテキスト 作成または検証前に解決が必須な理由
所有要素 リスト表示・取得・名前付け・作成およびすべての検証呼び出しに、最終的なelementIdが必要
パネル候補名 panel.panels.new-nameelementIdと提案されるnameの両方が必要
検証モード このパネルがSQL(データベース言語)を生成すべきか、また通常のquerysqlsチェックが必要か、より高度な検証が必要かを決定
ダッシュボード配置先 パネルをスタンドアロンのままにするか、ワークフロー完了前にダッシュボードに挿入する必要があるかを決定
更新対象の所有者 更新がパネル部分と、ダッシュボード部分のどちらに属するかを決定し、refreshIntervalが正しいparamsブロックに入るようにする

制約のある動作仕様

  • 自然言語でのパネルリクエストはPOST /api/v1/ai/panels/createを優先し、返されたドラフトをpanel.panels.createで保存。構造化パネルDTOワークフロー(データ転送形式)は、ドラフトが不適切または保存が失敗した場合のみ代替手段として使用。
  • panel.panels.new-nameは候補nameが必要。所有要素スコープだけでは呼び出さない。
  • テキストおよび手動パネルは正当に「生成されたSQLは空」を返すため、queryはこれらのパネルタイプには適用不可。
  • panel verify createfromtoを含む時間範囲ペイロードのみ検証。--paramsではなく--dataを使用し、elementIdを送信しない。
  • panel.panels.querypanel.panels.createはパネルDTO形式を使用。panel.panels.sqlsは同じDTOと所有要素の--paramsを一緒に使用。
  • panel verify create-postは高度なクエリペイロード専用。uuidadvancedQueryTypequerySqlsおよび高度なクエリフィールドを単一DTOの内部に保持。
  • 子スコープのコード不要(ノーコード)DTOが再読み込みで自スコープに縮約されるか、空の本体で400エラーを返す場合、動作中のSQLをキャプチャし、初回試行をパネル全体の失敗として扱わず、高度な代替案に切り替え。
  • バックエンドがパネルクエリ・検証・作成で空の本体を含むHTTP 400を返す場合、DTO形式の不一致を最初に疑い、型指定スキーマ出力を再確認してからリトライ。
  • refreshIntervalは任意のトップレベルフィールドではなく、更新動作を所有するオブジェクトのparamsに属する。
  • パネル作成はダッシュボードに自動的に配置されない。別途ダッシュボード更新が必要。

完了の証拠

  • パネル作成はpanel panels getで保存オブジェクトを所有要素・名前・パラメータと共に再読み込みして初めて完了。
  • クエリ対応パネルは同じDTOがpanel.panels.queryまたはpanel.panels.sqlsを通じて成功して初めて完了。
  • 高度な代替案は再読み込みでenableAdvanced=trueが表示され、高度なDTOが引き続き検証される場合に完了。子スコープワークフローの場合、ノーコードペイロードが縮約されても検証済みSQLが正しければ、この高度な代替案は初回試行の成功としてカウント。
  • ダッシュボード配置は個別の証拠。パネル作成をダッシュボード所属として扱わない。

保持すべき製品動作

  • パネル変更前に、まずlistを読み取り、その後getを読み取る。
  • 自然言語作成リクエストは、AIドラフトエンドポイント優先で、構造化DTO作成は代替案として保持。
  • 候補nameを使って作成前にnew-nameを実行。
  • SQLを生成すべきパネルのみquerysqlsを実行。verifyは完全なパネルDTOではなく、単一の高度なクエリDTOのみに使用。
  • advancedQueriesが存在する場合、checkedブール値とdimensionsを文字列の配列として保持。
  • refreshIntervalは任意のトップレベルフィールドではなく、更新動作を所有するオブジェクトのparamsに属する。
  • パネル作成はダッシュボードに自動的に配置されない。

主なコマンド

idmp-cli schema panel.panels.list
idmp-cli panel panels list --params '{"elementId":123}'

idmp-cli schema panel.panels.get
idmp-cli panel panels get --params '{"elementId":123,"panelId":456}'

idmp-cli schema panel.verify.create
idmp-cli panel verify create --ack-risk --data '{"from":"now-12h","to":"now"}'

idmp-cli schema panel.verify.create-post
idmp-cli panel panels new-name --params '{"elementId":123,"name":"demo-panel"}'
idmp-cli panel panels create --dry-run --ack-risk --params '{"elementId":123}' --data '{...}'

# 現在生成されているスキーマでは、`panel.panels.query`は読み取り専用で`--ack-risk`はオプション。
# 一方、`panel.panels.sqls`、`panel.verify.create`、`panel.verify.create-post`は書き込みリスク
# コマンドとして生成されており、`--ack-risk`を保持する必要があります。
idmp-cli panel panels query --ack-risk --params '{"elementId":123}' --data '{...}'
idmp-cli panel panels sqls --ack-risk --params '{"elementId":123}' --data '{...}'
idmp-cli panel verify create-post --ack-risk --params '{"elementId":123}' --data '{...}'

idmp-cli panel panel-templates list --params '{"elementId":123}'

例外とエラー処理

  • パネルは正常に作成されたがダッシュボードが更新されない場合、パネルは仕様によりスタンドアロンのまま。
  • refreshIntervalparams外に設定されている場合、ペイロードを不完全として扱い、リトライ前に修正。
  • テキストまたは手動パネルが空のSQLを返す場合、queryをスキップし、そのパネルタイプではSQL検証は適用不可。
  • panel verify createが失敗する場合、fromtoを含む時間範囲ペイロードのみ送信(高度なクエリ検証ツールではない)。
  • panel verify create-postuuidまたはadvancedQueryType不足で失敗する場合、通常のパネルDTOではなく高度なクエリDTOを渡している。
  • パネルクエリ・検証・作成が空の本体を含むHTTP 400を返す場合、SQL自体を変更する前に、型指定schema出力とペイロードを比較。
  • 子スコープのノーコード再読み込みが自スコープに縮約されたがSQL(データベース言語)がpanel.panels.sqlsで既に検証済みの場合、無関連な自スコープDTOから再開せず、高度な代替案を保存。
  • パネルがテンプレートからコピーされた場合、コピーされた識別子が更新可能と仮定せず、新規パネルを作成。
  • 時間範囲が空データを返す場合、メトリクスやディメンション(集計視点)を変更する前に、クエリウィンドウを調整。

検証シナリオ

  1. idmp-cli schema panel.panels.listidmp-cli panel panels list --params '{"elementId":123}'でパネルリストを読み取る。
  2. idmp-cli panel panels new-name --params '{"elementId":123,"name":"demo-panel"}'で作成に安全な名前を確保。
  3. idmp-cli panel panels create --dry-run --ack-risk --params '{"elementId":123}' --data '{...}'でパネル作成をプレビュー。
  4. パネルがSQLを生成すべき場合のみSQL検証を実行:クエリ対応パネルについてはidmp-cli panel panels query --ack-risk --params '{"elementId":123}' --data '{...}'idmp-cli panel panels sqls --ack-risk --params '{"elementId":123}' --data '{...}'を使用。時間範囲検証はidmp-cli panel verify create --ack-risk --data '{"from":"now-12h","to":"now"}'のみ。uuidadvancedQueryTypeなどのフィールドを含む高度なクエリDTOはidmp-cli panel verify create-post --ack-risk --params '{"elementId":123}' --data '{...}'のみを使用。子スコープのノーコード分岐が縮約された場合、高度な代替案に切り替え、その成功パスとして保持。
  5. idmp-cli panel panel-templates list --params '{"elementId":123}'idmp-cli dashboard dashboards get --params '{"elementId":123,"dashboardId":789}'でテンプレート再利用または別途ダッシュボード作業を確認。
原文(English)を表示

panel

Read ../idmp-shared/SKILL.md first.

Before any write: Follow the 🛑 Destructive op confirmation protocol. Read-only commands stay read-only here, but delete / write / patch flows still require the shared yes-gate.

Recommended shortcuts

Shortcut Purpose
+list List panels under one element.
+search Search panels globally.
+templates List panel templates available to one element.

Recommended references

Missing context to resolve first

Context Why it must be resolved before create or verify
Owner element You need the final elementId for list, get, naming, create, and every verification call.
Candidate panel name panel.panels.new-name requires both elementId and a proposed name.
Verification mode Decide whether this panel should generate SQL at all, and whether you need plain query and sqls checks or advanced-query verification.
Dashboard placement target Decide whether the panel remains standalone or must be inserted into a dashboard before the workflow counts as complete.
Refresh owner Decide whether refresh belongs on the panel shell or the dashboard shell so refreshInterval lands in the right params block.

Constrained live behaviors

  • Prefer POST /api/v1/ai/panels/create for natural-language panel requests, then persist the returned draft through panel.panels.create. Use the structured panel DTO workflow only as fallback when the draft is unsuitable or persistence fails.
  • panel.panels.new-name requires a candidate name; do not call it with only the owner scope.
  • Text and manual panels can legitimately return generated SQL is empty, so query is inapplicable for those panel types.
  • panel verify create validates only the time-range payload with from and to; use plain --data, not --params, and do not send elementId.
  • panel.panels.query and panel.panels.create use the panel DTO shape. panel.panels.sqls uses the same DTO together with owner --params.
  • panel verify create-post is only for advanced-query payloads. Keep uuid, advancedQueryType, querySqls, and the advanced query fields inside that single DTO.
  • If a child-scope no-code DTO collapses to self scope on reread or returns empty-body 400, capture the working SQL and switch to the advanced fallback instead of treating the first attempt as a total panel failure.
  • If the backend returns HTTP 400 with an empty body on panel query, verify, or create, assume a DTO-shape mismatch first and recheck the typed schema output before retrying.
  • refreshInterval belongs in params on the object that owns refresh behavior, not in an arbitrary top-level field.
  • Creating a panel does not place it into a dashboard automatically; a separate dashboard update is still required.

Evidence of completion

  • A panel create is only complete when panel panels get rereads the persisted object with the intended owner, name, and params.
  • A query-backed panel is only complete when the same DTO succeeds through panel.panels.query or panel.panels.sqls.
  • An advanced fallback is only complete when reread shows enableAdvanced=true and the advanced DTO still validates. For child-scope workflows, this advanced fallback still counts as first-attempt success when the no-code payload collapsed but the verified SQL stayed correct.
  • Dashboard placement is separate proof; do not treat a panel create as dashboard membership.

Product behavior to preserve

  • Read list first, then get, before changing a panel.
  • For natural-language creation asks, prefer the AI draft endpoint first and keep structured DTO creation as the fallback.
  • Use new-name with a candidate name before creating a panel.
  • Run query and sqls only for panels that should generate SQL, and use verify only for the single advanced-query DTO rather than the full panel DTO.
  • When advancedQueries is present, keep checked boolean and dimensions as an array of strings.
  • refreshInterval belongs in params on the object that owns refresh behavior, not in an arbitrary top-level field.
  • Creating a panel does not place it into a dashboard automatically.

Key commands

idmp-cli schema panel.panels.list
idmp-cli panel panels list --params '{"elementId":123}'

idmp-cli schema panel.panels.get
idmp-cli panel panels get --params '{"elementId":123,"panelId":456}'

idmp-cli schema panel.verify.create
idmp-cli panel verify create --ack-risk --data '{"from":"now-12h","to":"now"}'

idmp-cli schema panel.verify.create-post
idmp-cli panel panels new-name --params '{"elementId":123,"name":"demo-panel"}'
idmp-cli panel panels create --dry-run --ack-risk --params '{"elementId":123}' --data '{...}'

# In the current generated schema, `panel.panels.query` is readonly and `--ack-risk` is optional,
# but `panel.panels.sqls`, `panel.verify.create`, and `panel.verify.create-post` are still generated
# as write-risk commands and must keep `--ack-risk`.
idmp-cli panel panels query --ack-risk --params '{"elementId":123}' --data '{...}'
idmp-cli panel panels sqls --ack-risk --params '{"elementId":123}' --data '{...}'
idmp-cli panel verify create-post --ack-risk --params '{"elementId":123}' --data '{...}'

idmp-cli panel panel-templates list --params '{"elementId":123}'

Exception and failure handling

  • If a panel is created successfully but no dashboard is updated, the panel remains standalone by design.
  • If refreshInterval is set outside params, treat the payload as incomplete and fix it before retrying.
  • If a text or manual panel returns empty SQL, skip query and treat SQL-based validation as inapplicable for that panel type.
  • If panel verify create fails, send only the time-range payload with from and to; it is not the advanced-query validator.
  • If panel verify create-post fails with missing uuid or advancedQueryType, you passed a plain panel DTO instead of an advanced-query DTO.
  • If panel query, verify, or create returns HTTP 400 with an empty body, compare the typed schema output against your payload before changing the SQL itself.
  • If child-scope no-code rereads collapse to self scope but panel.panels.sqls already proved the intended grouped SQL, persist the advanced fallback instead of restarting from an unrelated self-scope DTO.
  • If the panel was copied from a template, create a new panel instead of assuming the copied identifier is updatable.
  • If a time range returns empty data, adjust the query window before changing metrics or dimensions.

Validation scenarios

  1. Read the panel list with idmp-cli schema panel.panels.list and idmp-cli panel panels list --params '{"elementId":123}'.
  2. Reserve a create-safe name with idmp-cli panel panels new-name --params '{"elementId":123,"name":"demo-panel"}'.
  3. Preview panel creation with idmp-cli panel panels create --dry-run --ack-risk --params '{"elementId":123}' --data '{...}'.
  4. Run SQL-based checks only when the panel should generate SQL: use idmp-cli panel panels query --ack-risk --params '{"elementId":123}' --data '{...}' and idmp-cli panel panels sqls --ack-risk --params '{"elementId":123}' --data '{...}' for query-backed panels, use idmp-cli panel verify create --ack-risk --data '{"from":"now-12h","to":"now"}' only for time-range validation, and use idmp-cli panel verify create-post --ack-risk --params '{"elementId":123}' --data '{...}' only for advanced-query DTOs that include fields such as uuid and advancedQueryType. If the child-scope no-code branch collapses, switch to the advanced fallback and keep that as the success path.
  5. Confirm template reuse or separate dashboard work with idmp-cli panel panel-templates list --params '{"elementId":123}' and idmp-cli dashboard dashboards get --params '{"elementId":123,"dashboardId":789}'.

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