Skip to content

SethCalkins/claude-ios-swift-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift Skills Plugin

A comprehensive Claude Code plugin for iOS and Swift development, providing specialized skills, commands, agents, and automated validation for modern Swift/SwiftUI workflows.

Features

Skills (10)

Skill Purpose
app-store-changelog Generate App Store release notes from git history
ios-debugger Build, run, and debug iOS apps on simulators
gh-issue-fix-flow End-to-end GitHub issue resolution workflow
swift-concurrency-expert Swift 6.2+ concurrency review and remediation
swift-concurrency-guard Deterministic blocking rules for concurrency anti-patterns
swiftui-liquid-glass iOS 26+ Liquid Glass API implementation
swiftui-ui-patterns SwiftUI view composition best practices
swiftui-view-refactor Refactor SwiftUI views for consistency
swiftui-performance-audit SwiftUI performance diagnosis and optimization
macos-spm-app-packaging SwiftPM macOS app packaging without Xcode

Commands (4)

  • /swift-audit - Run Swift concurrency audit on current file or directory
  • /xcode-test - Build and test iOS project via XcodeBuildMCP
  • /swift-fix-issue - Take a GitHub issue number and fix it end-to-end
  • /app-changelog - Generate App Store changelog from git history

Agents (3)

  • ios-debugger - Autonomous iOS simulator debugging
  • swift-concurrency-reviewer - Proactive Swift concurrency code review
  • swiftui-performance-auditor - SwiftUI performance analysis

Hooks

  • Swift Concurrency Validator (PostToolUse, async) - Automatically analyzes Swift files for concurrency issues when edited
  • Concurrency Guard (PreToolUse, blocking) - Blocks edits that introduce concurrency anti-patterns (requires setup)

Tools

  • ConcurrencyGuard - SwiftSyntax-based static analyzer that blocks edits violating concurrency rules (CC-CONC-001 through CC-CONC-008)

Installation

Via Claude Code CLI

claude --plugin-dir ~/github/claude-ios-swift-plugin

As a project plugin

Copy or symlink to your project's .claude-plugin/ directory.

Requirements

  • Claude Code CLI
  • Xcode (for build/test commands)
  • XcodeBuildMCP (for simulator interaction)
  • gh CLI (for GitHub issue workflows)

Usage

Skills

Skills activate automatically based on context. Ask questions like:

  • "Review this Swift code for concurrency issues"
  • "Help me implement Liquid Glass in this view"
  • "Audit this SwiftUI view for performance"
  • "Generate release notes for this version"

Commands

/swift-audit              # Audit current file for concurrency issues
/xcode-test               # Build and test the iOS project
/swift-fix-issue 123      # Fix GitHub issue #123
/app-changelog            # Generate changelog from git history

Agents

Agents trigger proactively:

  • swift-concurrency-reviewer runs after Swift file edits
  • swiftui-performance-auditor runs when performance issues are mentioned
  • ios-debugger runs when debugging or simulator interaction is needed

ConcurrencyGuard Setup (Optional)

The ConcurrencyGuard tool provides deterministic blocking of concurrency anti-patterns. It's a SwiftSyntax-based analyzer that runs as a PreToolUse hook.

1. Copy to your project

cp -r ~/github/claude-ios-swift-plugin/tools/ConcurrencyGuard /path/to/your/project/Tools/

2. Build the tool

cd /path/to/your/project/Tools/ConcurrencyGuard
swift build -c release

3. Add to project's Claude settings

Create or edit .claude/settings.json in your project:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/Tools/ConcurrencyGuard/.build/release/concurrency-guard --config \"$CLAUDE_PROJECT_DIR\"/Tools/ConcurrencyGuard/concurrency_guard.json",
            "timeout": 10
          }
        ]
      }
    ]
  }
}

Rules Enforced

Code Rule
CC-CONC-001 No Task.detached (use structured tasks)
CC-CONC-002 No Task {} in init for app-critical types
CC-CONC-003 No Task {} in render/layout paths (body, layoutSubviews, etc.)
CC-CONC-004 AsyncStream must set onTermination for cancel safety
CC-CONC-005 No thundering herd (>3 tasks per function)
CC-CONC-008 No .background priority for for await loops

See skills/swift-concurrency-guard/SKILL.md for detailed rule documentation.

License

MIT

About

Claude Code plugin for iOS/Swift development with skills, commands, agents, and auto-validation for SwiftUI, Swift Concurrency, debugging, and performance

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors