Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:48:42 +08:00
commit 28da5a8478
5 changed files with 3943 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
{
"name": "swift",
"description": "Swift programming language utilities and migration tools for Claude Code",
"version": "1.0.1",
"author": {
"name": "Ivan Magda",
"email": "ivan.magda@outlook.com",
"url": "https://github.com/ivan-magda/claude-code-marketplace"
},
"skills": [
"./skills"
]
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# swift
Swift programming language utilities and migration tools for Claude Code

49
plugin.lock.json Normal file
View File

@@ -0,0 +1,49 @@
{
"$schema": "internal://schemas/plugin.lock.v1.json",
"pluginId": "gh:ivan-magda/claude-code-marketplace:plugins/swift",
"normalized": {
"repo": null,
"ref": "refs/tags/v20251128.0",
"commit": "f9043fcbe6bd059440f0bcda59d6a7f962e37cbb",
"treeHash": "b461cb509d54f2881decd3826e4a42701bde938dcb201c00719d40fea29d97b6",
"generatedAt": "2025-11-28T10:17:41.387883Z",
"toolVersion": "publish_plugins.py@0.2.0"
},
"origin": {
"remote": "git@github.com:zhongweili/42plugin-data.git",
"branch": "master",
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
},
"manifest": {
"name": "swift",
"description": "Swift programming language utilities and migration tools for Claude Code",
"version": "1.0.1"
},
"content": {
"files": [
{
"path": "README.md",
"sha256": "47fa5c7af9bfeb738cfe906ecf43447dc775a7aaeed4308c24b250302081e414"
},
{
"path": ".claude-plugin/plugin.json",
"sha256": "493ed43ab22b0452c9b6b91d0c25bb94e9df4e5ddcb376eac96727ec2b8fa886"
},
{
"path": "skills/swift-6-migration/migration-guide.md",
"sha256": "dde4af6cbfbcbeb424bad72b68c7cef47f7e315fd340b32bb16eba70cf210f2b"
},
{
"path": "skills/swift-6-migration/SKILL.md",
"sha256": "ad262ddd742fc4d421860c797aaf60aaaa9ec351a47d44207036778326a25d16"
}
],
"dirSha256": "b461cb509d54f2881decd3826e4a42701bde938dcb201c00719d40fea29d97b6"
},
"security": {
"scannedAt": null,
"scannerVersion": null,
"flags": []
}
}

View File

@@ -0,0 +1,61 @@
---
name: swift-6-migration
description: Guides Swift code migration to Swift 6, including concurrency adoption, data race safety, and strict checking. Fixes Sendable conformance issues, actor isolation problems, and enables complete checking mode. Use when migrating to Swift 6, enabling Swift 6 language mode, fixing concurrency warnings, resolving data race issues, or adopting async/await and actors.
allowed-tools: Read, Edit, Grep, Glob, Bash
---
# Swift 6 Migration
Expert guidance for migrating Swift codebases to Swift 6, including concurrency adoption and strict checking.
## Migration Approach
1. **Assess Current State**: Review Swift compiler version and current language mode
2. **Incremental Strategy**: Enable warnings first, then gradually fix issues
3. **Focus Areas**: Prioritize data race safety, actor isolation, and Sendable conformance
4. **Testing**: Verify runtime behavior after changes
## Key Migration Topics
Refer to [migration-guide.md](migration-guide.md) for detailed guidance on:
- Complete concurrency checking
- Data race safety patterns
- Incremental adoption strategies
- Common problems and solutions
- Library evolution considerations
- Swift 6 mode enablement
## Commands
Use these commands during migration:
```bash
# Check Swift compiler version
swift --version
# Build with Swift 6 warnings
swift build -Xswiftc -swift-version -Xswiftc 6
# Enable complete checking
# Add to Package.swift or build settings:
# .enableUpcomingFeature("StrictConcurrency")
```
## Instructions
When helping with Swift 6 migration:
1. **Read relevant Swift files** to understand the current implementation
2. **Identify concurrency and data race issues** in the code
3. **Reference migration-guide.md** - a single file containing 25 bundled sections:
- Check the table of contents at the top to see all available sections
- For common problems and solutions: Search for "FILE: Guide.docc/CommonProblems.md"
- For Sendable conformance and data race patterns: Search for "FILE: Guide.docc/DataRaceSafety.md"
- For incremental migration strategies: Search for "FILE: Guide.docc/IncrementalAdoption.md"
- For Swift 6 mode enablement: Search for "FILE: Guide.docc/Swift6Mode.md"
- For complete checking: Search for "FILE: Guide.docc/CompleteChecking.md"
- Use grep to find specific topics: `grep -n "pattern" migration-guide.md`
4. **Propose incremental changes** following the patterns from the guide
5. **Test changes** with appropriate compiler flags (see Commands section)
6. **Explain the reasoning** behind each change to the user

File diff suppressed because it is too large Load Diff