Token导航 LogoToken导航

Agent Skill · 开发

swift-fundamentals(Swift fundamentals 命令行)

swift-fundamentals 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

swift-fundamentals 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描有未通过项,按安装量在开发类的 21,746 个 Skill 里排第 20,337。

总安装 225周安装 9GitHub Stars 8下载 73核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:swift-fundamentals(Swift fundamentals 命令行)
来源仓库:https://github.com/pluginagentmarketplace/custom-plugin-swift
仓库路径:skills/swift-fundamentals
安装命令:
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-swift --skill swift-fundamentals
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-swift --skill swift-fundamentals

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

swift-fundamentals 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。通过命令行调用,提供 Swift 基础开发相关的协作支持。

安装前需确认权限范围、维护状态及是否触发联网或文件读写操作。建议结合来源仓库和原始 README 进一步核验具体用法。

来源仓库内路径:skills/swift-fundamentals

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/pluginagentmarketplace/custom-plugin-swift --s…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

swift-fundamentals 怎么安装?

在终端执行 npx skills add https://github.com/pluginagentmarketplace/custom-plugin-swift --skill swift…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

swift-fundamentals 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

swift-fundamentals 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

swift-fundamentals 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

swift-fundamentals 用的人多吗?

公开数据是累计安装 225 次,近一周安装 9 次,下载 73 次,GitHub 8 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

swift-fundamentals 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
swift-fundamentals

Swift fundamentals 命令行 · 本页

2258只读MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Swift Fundamentals Skill

Comprehensive knowledge base for Swift language fundamentals, type system, and idiomatic patterns.

Prerequisites

  • Xcode 15+ installed
  • Swift 5.9+ toolchain
  • Basic programming knowledge

Parameters

parameters:
  swift_version:
    type: string
    default: "5.9"
    enum: ["5.5", "5.6", "5.7", "5.8", "5.9", "5.10", "6.0"]
    description: Target Swift version for compatibility
  strict_concurrency:
    type: boolean
    default: true
    description: Enable strict concurrency checking
  coding_style:
    type: string
    enum: [apple, google, raywenderlich]
    default: apple

Topics Covered

Type System

TopicDescriptionSwift Version
Value Typesstruct, enum, copy semantics5.0+
Reference Typesclass, ARC, identity5.0+
GenericsType parameters, constraints5.0+
Opaque Typessome keyword, type erasure5.1+
Existentialsany keyword, protocol types5.6+

Optionals

PatternUse CaseExample
if letConditional unwrapif let x = optional {}
guard letEarly exitguard let x = optional else {return}
??Default valueoptional?? defaultValue
?.Optional chainingobject?.property?.method()
!Force unwrap (avoid)Only when provably safe

Protocols

FeatureDescription
Protocol CompositionCodable & Sendable
Associated TypesGeneric protocols with associatedtype
Conditional Conformanceextension Array: Equatable where Element: Equatable
Protocol ExtensionsDefault implementations

Error Handling

PatternSyntaxUse Case
Throwingfunc x() throwsRecoverable errors
ResultResult<Success, Failure>Async contexts
Optionaltry?Silent failure
Forcetry!Guaranteed success

Code Examples

Protocol-Oriented Design

protocol Identifiable {
    associatedtype ID: Hashable
    var id: ID { get }
}

protocol Persistable: Identifiable {
    func save() async throws
    static func load(id: ID) async throws -> Self?
}

extension Persistable where Self: Codable {
    func save() async throws {
        let data = try JSONEncoder().encode(self)
        try await Storage.shared.write(data, forKey: "\(Self.self)-\(id)")
    }
}

Safe Optional Handling

struct UserProfile {
    let name: String
    let email: String?
    let avatarURL: URL?
}

func displayUser(_ user: UserProfile?) {
    guard let user else {
        showPlaceholder()
        return
    }

    nameLabel.text = user.name
    emailLabel.text = user.email ?? "No email provided"

    if let avatarURL = user.avatarURL {
        loadImage(from: avatarURL)
    }
}

Modern Error Handling

enum ValidationError: LocalizedError {
    case emptyField(String)
    case invalidFormat(String, expected: String)
    case outOfRange(String, min: Int, max: Int)

    var errorDescription: String? {
        switch self {
        case .emptyField(let field):
            return "\(field) cannot be empty"
        case .invalidFormat(let field, let expected):
            return "\(field) must be in \(expected) format"
        case .outOfRange(let field, let min, let max):
            return "\(field) must be between \(min) and \(max)"
        }
    }
}

func validate(username: String) throws -> String {
    guard !username.isEmpty else {
        throw ValidationError.emptyField("Username")
    }
    guard username.count >= 3, username.count <= 20 else {
        throw ValidationError.outOfRange("Username", min: 3, max: 20)
    }
    return username
}

Troubleshooting

Common Issues

IssueCauseSolution
"Cannot convert value of type"Type mismatchCheck expected type, add explicit cast
"Value of optional type not unwrapped"Missing unwrapUse if let, guard let, or??
"Protocol can only be used as generic constraint"PAT in variableUse any or type erasure
"Closure captures 'self' strongly"Retain cycleAdd [weak self] capture

Debug Commands

# Check Swift version
swift --version

# Compile with strict concurrency
swift build -Xswiftc -strict-concurrency=complete

# Dump AST for debugging
swiftc -dump-ast file.swift

Validation Rules

validation:
  - rule: no_force_unwrap
    severity: warning
    message: Avoid force unwrapping optionals
  - rule: no_implicitly_unwrapped
    severity: warning
    message: Avoid implicitly unwrapped optionals except for IBOutlets
  - rule: prefer_guard
    severity: info
    message: Prefer guard for early exit over nested if-let

Retry Logic

func withRetry<T>(
    maxAttempts: Int = 3,
    delay: Duration = .seconds(1),
    operation: () async throws -> T
) async throws -> T {
    var lastError: Error?

    for attempt in 1...maxAttempts {
        do {
            return try await operation()
        } catch {
            lastError = error
            if attempt < maxAttempts {
                try await Task.sleep(for: delay * Double(attempt))
            }
        }
    }

    throw lastError!
}

Observability

import OSLog

extension Logger {
    static let swift = Logger(subsystem: "com.app", category: "swift")
}

// Usage
Logger.swift.debug("Parsing user: \(userId)")
Logger.swift.error("Failed to decode: \(error.localizedDescription)")

Usage

Skill("swift-fundamentals")

Related Skills

  • swift-spm - Package management
  • swift-testing - Testing fundamentals code

平台分布

Claude Code

29.94%
按下载量换算22

windsurf

22.08%
按下载量换算16

trae

18.18%
按下载量换算13

OpenCode

10.52%
按下载量换算8

Cursor

7.69%
按下载量换算6

Codex

3.26%
按下载量换算2

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills