什么是 law-of-demeter-swift?
在审查、生成或重构 Swift 代码时使用,以主动检测违反 Demeter 定律的行为(深度直通链、泄漏结构、异步遍历链)并提出 Swift 惯用的所有者级 API。 来源:antgly/law-of-demeter-swift-skill。
在审查、生成或重构 Swift 代码时使用,以主动检测违反 Demeter 定律的行为(深度直通链、泄漏结构、异步遍历链)并提出 Swift 惯用的所有者级 API。
通过命令行快速安装 law-of-demeter-swift AI 技能到你的开发环境
来源:antgly/law-of-demeter-swift-skill。
Enforce Law of Demeter (LoD) in Swift code with a strict-by-default review posture:
Core rule: Ask for what you need. Do not traverse internal structure to reach strangers.
In this strict version, assume a likely LoD violation when all of the following are true:
在审查、生成或重构 Swift 代码时使用,以主动检测违反 Demeter 定律的行为(深度直通链、泄漏结构、异步遍历链)并提出 Swift 惯用的所有者级 API。 来源:antgly/law-of-demeter-swift-skill。
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/antgly/law-of-demeter-swift-skill --skill law-of-demeter-swift在审查、生成或重构 Swift 代码时使用,以主动检测违反 Demeter 定律的行为(深度直通链、泄漏结构、异步遍历链)并提出 Swift 惯用的所有者级 API。 来源:antgly/law-of-demeter-swift-skill。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/antgly/law-of-demeter-swift-skill --skill law-of-demeter-swift 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/antgly/law-of-demeter-swift-skill