·when-to-wrap-primitives
</>

when-to-wrap-primitives

プリミティブ型をドメイン固有型でラップすべきか否かの判断を支援する。 Primitive Obsession(プリミティブ型の過剰使用)と Value Object Obsession(過剰なラップ)の 両極端を避け、投資対効果に基づく合理的な判断基準を提供する。 Value Objectの定義が文脈(PofEAA/DDD/一般)で異なることによる用語混乱の防止も含む。 コードレビュー、新規実装、設計議論時にプリミティブ型のラップ判断が必要な場合に使用。 対象言語: 言語非依存(Rust, TypeScript, Java, Kotlin, Scala, Go, Python等すべて)。 トリガー:「この値をラップすべきか」「プリミティブ型のままでいいか」 「Value Objectにすべきか」「型を作りすぎでは」「Primitive Obsession」 「ラップしすぎ」「型が多すぎる」「Stringのままでいいか」 といったプリミティブ型ラップ判断関連リクエストで起動。

15Installs·4Trend·@j5ik2o

Installation

$npx skills add https://github.com/j5ik2o/okite-ai --skill when-to-wrap-primitives

How to Install when-to-wrap-primitives

Quickly install when-to-wrap-primitives AI skill to your development environment via command line

  1. Open Terminal: Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.)
  2. Run Installation Command: Copy and run this command: npx skills add https://github.com/j5ik2o/okite-ai --skill when-to-wrap-primitives
  3. Verify Installation: Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Source: j5ik2o/okite-ai.

SKILL.md

View raw

| 一般的定義 | Wikipedia等 | 最も広い | 同等性がIDではなく値に基づくオブジェクト | | PofEAA定義 | Martin Fowler | 実装パターン | IDに基づかず値で等価判定される小型オブジェクト。別名参照問題を避けるため不変が推奨 | | DDD定義 | Eric Evans | ドメインモデリング | PofEAA版の特性をすべて備えた上で、ドメインの概念を計測・定量化・説明し、不変条件と副作用のない振る舞いを持つドメインオブジェクト |

| 値による等価判定 | 必須 | 必須(継承) | | 不変性 | 推奨 | 必須(強化) | | ドメイン不変条件 | ー | 必須(追加) | | ドメイン振る舞い | ー | 必須(追加) |

DDD版は「値で等価判定される」「不変である」というPofEAA版の特性を前提として含んだ上で、 ドメイン固有の要件を追加したものである。2つの定義を並列に見ると、DDD版が PofEAA版の特性も持っていることを見落としやすいので注意。

プリミティブ型をドメイン固有型でラップすべきか否かの判断を支援する。 Primitive Obsession(プリミティブ型の過剰使用)と Value Object Obsession(過剰なラップ)の 両極端を避け、投資対効果に基づく合理的な判断基準を提供する。 Value Objectの定義が文脈(PofEAA/DDD/一般)で異なることによる用語混乱の防止も含む。 コードレビュー、新規実装、設計議論時にプリミティブ型のラップ判断が必要な場合に使用。 対象言語: 言語非依存(Rust, TypeScript, Java, Kotlin, Scala, Go, Python等すべて)。 トリガー:「この値をラップすべきか」「プリミティブ型のままでいいか」 「Value Objectにすべきか」「型を作りすぎでは」「Primitive Obsession」 「ラップしすぎ」「型が多すぎる」「Stringのままでいいか」 といったプリミティブ型ラップ判断関連リクエストで起動。 Source: j5ik2o/okite-ai.

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/j5ik2o/okite-ai --skill when-to-wrap-primitives
Category
</>Dev Tools
Verified
First Seen
2026-03-09
Updated
2026-03-10

Browse more skills from j5ik2o/okite-ai

Quick answers

What is when-to-wrap-primitives?

プリミティブ型をドメイン固有型でラップすべきか否かの判断を支援する。 Primitive Obsession(プリミティブ型の過剰使用)と Value Object Obsession(過剰なラップ)の 両極端を避け、投資対効果に基づく合理的な判断基準を提供する。 Value Objectの定義が文脈(PofEAA/DDD/一般)で異なることによる用語混乱の防止も含む。 コードレビュー、新規実装、設計議論時にプリミティブ型のラップ判断が必要な場合に使用。 対象言語: 言語非依存(Rust, TypeScript, Java, Kotlin, Scala, Go, Python等すべて)。 トリガー:「この値をラップすべきか」「プリミティブ型のままでいいか」 「Value Objectにすべきか」「型を作りすぎでは」「Primitive Obsession」 「ラップしすぎ」「型が多すぎる」「Stringのままでいいか」 といったプリミティブ型ラップ判断関連リクエストで起動。 Source: j5ik2o/okite-ai.

How do I install when-to-wrap-primitives?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/j5ik2o/okite-ai --skill when-to-wrap-primitives Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Where is the source repository?

https://github.com/j5ik2o/okite-ai