·swift-language
</>

swift-language

将现代 Swift 语言模式和习惯用法应用于非并发、非 SwiftUI 代码。涵盖 if/switch 表达式 (Swift 5.9+)、类型化抛出 (Swift 6+)、结果生成器、属性包装器、不透明和存在类型(某些与任意)、保护模式、从不输入、正则表达式生成器 (Swift 5.7+)、可编码最佳实践(CodingKeys、自定义解码、嵌套容器)、现代集合 API(count(where:)、contains(where:)、replacement())、FormatStyle (.formatted() on日期、数字、测量值)和字符串插值模式。在编写涉及泛型、协议、枚举、闭包或现代语言功能的核心 Swift 代码时使用。

56安装·26热度·@dpearson2699

安装

$npx skills add https://github.com/dpearson2699/swift-ios-skills --skill swift-language

如何安装 swift-language

通过命令行快速安装 swift-language AI 技能到你的开发环境

  1. 打开终端: 打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 运行安装命令: 复制并运行以下命令:npx skills add https://github.com/dpearson2699/swift-ios-skills --skill swift-language
  3. 验证安装: 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

来源:dpearson2699/swift-ios-skills。

SKILL.md

查看原文

Core Swift language features and modern syntax patterns targeting Swift 5.9+ through Swift 6. Covers language constructs, type system features, Codable, string and collection APIs, and formatting. For concurrency (actors, async/await, Sendable), see the swift-concurrency skill. For SwiftUI views and state management, see swiftui-patterns.

Swift 5.9+ allows if and switch as expressions that return values. Use them to assign, return, or initialize directly.

Swift 6+ allows specifying the error type a function throws.

将现代 Swift 语言模式和习惯用法应用于非并发、非 SwiftUI 代码。涵盖 if/switch 表达式 (Swift 5.9+)、类型化抛出 (Swift 6+)、结果生成器、属性包装器、不透明和存在类型(某些与任意)、保护模式、从不输入、正则表达式生成器 (Swift 5.7+)、可编码最佳实践(CodingKeys、自定义解码、嵌套容器)、现代集合 API(count(where:)、contains(where:)、replacement())、FormatStyle (.formatted() on日期、数字、测量值)和字符串插值模式。在编写涉及泛型、协议、枚举、闭包或现代语言功能的核心 Swift 代码时使用。 来源:dpearson2699/swift-ios-skills。

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill swift-language
分类
</>开发工具
认证
收录时间
2026-03-09
更新时间
2026-03-11

Browse more skills from dpearson2699/swift-ios-skills

快速解答

什么是 swift-language?

将现代 Swift 语言模式和习惯用法应用于非并发、非 SwiftUI 代码。涵盖 if/switch 表达式 (Swift 5.9+)、类型化抛出 (Swift 6+)、结果生成器、属性包装器、不透明和存在类型(某些与任意)、保护模式、从不输入、正则表达式生成器 (Swift 5.7+)、可编码最佳实践(CodingKeys、自定义解码、嵌套容器)、现代集合 API(count(where:)、contains(where:)、replacement())、FormatStyle (.formatted() on日期、数字、测量值)和字符串插值模式。在编写涉及泛型、协议、枚举、闭包或现代语言功能的核心 Swift 代码时使用。 来源:dpearson2699/swift-ios-skills。

如何安装 swift-language?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/dpearson2699/swift-ios-skills --skill swift-language 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

这个 Skill 的源码在哪?

https://github.com/dpearson2699/swift-ios-skills