jpskill.com
🛠️ 開発・MCP コミュニティ

cohesion-coupling-review

提案された変更が、高い凝集度と低い結合度を持つようにレビューし、最小限の安全なリファクタリングを推奨するSkill。

📜 元の英語説明(参考)

Review a proposed change for high cohesion/low coupling; recommends the smallest boundary-safe refactor (ownership, minimal public surface, no reach-in imports).

🇯🇵 日本人クリエイター向け解説

一言でいうと

提案された変更が、高い凝集度と低い結合度を持つようにレビューし、最小限の安全なリファクタリングを推奨するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o cohesion-coupling-review.zip https://jpskill.com/download/6845.zip && unzip -o cohesion-coupling-review.zip && rm cohesion-coupling-review.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/6845.zip -OutFile "$d\cohesion-coupling-review.zip"; Expand-Archive "$d\cohesion-coupling-review.zip" -DestinationPath $d -Force; ri "$d\cohesion-coupling-review.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して cohesion-coupling-review.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → cohesion-coupling-review フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

高凝集度 / 低結合度 (レビュー スキル)

使用場面

  • 変更が複数のフォルダー/レイヤー/機能にまたがる場合。
  • 別の機能からファイルをインポートしたくなる場合。
  • 利便性のために「共有」が検討されている場合。

チェックリスト (迅速)

  1. 所有権: どの機能/境界コンテキストがルール/データを所有していますか?
  2. 凝集度: ロジックは変更理由と同じ場所に配置されていますか?
  3. 結合度: 依存関係は具体的なインポートではなく、狭いもの (ポート/イベント) ですか?
  4. 公開インターフェース: エクスポートを最小限の安定したインターフェースに減らすことができますか?
  5. インポートの衛生状態: 別の機能/レイヤーへの深いインポートはありませんか?
  6. 昇格: shared に真にふさわしいですか (2つ以上のコンテキスト、ビジネスポリシーなし)?

最小限の修正 (推奨順)

  • コードを所有者に移動する (凝集度を高める)。
  • ポートまたはイベントを導入/調整する (結合度を減らす)。
  • エクスポートを狭める / 明示的なエントリーポイントを追加する (インターフェースを安定させる)。
  • その後で初めて shared を検討する (昇格ルールを満たす場合)。

参照

  • .github/instructions/06-cohesion-coupling-copilot-instructions.md
  • .github/instructions/05-design-principles-copilot-instructions.md
  • scripts/dependency-cruiser.js
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

High Cohesion / Low Coupling (Review Skill)

Use when

  • A change touches multiple folders/layers/capabilities.
  • You’re tempted to import a file from another capability.
  • “Shared” is being considered for convenience.

Checklist (fast)

  1. Ownership: which capability/bounded context owns the rule/data?
  2. Cohesion: is the logic colocated with its change reason?
  3. Coupling: are dependencies narrow (ports/events) rather than concrete imports?
  4. Public surface: can exports be reduced to the minimal stable interface?
  5. Import hygiene: any deep imports into another capability/layer?
  6. Promotion: does it truly qualify for shared (2+ contexts, no business policy)?

Smallest fixes (preferred order)

  • Move code to the owner (increase cohesion).
  • Introduce/adjust a port or event (reduce coupling).
  • Narrow exports / add an explicit entry point (stabilize interface).
  • Only then consider shared (if it meets promotion rules).

References

  • .github/instructions/06-cohesion-coupling-copilot-instructions.md
  • .github/instructions/05-design-principles-copilot-instructions.md
  • scripts/dependency-cruiser.js