swift-api-design-guidelines-skill by erikote04/swift-api-design-guidelines-agent-skill
npx skills add https://github.com/erikote04/swift-api-design-guidelines-agent-skill --skill swift-api-design-guidelines-skill使用此技能来设计和审查 Swift API,确保其在使用点清晰明了,在调用点流畅自然,并符合既定的 Swift 命名和标签约定。优先考虑可读性、明确的意图以及声明、调用点和文档注释之间的一致性。
references/promote-clear-usage.md、references/strive-for-fluent-usage.md)。references/parameters.md、references/argument-labels.md)。references/fundamentals.md)。references/general-conventions.md、references/special-instructions.md)。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Parameter、Returns、Throws、Note 等)。Any、NSObject、String、Int),添加角色名词。make 开头。sort/sorted、formUnion/union)。isEmpty、intersects)。O(1) 复杂度的计算属性记录其复杂度。| 情况 | 首选模式 |
|---|---|
| 可变动词 | reverse() |
| 不可变动词 | reversed() / strippingNewlines() |
| 不可变名词操作 | union(_:) |
| 可变名词操作 | formUnion(_:) |
| 工厂方法 | makeWidget(...) |
| 布尔查询 | isEmpty, intersects(_:) |
| 情况 | 规则 |
|---|---|
| 可区分的无标签参数 | 仅当区别仍然清晰时才省略标签 |
| 保留值的转换初始化器 | 省略第一个标签 |
| 介词短语中的第一个参数 | 通常使用介词作为标签 |
| 语法短语中的第一个参数 | 省略第一个标签 |
| 带默认值的参数 | 保留标签(在调用点可以省略) |
| 所有其他参数 | 为其添加标签 |
| 声明类型 | 摘要应描述 |
|---|---|
| 函数 / 方法 | 它做什么以及返回什么 |
| 下标 | 它访问什么 |
| 初始化器 | 它创建什么 |
| 其他声明 | 它是什么 |
O(1) 计算属性的复杂度。references/fundamentals.md - 核心原则和文档注释规则references/promote-clear-usage.md - 减少歧义和基于角色的命名references/strive-for-fluent-usage.md - 流畅性、副作用和可变对references/use-terminology-well.md - 专业术语、缩写和先例references/general-conventions.md - 复杂度文档、自由函数例外、大小写、重载references/parameters.md - 参数命名和默认参数策略references/argument-labels.md - 第一个参数和通用标签规则references/special-instructions.md - 元组/闭包命名和无约束多态性每周安装量
140
代码仓库
GitHub 星标数
11
首次出现
2026年2月18日
安全审计
安装于
codex137
gemini-cli136
amp136
github-copilot136
kimi-cli136
opencode136
Use this skill to design and review Swift APIs that are clear at the point of use, fluent in call sites, and aligned with established Swift naming and labeling conventions. Prioritize readability, explicit intent, and consistency across declarations, call sites, and documentation comments.
references/promote-clear-usage.md, references/strive-for-fluent-usage.md).references/parameters.md, references/argument-labels.md).references/fundamentals.md).references/general-conventions.md, references/special-instructions.md).Parameter, Returns, Throws, Note, etc.).Any, NSObject, String, Int).make.sort/sorted, formUnion/union).isEmpty, intersects).O(1).| Situation | Preferred Pattern |
|---|---|
| Mutating verb | reverse() |
| Nonmutating verb | reversed() / strippingNewlines() |
| Nonmutating noun op | union(_:) |
| Mutating noun op | formUnion(_:) |
| Factory method | makeWidget(...) |
| Boolean query | , |
| Situation | Rule |
|---|---|
| Distinguishable unlabeled args | Omit labels only if distinction is still clear |
| Value-preserving conversion init | Omit first label |
| First arg in prepositional phrase | Usually label from the preposition |
| First arg in grammatical phrase | Omit first label |
| Defaulted arguments | Keep labels (they may be omitted at call sites) |
| All other arguments | Label them |
| Declaration Kind | Summary Should Describe |
|---|---|
| Function / method | What it does and what it returns |
| Subscript | What it accesses |
| Initializer | What it creates |
| Other declarations | What it is |
O(1) computed property complexity is documented.references/fundamentals.md - Core principles and documentation comment rulesreferences/promote-clear-usage.md - Ambiguity reduction and role-based namingreferences/strive-for-fluent-usage.md - Fluency, side effects, and mutating pairsreferences/use-terminology-well.md - Terms of art, abbreviations, and precedentreferences/general-conventions.md - Complexity docs, free function exceptions, casing, overloadsreferences/parameters.md - Parameter naming and default argument strategyreferences/argument-labels.md - First-argument and general label rulesreferences/special-instructions.md - Tuple/closure naming and unconstrained polymorphismWeekly Installs
140
Repository
GitHub Stars
11
First Seen
Feb 18, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex137
gemini-cli136
amp136
github-copilot136
kimi-cli136
opencode136
Perl 5.36+ 现代开发模式与最佳实践 | 构建健壮可维护应用程序指南
1,200 周安装
Neynar Farcaster API 使用指南:快速集成去中心化社交协议
113 周安装
AI列表构建器:为创意写作生成高质量随机列表,提升故事熵值
114 周安装
Solana Anchor 开发规范与最佳实践指南 - 提升代码质量与可维护性
119 周安装
Python测试专家技能:pytest单元测试、TDD测试驱动开发与集成测试最佳实践
117 周安装
Components.build 规范:构建现代化、可组合、无障碍 React UI 组件库的完整指南
115 周安装
Better Auth集成指南:Next.js身份验证处理器配置与Cookie处理方案
117 周安装
isEmptyintersects(_:)