swift-development SKILL.md skillA
swift-development from projanvil/mindforge is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add projanvil/mindforge/swift-development@git:20261009.b4230f2Pins git:20261009.b4230f2 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- projanvil/mindforge
- Path
skills/zh-cn/swift-development/SKILL.md- Versions recorded
- 5
- Latest version
- git:20261009.b4230f2, committed Oct 9, 2026
- First version recorded
- Jan 16, 2026
- Size
- 3,264 bytes
- Repository stars
- 3
- License
- MIT
提供 Swift 6+ 核心语言开发能力,涵盖并发编程、宏、数据模型设计和业务逻辑实现。使用此技能编写 ViewModel、Service 或 Repository 层代码、定义数据模型、实现算法、编写单元测试,或修复并发警告和数据竞争时使用。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Swift 6 开发技能
## 何时使用
触发场景:当用户提出以下请求时,使用本 skill:
- 当需要编写 ViewModel、Service 或 Repository 层代码时
- 当需要定义数据模型或实现算法时
- 当用户要求修复并发警告或数据竞争时
## 指令
当处理非 UI 的 Swift 代码、业务逻辑、算法或数据层时,请遵循本指南。你的目标是编写高性能、线程安全且富有表现力的 Swift 代码。
## 此技能的功能
- **并发编程**: 使用 Actors, async/await, Task, TaskGroup 编写安全并发代码。
- **类型安全**: 定义 Sendable 类型,使用 Typed Throws 精确处理错误。
- **测试**: 使用 Swift Testing 框架编写现代化的单元测试。
- **数据处理**: 编写 Codable 模型,进行 JSON 解析和网络请求封装。
- **宏的使用**: 使用或创建宏来减少样板代码。
## 何时使用此技能
- 编写 ViewModel, Service, Repository 层代码时。
- 定义数据模型 (structs, enums) 时。
- 实现算法或工具函数时。
- 编写单元测试时。
- 修复并发警告或数据竞争问题时。
## 示例
### 示例 1:定义安全的 Actor 服务
```swift
/// 一个线程安全的用户数据服务
actor UserService {
private var cache: [String: User] = [:]
// 使用 typed throws 明确错误类型
func fetchUser(id: String) async throws(NetworkError) -> User {
if let cached = cache[id] {
return cached
}
// 模拟网络请求
let user = try await NetworkClient.shared.get("/users/\(id)", as: User.self)
cache[id] = user
return user
}
}
```
### 示例 2:使用 Swift Testing 进行测试
```swift
import Testing
@testable import MyApp
@Test("User parsing should succeed")
func userParsing() async throws {
…Read the whole file at its exact version.
How to install
mdr add projanvil/mindforge/swift-development@sha256:8ca020521f26a844The line at the top of this page pins the label git:20261009.b4230f2, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_3i72vz46jvvhxeek)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 5 versions of this file, between Jan 16, 2026 and Oct 9, 2026, about one every 66 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261009.b4230f2 latest | 2026-10-09 | b4230f2 | 3,264 B | A | view · diff |
| git:20260305.a2f116c | 2026-03-05 | a2f116c | 3,010 B | A | view · diff |
| git:20260303.0dd7018 | 2026-03-03 | 0dd7018 | 2,836 B | A | view · diff |
| git:20260122.88a34b1 | 2026-01-22 | 88a34b1 | 2,881 B | A | view · diff |
| git:20260116.5b9abf0 | 2026-01-16 | 5b9abf0 | 2,864 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (3264 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
projanvil/mindforge · 3 stars · license MIT · pushed 2026-10-21 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_3i72vz46jvvhxeek GET https://markdownregistry.com/api/v1/resolve?ref=projanvil/mindforge/swift-development GET https://markdownregistry.com/api/v1/blob/8ca020521f26a844c215176b6ad3474c7280526aa6ddcdabacb47027fab4cbc8
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from projanvil/mindforge
Every file in projanvil/mindforge