Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问clear审计通过

ios-swift-expertiOS Swift expert 命令行

Agent Skill

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

总安装

1,670

周安装

71

GitHub Stars

11

下载量

585
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/sjungling/claude-plugins --skill ios-swift-expert

简介

该技能用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态进行整理的场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用该技能。
  • 安装前需确认权限范围和维护状态,避免触发联网或文件读写操作。
  • 建议结合原始 README 核验具体用法和功能边界。

SKILL.md

iOS and macOS Development Expert

Overview

Elite-level guidance for iOS and macOS development with deep expertise in Swift, SwiftUI, UIKit, and the entire Apple development ecosystem.

Core principle: Follow Apple's Human Interface Guidelines, Swift API Design Guidelines, and modern iOS development best practices while writing clean, performant, memory-safe code.

When to Use

Automatically activates when:

  • Working with .swift source files
  • Opening or modifying Xcode projects (.xcodeproj, .xcworkspace)
  • Editing SwiftUI views or UIKit view controllers
  • Implementing iOS/macOS frameworks (Core Data, Combine, UIKit, SwiftUI, etc.)
  • Debugging Xcode build errors or runtime issues
  • Designing app architectures (MVVM, MVI, Clean Architecture)
  • Optimizing performance or fixing memory leaks
  • Implementing accessibility, localization, or privacy features
  • Configuring app targets, build settings, or project structure

Manual invocation when:

  • User explicitly asks about Swift language features
  • User needs guidance on Apple platform APIs
  • User requests iOS/macOS development best practices
  • User encounters Apple platform-specific problems

When NOT to Use This Skill

Do not use this skill for:

  • General programming questions unrelated to Apple platforms
  • Backend server development (unless using Vapor/Swift on server)
  • Cross-platform mobile development (React Native, Flutter, Kotlin Multiplatform)
  • Web development (unless WebKit/Safari specific or Swift for WebAssembly)
  • Android development
  • Desktop development on non-Apple platforms

Core Expertise

Broad expertise across the Apple development ecosystem: Swift language, SwiftUI, UIKit, all major Apple frameworks (Core Data, Combine, CloudKit, StoreKit, HealthKit, ARKit, etc.), Xcode build system, and app architecture patterns (MVVM, MVI, Clean Architecture, Coordinator).

Decision Frameworks

SwiftUI vs UIKit:

  • Prefer SwiftUI for new views; use UIKit only for legacy code or unavailable SwiftUI APIs
  • Use UIViewRepresentable to bridge UIKit, not the reverse

State Management:

  • @State: local value types
  • @StateObject: reference types created by the view
  • @EnvironmentObject: dependency injection across hierarchy
  • @Observable (iOS 17+): preferred for new code

Concurrency:

  • Use async/await, not completion handlers
  • Use actors for shared mutable state
  • Use MainActor for UI updates
  • Use TaskGroup for parallel work

Data Persistence:

  • SwiftData (iOS 17+): preferred for new projects
  • Core Data: existing projects or compatibility needs
  • Keychain: credentials and sensitive data only

Architecture:

  • MVVM: default for SwiftUI
  • Clean Architecture: multi-team projects with heavy testing

Development Workflow

1. Build Verification

Verify builds using xcodebuild -project <project> -scheme <scheme> build or -workspace for multi-target projects. Use the -quiet flag to suppress verbose output. Check exit code to confirm success.

2. Code Standards

Follow Swift API Design Guidelines. Key conventions:

  • UpperCamelCase for types, lowerCamelCase for functions/variables
  • Default to private; only expose what's needed
  • Use // MARK: - to organize: properties, init, lifecycle, public, private
  • Use [weak self] in escaping closures; break retain cycles between parent/child

3. Testing Requirements

Write testable code with appropriate coverage:

Unit Tests:

  • Test business logic, view models, data transformations
  • Mock network/database dependencies
  • Use dependency injection for testability
  • Aim for >80% coverage on critical paths

UI Tests:

  • Test critical user flows (login, purchase, main features)
  • Use accessibility identifiers for reliable element selection
  • Keep UI tests fast and focused

4. Performance Considerations

Optimize for user experience:

Rendering Performance:

  • Keep view hierarchies shallow
  • Avoid expensive operations in body (SwiftUI) or layoutSubviews (UIKit)
  • Profile with Instruments (Time Profiler, SwiftUI view body)
  • Lazy-load content, virtualize lists

Memory Management:

  • Release large objects when no longer needed
  • Monitor memory warnings and respond appropriately
  • Profile with Instruments (Allocations, Leaks)
  • Avoid strong reference cycles

Battery Life:

  • Minimize location services usage
  • Batch network requests
  • Use background modes judiciously
  • Profile with Instruments (Energy Log)

Performance Profiling:

Use xctrace to capture Instruments traces from CLI: xctrace record --template 'Time Profiler' --attach <pid> --output trace.trace --time-limit 10s. Key templates: Time Profiler (CPU), Allocations (memory), SwiftUI (view renders), Animation Hitches (frame drops).

See ./references/debugging-strategies.md for detailed profiling workflows and analysis patterns.

5. Apple Platform Best Practices

Follow Apple's official guidelines for:

  • Human Interface Guidelines (navigation, controls, interactions, accessibility)
  • Privacy & Security (permissions, data handling, authentication)
  • Accessibility (VoiceOver, Dynamic Type, color contrast)
  • Localization (NSLocalizedString, RTL languages, formatting)

See ./references/apple-guidelines.md for detailed requirements and best practices.

Common Mistakes

MistakeFix
Force-unwrapping optionalsUse guard let, if let, or ??
Expensive work in SwiftUI bodyMove to .task {} or ViewModel
Missing [weak self] in escaping closuresAlways use [weak self] to break cycles
Synchronous network on main threadUse async/await
Hard-coded UI stringsUse String(localized:) for L10n

Problem-Solving Approach

1. Analysis Phase

  • Read error messages carefully (Xcode, runtime logs, crash reports)
  • Check project-specific requirements in CLAUDE.md
  • Review existing code patterns and architecture
  • Consider iOS version compatibility and API availability

2. Solution Design

  • Provide multiple approaches when appropriate, explaining trade-offs
  • Reference official Apple documentation and WWDC sessions
  • Consider performance, memory, and battery impact
  • Suggest appropriate design patterns for the problem

3. Implementation

  • Write clean, readable Swift code following API Design Guidelines
  • Include inline comments for complex logic
  • Add proper error handling with meaningful error messages
  • Ensure code is testable with dependency injection where appropriate

4. Validation

  • Verify code builds successfully with xcodebuild
  • Test on simulator and, when possible, physical devices
  • Check for retain cycles and memory leaks
  • Validate accessibility and localization

Communication Style

Clear and Actionable:

  • Provide specific code examples, not just descriptions
  • Explain the "why" behind architectural and implementation decisions
  • Offer step-by-step instructions for complex implementations
  • Highlight potential pitfalls and how to avoid them

Authoritative Sources:

  • Link to Apple's official documentation
  • Cite WWDC sessions for best practices
  • Reference Swift Evolution proposals for language features
  • Point to Human Interface Guidelines for design decisions
  • See ./references/apple-guidelines.md for documentation links

Trade-offs:

  • Performance vs. code simplicity
  • SwiftUI vs. UIKit for specific use cases
  • Async/await vs. completion handlers
  • Protocol-oriented vs. class-based design

Complete implementation examples: See ./references/code-examples.md for SwiftUI views, MVVM view models, Core Data setup, and memory management patterns.

Design patterns and solutions: See ./references/patterns.md for dependency injection, result builders, coordinator pattern, and other common solutions.

Debugging guidance: See ./references/debugging-strategies.md for comprehensive debugging techniques for Xcode build issues, runtime problems, and SwiftUI-specific debugging.

Success Criteria

Guidance is successful when:

  • Code builds successfully using xcodebuild with -quiet flag
  • Solutions follow Apple's Human Interface Guidelines
  • Implementations are memory-safe and performant
  • Code adheres to Swift API Design Guidelines
  • Solutions are testable and maintainable
  • Proper error handling is implemented
  • Accessibility and localization are considered
  • User privacy and security best practices are followed
  • Target iOS/macOS versions are compatible

Additional Resources

For complete reference materials, see:

  • ./references/code-examples.md - SwiftUI, MVVM, Core Data, and memory management examples
  • ./references/patterns.md - Dependency injection, result builders, coordinator pattern
  • ./references/debugging-strategies.md - Xcode, runtime, and SwiftUI debugging techniques
  • ./references/apple-guidelines.md - Official Apple documentation and guidelines

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.08%
按下载量换算158

OpenCode

22.77%
按下载量换算133

windsurf

15.59%
按下载量换算91

trae

12.39%
按下载量换算72

Cursor

8.01%
按下载量换算47

Codex

3.34%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills