Skip to content
Development
Command

/swift6-check

**Project context:** Values in angle brackets below (e.g. `<scheme>`, `<JIRA_KEY>`, `<flag-key-enum>`) are resolved at runtime — detect them from the project (`xcodebuild -list -json` for the scheme, `git`/`gh` for repo & owner, the branch name for the Jira key, a codebase

From plugin
ios-workflow-claude
722 skills3 agents22 commands
Install
$ npx -y skills add carloshpdoc/ios-workflow-claude --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/swift6-check

Context preview

What this command does when you run it.

**Project context:** Values in angle brackets below (e.g. `<scheme>`, `<JIRA_KEY>`, `<flag-key-enum>`) are resolved at runtime — detect them from the project (`xcodebuild -list -json` for the scheme, `git`/`gh` for repo & owner, the branch name for the Jira key, a codebase

Command definition

swift6-check.md

Swift 6 Concurrency Check

> **Project context:** Values in angle brackets below (e.g. `<scheme>`, `<JIRA_KEY>`, `<flag-key-enum>`) are resolved at runtime — detect them from the project (`xcodebuild -list -json` for the scheme, `git`/`gh` for repo & owner, the branch name for the Jira key, a codebase search for flag/font files), or ask if they cannot be inferred. This plugin ships no per-project config.

Analyze the current Swift 6 strict concurrency readiness. This is a dry-run — no code is modified.

If `$ARGUMENTS` is provided, scope the check to that category only (e.g., `mainactor`, `singletons`, `dispatch-queue`, `completion-handlers`, `sendable`, `delegates`). If no argument, run a full scan.

Steps

1. Read Current Status

Read `docs/swift6-migration-status.md` to understand what has already been migrated.

2. Run Category Scans

For each category (or the specified one), run targeted searches:

@MainActor on ViewModels

# ViewModels WITHOUT @MainActor
grep -rl "class.*ViewModel.*ObservableObject" <scheme>/ --include="*.swift" | while read f; do
  grep -L "@MainActor" "$f"
done

Report: total ViewModels, annotated count, remaining count, list of unannotated files.

DispatchQueue.main.async

grep -rn "DispatchQueue\.main\.async" <scheme>/ --include="*.swift"

Report: total occurrences, files affected, top 10 files by count.

Completion Handlers

grep -rn "completion:.*@escaping" <scheme>/ --include="*.swift"

Report: total occurrences, files affected, top 10 files by count.

Mutable Singletons

grep -rn "static var shared\|static let shared" <scheme>/ --include="*.swift"

For each singleton, check if it has `@MainActor`, actor isolation, or lock synchronization. Report: total singletons, protected count, unprotected count, list with file paths.

@Sendable Coverage

# Classes without @Sendable or Sendable conformance
grep -rn "^class \|^final class \|^public class \|^public final class " <scheme>/ --include="*.swift" | grep -v "@Sendable\|: Sendable"

Report: total classes, Sendable count, remaining count.

Delegate Patterns

grep -rn "weak var.*delegate" <scheme>/ --include="*.swift"

Report: total delegates, files affected.

3. Build with Strict Concurrency (Optional)

If the user requests it or if config checklist shows `targeted` is enabled:

xcodebuild -scheme <scheme> -destination 'platform=iOS Simulator,name=iPhone 11,OS=latest' \
  OTHER_SWIFT_FLAGS='-strict-concurrency=complete' \
  -quiet build 2>&1 | grep -c "warning:"

Report total warnings count.

4. Generate Report

Output a summary table:

## Swift 6 Readiness Report

| Category | Total | Done | Remaining | Priority |
|----------|-------|------|-----------|----------|
| @MainActor ViewModels | X | X | X | HIGH |
| DispatchQueue.main.async | X | X | X | HIGH |
| Completion handlers | X | X | X | HIGH |
| Mutable singletons | X | X | X | CRITICAL |
| @Sendable classes | X | X | X | MEDIUM |
| Delegate patterns | X | X | X | LOW |

Recommended next: /swift6-fix <type>

5. Update Status File If Counts Changed

If live counts differ from `docs/swift6-migration-status.md`, update the file with accurate numbers.

Notes

  • This is a READ-ONLY operation — no source code is modified
  • Run this before starting any `/swift6-fix` session to get current state
  • Run this after a `/swift6-fix` session to verify progress
  • Large modules (your app target) may take longer to scan
Read more
Ships withios-workflow-claude

Reusable Claude Code slash-commands, skills, and workflows extracted from real iOS / backend projects. Packaged as three installable plugins - register the marketplace and /plugin install what you need.

Get the whole plugin, auto-invoked
Stats
7
Stars
0
Views
1
Forks
Maintained
Maintenance
Shell
Language
Apache-2.0
License
2mo ago
Last commit
2mo ago
Created

Repo: carloshpdoc/ios-workflow-claude

Other commands on ios-workflow-claude.