claude-skills/

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

last sync 1h ago
スキルOfficialdevelopment

📏idmp-uom

プラグイン
idmp-plugin

説明

IDMP単位換算スキル(医薬品の測定単位を扱うツール)です。 次のような場合に使用: - UOM(測定単位)のクラスを検査する - クラスに紐付いた単位を確認する - 自由な単位の検索と変換を行う - 取得機能(`get`と`get-get`)の使い分けが必要な場面 `get`と`get-get`の機能は明確に分けられています。

原文を表示

IDMP unit-of-measure skill. Use it to inspect UOM classes, class-scoped units, free UOM lookup, search, and conversion, while keeping `get` and `get-get` clearly separated.

ユースケース

  • UOM(測定単位)のクラスを検査する
  • クラスに紐付いた単位を確認する
  • 自由な単位の検索と変換を行う
  • get と get-get の使い分けが必要な場面

本文(日本語訳)

uom

まず最初に../idmp-shared/SKILL.mdをお読みください。

このスキルの範囲

  • UOM(単位)のクラスと、それに属する単位を読み取ります。
  • モデル定義やインポート時の対応付けの前に、単位を検索します。
  • 自由形式/グローバル単位の読み取りと、クラス内限定の単位の読み取りを区別します。
  • 単一行および複数行の一括変換機能を使い、モデル定義を書き込む前に互換性のある単位を確認します。

推奨ショートカット

ショートカット 目的
+classes UOMクラスを一覧表示
+class 1つのUOMクラスを読み取り
+search UOMを検索
+get クラス内限定の標準的なフローで1つのUOMを読み取り

推奨資料

先に解決すべき文脈情報

文脈 変換やモデル定義の作業の前に解決が必要な理由
ルックアップモード 対象がクラスルックアップか、自由形式/グローバル単位の読み取りか、クラス内限定の読み取りかを決定する必要があります。
対象となる単位の種類 検索語が不正確な場合があるため、IDを信頼する前に、目的の単位名、略号、またはクラスを確認する必要があります。
変換方向 正確なfromUomIdtoUomIdを決定し、一括処理が1つの互換性のあるクラス内に留まるかどうかを判断する必要があります。
検証対象 証拠をクラスの在庫、正確なget、クラス内限定のget-get、または成功した変換結果のいずれから得るかを決定する必要があります。

実装時の制限事項

  • uom searchはクラス志向ではなく単位志向です。クラスラベルや単位の種類に関する言葉だけ(英語でも地域化されたラベルでも)に頼って、単位の種類が見つからないことを証明しないでください。検索は正確な単位名と略号で最も効果的に機能します。
  • uom get-getに頼る前に、uomclasses listuomclasses getを使ってクラスIDを発見してください。
  • uom getは自由形式/グローバルの読み取りです。uom get-getuomClassIduomIdの両方が必要です。
  • convertはバッチ全体で「すべてまたは無」です。1行でも無効または互換性がないと、要求全体が失敗します。
  • モデル定義が結果に依存する場合、ファジー(曖昧)検索の結果より、正確な単位名または略号の一致を強い根拠として扱ってください。

実行フロー

  1. uomclassesで始めて、オペレーターが単位を選ぶ前にクラスの文脈を理解します。
  2. スタンドアロンのuomIdだけが既知の場合は、uom getを使い自由形式/グローバル単位の読み取りを行います。
  3. uomClassIduomIdの両方が既知の場合は、uom get-getを使いクラス内限定の読み取りを行います。
  4. searchが部分的な一致を返す場合、getget-get、またはconvertのIDを選ぶ前に、正確な単位名または略号の一致を優先してください。
  5. 属性モデル定義、インポート時の対応付け、または単位間の比較の前に、searchconvertを使用します。
  6. convertを1つのバッチでは「すべてまたは無」として扱ってください。無効なUOM IDまたは互換性のないペアが1つあると、構造化された400エラーで要求全体が失敗します。
  7. ルックアップまたは変換の結果が一貫性に欠ける場合は、常にクラスとIDを再確認してください。

完了の根拠

  • ルックアップは、uom getまたはuom get-getが、検査を目的とした正確な対象の行を返すときだけ完了です。
  • クラス発見タスクは、ファジーsearchが空でも、uomclasses listまたはuomclasses getが一致する単位の種類を明らかにするときだけ完了です。
  • 変換タスクは、構造化された結果が要求されたfromUomIdtoUomId、および数値出力を反映するときだけ完了です。

主要コマンド

idmp-cli schema uom.uomclasses.list
idmp-cli uom uomclasses list

idmp-cli schema uom.uomclasses.get
idmp-cli uom uomclasses get --params '{"uomClassId":264033646}'

idmp-cli schema uom.uom.search
idmp-cli uom uom search --params '{"keyword":"kWh","limitSize":20}'

idmp-cli schema uom.uom.get
idmp-cli uom uom get --params '{"uomId":1753955006}'

idmp-cli schema uom.uom.get-get
idmp-cli uom uom get-get --params '{"uomClassId":264033646,"uomId":1753955006}'

idmp-cli schema uom.uom.convert
idmp-cli uom uom convert --ack-risk --data '[{"fromUomId":1,"inputValue":100,"toUomId":2},{"fromUomId":1,"inputValue":5,"toUomId":2}]'

例外的な対応

  • 検索が似た単位を複数返す場合:クラスを先に読み取り、変換の前に正確な単位名または略号の一致(例えば、アンペアアワーAhではなくアンペアA)を優先してください。
  • クラスラベルまたは単位の種類に関する言葉だけで検索が空になる場合:uomclasses listuomclasses getに戻ってください。空のファジー検索を、その単位の種類が存在しない証拠として扱わないでください。
  • uom getが見つからないことを返す場合:オペレーターが本当にクラス内限定のuom get-getフローを必要とするかどうかを確認してください。
  • uom get-getが見つからないことを返す場合:uomClassIduomIdの両方を検証してください。有効な自由形式単位のIDだけでは不十分です。
  • 変換が失敗または間違っていると見える場合:2つの単位が互換性のあるクラスに属することを確認してから、結果を信頼してください。
  • 有効/無効が混在した変換バッチが要求全体に対する構造化エラーを返す場合:最初の有効な行を部分的な成功として扱わないでください。
  • モデル定義がまだ選択した単位を拒否する場合:対象属性が同じUOMクラスと単位の意味を期待していることを検証してください。

検証シナリオ

  1. idmp-cli uom uomclasses listでUOMクラスを一覧表示します。
  2. idmp-cli uom uomclasses get --params '{"uomClassId":264033646}'で1つのクラスを読み取ります。
  3. idmp-cli uom uom searchkWhなどの既知の単位を検索します。
  4. idmp-cli uom uom getで1つの自由形式単位を読み取り、idmp-cli uom uom get-getでクラス内限定の単位を読み取ります。
  5. idmp-cli uom uom convert --ack-risk --data '[{"fromUomId":1,"inputValue":100,"toUomId":2},{"fromUomId":1,"inputValue":5,"toUomId":2}]'で複数行の互換性のある一括処理を変換し、有効/無効が混在したバッチを調査してCLIが部分的な成功ではなく構造化された400を表示することを確認します。
原文(English)を表示

uom

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

What this skill covers

  • Read UOM classes and the units that belong to them.
  • Search for units before modeling or import mapping.
  • Distinguish the free/global UOM read from the class-scoped UOM read.
  • Use single-row and multi-row conversion batches to confirm compatible units before writing model definitions.

Recommended shortcuts

Shortcut Purpose
+classes List UOM classes
+class Read one UOM class
+search Search UOMs
+get Read one UOM in the common class-scoped flow

Recommended reference

Missing context to resolve first

Context Why it must be resolved before conversion or modeling work
Lookup mode Decide whether the target is a class lookup, a free/global UOM read, or a class-scoped UOM read.
Target unit family Search terms can be fuzzy, so you need the intended unit name, abbreviation, or class before you trust an ID.
Conversion direction Decide the exact fromUomId, toUomId, and whether the batch is expected to stay in one compatible class.
Verification target Decide whether proof should come from class inventory, exact get, class-scoped get-get, or a successful conversion result.

Constrained live behaviors

  • uom search is unit-oriented rather than class-oriented. Do not rely on class labels or family words alone—whether they are English or localized labels—to prove that a unit family is missing. Search appears to work best with exact unit names and abbreviations.
  • Use uomclasses list and uomclasses get to discover class IDs before you rely on uom get-get.
  • uom get is the free/global read. uom get-get needs both uomClassId and uomId.
  • convert is batch-wide and all-or-nothing: one invalid or incompatible row can fail the full request.
  • Treat exact unit name or abbreviation matches as stronger evidence than fuzzy search hits when modeling depends on the result.

Execution flow

  1. Start with uomclasses so the operator understands the class context before choosing a unit.
  2. Use uom get for the free/global UOM read when only a standalone uomId is known.
  3. Use uom get-get for the class-scoped read when both uomClassId and uomId are known.
  4. When search returns near-matches, prefer an exact unit name or abbreviation match before you choose IDs for get, get-get, or convert.
  5. Use search and convert before attribute modeling, import mapping, or cross-unit comparisons.
  6. Treat convert as all-or-nothing for one batch: one invalid UOM ID or incompatible pair can fail the full request with a structured 400.
  7. Re-check the class and IDs whenever a lookup or conversion result looks inconsistent.

Evidence of completion

  • A lookup is only complete when uom get or uom get-get returns the exact target row you intended to inspect.
  • A class-discovery task is only complete when uomclasses list or uomclasses get exposes the matching family, even if fuzzy search is empty.
  • A conversion task is only complete when the structured result reflects the requested fromUomId, toUomId, and numeric output.

Key commands

idmp-cli schema uom.uomclasses.list
idmp-cli uom uomclasses list

idmp-cli schema uom.uomclasses.get
idmp-cli uom uomclasses get --params '{"uomClassId":264033646}'

idmp-cli schema uom.uom.search
idmp-cli uom uom search --params '{"keyword":"kWh","limitSize":20}'

idmp-cli schema uom.uom.get
idmp-cli uom uom get --params '{"uomId":1753955006}'

idmp-cli schema uom.uom.get-get
idmp-cli uom uom get-get --params '{"uomClassId":264033646,"uomId":1753955006}'

idmp-cli schema uom.uom.convert
idmp-cli uom uom convert --ack-risk --data '[{"fromUomId":1,"inputValue":100,"toUomId":2},{"fromUomId":1,"inputValue":5,"toUomId":2}]'

Exception paths

  • Search returns multiple similar units: read the class first, then prefer an exact unit name or abbreviation match (for example ampere A instead of ampere-hour Ah) before conversion.
  • Search returns empty for class labels or family words alone: fall back to uomclasses list and uomclasses get; do not treat empty fuzzy search as proof that the unit family does not exist.
  • uom get returns not found: confirm whether the operator actually needs the class-scoped uom get-get path.
  • uom get-get returns not found: verify both uomClassId and uomId; a valid free UOM ID is not enough here.
  • Conversion fails or looks wrong: confirm the two units belong to a compatible class before trusting the result.
  • A mixed valid/invalid conversion batch returns a structured error for the full request; do not treat the first valid row as partial success.
  • Modeling still rejects the chosen unit: verify the target attribute expects the same UOM class and unit semantics.

Validation scenarios

  1. List UOM classes with idmp-cli uom uomclasses list.
  2. Read one class with idmp-cli uom uomclasses get --params '{"uomClassId":264033646}'.
  3. Search for a known unit such as kWh with idmp-cli uom uom search.
  4. Read one free UOM with idmp-cli uom uom get and one class-scoped UOM with idmp-cli uom uom get-get.
  5. Convert a multi-row compatible batch with idmp-cli uom uom convert --ack-risk --data '[{"fromUomId":1,"inputValue":100,"toUomId":2},{"fromUomId":1,"inputValue":5,"toUomId":2}]', then probe a mixed valid/invalid batch and confirm the CLI surfaces the structured 400 instead of partial success.

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