Table of content
Swift programming language utilities and migration tools for Claude Code
Installation
npx claude-plugins install @ivan-magda/claude-code-marketplace/swift
Contents
Folders: skills
Files: README.md
Documentation
Swift programming language utilities and migration tools for Claude Code.
Features
Skills
Swift 6 Migration
Expert guidance for migrating Swift codebases to Swift 6, including concurrency adoption and strict checking.
Automatically activates when:
- Migrating Swift code to Swift 6
- Enabling Swift 6 language mode
- Fixing data race safety issues
- Adopting Swift concurrency (async/await, actors)
- Resolving Sendable conformance issues
- Implementing complete checking mode
Capabilities:
- Read and edit Swift files
- Search for concurrency patterns
- Run Swift compiler and build tools
- Provide incremental migration strategies
- Reference comprehensive Swift 6 migration documentation
Swift DocC Comments
Guidance for writing proper Swift DocC inline documentation comments.
Automatically activates when:
- Writing or enhancing Swift documentation comments
- Adding inline doc comments to Swift source files
- User asks for API documentation help
Capabilities:
- Read and edit Swift files
- Ensure correct DocC comment structure
- Distinguish inline comments from .docc catalog files
Swift DocC GitHub Pages
Automate Swift package documentation publishing to GitHub Pages via GitHub Actions.
Automatically activates when:
- Setting up DocC documentation for a Swift package
- Deploying documentation to GitHub Pages
- Encountering “no such module ‘UIKit’” during doc generation
Capabilities:
- Create GitHub Actions workflows
- Configure iOS-only vs cross-platform builds
- Set up proper DocC hosting with redirects
Swift Package Demo
Record and optimize demo GIFs for Swift package READMEs.
Automatically activates when:
- Creating demo GIFs for Swift package READMEs
- Recording iOS Simulator videos
- Setting up demo apps for SwiftUI libraries
Capabilities:
- Guide demo app setup
- Run simulator recording commands
- Convert videos to optimized GIFs
- Ask user preferences for GIF sizing
Installation
/plugin marketplace add ivan-magda/claude-superpowers
/plugin install swift@claude-superpowers
Usage
Skills activate automatically based on context. Example prompts:
Swift 6 Migration:
Help me migrate this Swift code to Swift 6
DocC Comments:
Add documentation comments to this Swift file
DocC GitHub Pages:
Set up DocC documentation for this Swift package with GitHub Pages
Demo Recording:
Create a demo GIF for this Swift package README
Version
1.3.0
Included Skills
This plugin includes 4 skill definitions:
swift-6-migration
Use when encountering Swift 6 concurrency errors, Sendable conformance warnings, actor isolation issues, “global variable is not concurrency-safe” errors, or migrating codebases to Swift 6 language mode
View skill definition
Swift 6 Migration
Overview
Swift 6 enforces data race safety at compile time. Migration involves making implicit isolation explicit and ensuring all shared state is thread-safe.
This skill bundles Apple’s complete migration guide. You MUST search it for EVERY error before implementing a fix.
Mandatory Workflow
digraph migration_workflow {
rankdir=TB;
node [shape=box];
"Compiler error/warning" [shape=ellipse];
"Search migration-guide.md" [label="REQUIRED: Search migration-guide.md\nfor error pattern"];
"Read matched section" [label="Read the matched FILE: section"];
"Apply documented fix" [label="Apply Apple's documented fix"];
"Verify fix" [label="Build and verify"];
"Compiler error/warning" -> "Search migration-guide.md";
"Search migration-guide.md" -> "Read matched section";
"Read matched section" -> "Apply documented fix";
"Apply documented fix" -> "Verify fix";
"Verify fix" -> "Compiler error/warning" [label="More errors"];
}
For EACH compiler error/warning:
- FIRST search migration-guide.md for the error pattern
- THEN read the matched FILE: section
- THEN apply the documented fix
- FINALLY verify the fix
Checklist
Use TodoWrite to track each item:
- Enable
-strict-concurrency=completewarnings before Swift 6 mode - For EACH error: grep migration-guide.md BEFORE implementing fix
- Read the relevant FILE: section from search results
- Verify fix
…(truncated)
swift-docc-comments
Use when writing or enhancing Swift documentation comments for DocC generation, adding inline doc comments to Swift source files, or when user asks for API documentation
View skill definition
Swift DocC Inline Comments
Overview
Swift DocC inline comments follow a specific structure. Section headers like ## Overview and ## Topics belong in .docc catalog files, NOT in inline source comments.
Structure
/// Summary (first paragraph - one sentence)
///
/// Discussion paragraphs (no header needed)
///
/// ```swift
/// // Code example
/// ```
///
/// - Parameter name: Description
/// - Returns: Description
/// - Throws: Description
/// - Note: Additional info
Quick Reference
| Element | Format | Location |
|---|---|---|
| Summary | First paragraph | Inline |
| Discussion | Subsequent paragraphs | Inline |
| Code examples | Triple backticks | Inline, before parameters |
## Overview | Section header | .docc catalog ONLY |
## Topics | Section header | .docc catalog ONLY |
| Symbol links | ``SymbolName`` | Both |
Correct Format
/// Brief summary in one sentence.
///
/// Extended discussion explaining behavior, use cases,
/// or important details. No header needed.
///
/// ```swift
/// let example = MyType()
/// example.doSomething()
/// ```
///
/// - Parameter value: What this parameter does.
/// - Returns: What gets returned.
/// - Note: Default value is `.default`.
func method(value: Int) -> String
Com
…(truncated)
swift-docc-github-pages
Use when setting up DocC documentation for a Swift package, deploying to GitHub Pages, or encountering “no such module ‘UIKit’” during doc generation
View skill definition
Swift DocC to GitHub Pages
Automate Swift package documentation publishing to GitHub Pages via GitHub Actions.
Which Build Method?
digraph method_choice {
"Check Package.swift platforms" [shape=box];
"iOS only?" [shape=diamond];
"Use xcodebuild docbuild" [shape=box, style=filled, fillcolor=lightblue];
"Use swift-docc-plugin" [shape=box];
"Check Package.swift platforms" -> "iOS only?";
"iOS only?" -> "Use xcodebuild docbuild" [label=".iOS only"];
"iOS only?" -> "Use swift-docc-plugin" [label="includes .macOS"];
}
Why? swift package generate-documentation builds for macOS. iOS-only packages fail with “no such module ‘UIKit’”.
Quick Reference
| Item | Value |
|---|---|
| Target name | From Package.swift: .target(name: "MyLib") |
| URL format | https://USER.github.io/REPO/documentation/targetnamelowercase/ |
| Enable Pages | Settings → Pages → Source → “GitHub Actions” |
Workflow
Create .github/workflows/docc.yml. Replace TARGET_NAME, TARGET_NAME_LOWERCASE, REPO_NAME.
iOS-only (no Package.swift changes needed):
name: Documentation
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-pr
...(truncated)
</details>
### swift-package-demo
> Use when creating demo GIFs for Swift package READMEs, recording iOS simulator videos, or setting up demo apps for SwiftUI libraries
<details>
<summary>View skill definition</summary>
# Swift Package Demo Recording
## Overview
Record and optimize demo GIFs for Swift package READMEs. Swift packages need a **separate demo app** since SwiftUI previews only run in Xcode Canvas, not the iOS Simulator.
## When to Use
- Adding demo GIFs to a Swift package README
- Recording iOS Simulator for documentation
- User asks to "record a demo" or "add GIFs to README"
## Critical Understanding
```dot
digraph demo_flow {
"SwiftUI Preview" [shape=box];
"iOS Simulator" [shape=box];
"Xcode Canvas only" [shape=box, style=filled, fillcolor=lightyellow];
"Recordable with xcrun" [shape=box, style=filled, fillcolor=lightgreen];
"SwiftUI Preview" -> "Xcode Canvas only" [label="runs in"];
"Demo App" -> "iOS Simulator" [label="runs in"];
"iOS Simulator" -> "Recordable with xcrun";
}
SwiftUI #Preview macros CANNOT be recorded. You must create a demo app.
Quick Reference
| Step | Command/Action |
|---|---|
| Create demo dir | mkdir -p demo |
| Boot simulator | xcrun simctl boot "iPhone SE (3rd generation)" |
| Open simulator | open -a Simulator |
| Record video | xcrun simctl io booted recordVideo --codec=h264 demo/raw.mov |
| Stop recording | Ctrl+C |
…(truncated)