·law-of-demeter
{}

law-of-demeter

yanko-belov/code-craft

ネストされたオブジェクトのプロパティにアクセスするときに使用します。メソッド呼び出しを連鎖するときに使用します。データを取得するためにオブジェクトを通過するときに使用します。

16インストール·0トレンド·@yanko-belov

インストール

$npx skills add https://github.com/yanko-belov/code-craft --skill law-of-demeter

SKILL.md

A method should only call methods on: itself, its parameters, objects it creates, or its direct components. Never reach through an object to access another object's internals.

| Tight coupling | Caller knows internal structure | | Fragile code | Structure changes break all callers | | Hidden dependencies | Not obvious what's needed | | Hard to test | Must mock entire chain | | Null danger | Each . is a potential null |

A method m of class C should only call methods on:

ネストされたオブジェクトのプロパティにアクセスするときに使用します。メソッド呼び出しを連鎖するときに使用します。データを取得するためにオブジェクトを通過するときに使用します。 ソース: yanko-belov/code-craft。

原文を見る

引用可能な情報

AI/検索での引用用の安定したフィールドとコマンド。

インストールコマンド
npx skills add https://github.com/yanko-belov/code-craft --skill law-of-demeter
カテゴリ
{}データ分析
認証済み
初回登録
2026-02-01
更新日
2026-02-18

クイックアンサー

law-of-demeter とは?

ネストされたオブジェクトのプロパティにアクセスするときに使用します。メソッド呼び出しを連鎖するときに使用します。データを取得するためにオブジェクトを通過するときに使用します。 ソース: yanko-belov/code-craft。

law-of-demeter のインストール方法は?

ターミナルまたはコマンドラインツール(Terminal、iTerm、Windows Terminal など)を開きます このコマンドをコピーして実行します: npx skills add https://github.com/yanko-belov/code-craft --skill law-of-demeter インストール後、スキルは自動的に AI コーディング環境に設定され、Claude Code や Cursor で使用できるようになります

ソースリポジトリはどこですか?

https://github.com/yanko-belov/code-craft