Swift Tooling
Installation
SKILL.md
Swift Tooling Standards
Priority: P0
Implementation Guidelines
Swift Package Manager (SPM)
- Package.swift: Define clear targets, products, and dependencies.
- Modularization: Break large projects into local packages for faster builds.
- Versioning: Use semantic versioning (Major.Minor.Patch) for shared packages.
Code Quality
- SwiftLint: Use for consistent style enforcement. Adhere to project-wide
.swiftlint.yml. - Compiler Warnings: Treat warnings as errors in CI to maintain code health.
- Documentation: Use DocC-style comments (
///) for public APIs.
Build Configurations
- Xcconfig: Use external configuration files to manage build settings.
- Environment Flags: Use
#if DEBUGfor development-only code. - Schemes: Maintain separate schemes for Development, Staging, and Production.
Anti-Patterns
- Hardcoded Secrets:
**No API keys in code**: Use environment variables or build configs. - Ignoring Lint Errors:
**No // swiftlint:disable**: Fix the underlying issue. - Manual Dependency Copying:
**No manually added frameworks**: Use SPM.
References
Related skills
More from hoangnguyen0403/agent-skills-standard
skill creator
Standards for creating new High-Density Agent Skills with optimal token economy.
181swift swiftui
Standards for State Management, View Lifecycle, and Property Wrappers
1swift testing
Standards for XCTest, Async Tests, and Test Organization
1swift language
Standards for Optionals, Protocols, Extensions, and Type Safety
1java-concurrency
Implement modern concurrency with Virtual Threads and Structured Concurrency in Java. Use when implementing Java Virtual Threads (Java 21), Structured Concurrency with StructuredTaskScope, CompletableFuture pipelines, or debugging race conditions. (triggers: **/*.java, Thread, Executor, synchronized, lock, CompletableFuture, StructuredTaskScope, VirtualThread, AtomicInteger, async, race condition)
1dart language patterns
Modern Dart standards (3.x+) including null safety and patterns.
1