The Problem

LLMs writing SwiftUI code make predictable mistakes: deprecated APIs, VoiceOver-invisible controls, and performance traps that only surface after the code ships. Teams using AI coding assistants have no systematic way to encode SwiftUI expertise into the agent's behavior.

What This Does

This repo packages SwiftUI best practices into an Agent Skill—a structured knowledge bundle AI coding assistants can load and apply. The core is swiftui-pro/SKILL.md, which defines the skill's behavior and entry points. Supporting references in swiftui-pro/references/ cover specific domains: api.md (deprecated APIs), accessibility.md (VoiceOver), performance.md, navigation.md, and design.md.

The skill targets the specific failure modes of LLM-generated SwiftUI, not general Swift knowledge. It's a fork of twostraws/SwiftUI-Agent-Skill (4,560 stars), so the content has real-world validation behind it.

How It Is Wired

The entry point is swiftui-pro/SKILL.md. When invoked (via /swiftui-pro in Claude Code, $swiftui-pro in Codex), the agent reads this file to understand the skill's scope and then pulls the relevant reference files based on the task. swiftui-pro/agents/openai.yaml defines agent-specific configuration for OpenAI-compatible tools.

The .claude-plugin/marketplace.json and swiftui-pro/.claude-plugin/plugin.json wire this into Claude Code's plugin system. The swiftui-pro/skills/swiftui-pro/ directory contains a nested copy of the skill, suggesting support for the broader Agent Skills format used by Cursor and Gemini.

File responsibilities:

  • swiftui-pro/SKILL.md — skill definition, invocation contract
  • swiftui-pro/references/*.md — domain knowledge (8 files, one per topic)
  • swiftui-pro/agents/openai.yaml — agent configuration
  • .claude-plugin/ — Claude Code marketplace registration
  • assets/logo.svg — branding only

This is a content delivery system, not an application. There's no runtime, no database, no network calls. The "execution" happens inside the AI assistant's context window.

How To Use It

Setup (from README, verbatim):

npx skills add https://github.com/twostraws/swiftui-agent-skill --skill swiftui-pro

For Claude Code specifically:

/plugin marketplace add twostraws/SwiftUI-Agent-Skill
/plugin install swiftui-pro@swiftui-agent-skill

Running it: invoke the skill in your AI assistant:

  • Claude Code: /swiftui-pro Check for deprecated API
  • Codex: $swiftui-pro Focus on accessibility

Configuration: No environment variables or credentials required. The skill is self-contained markdown.

Real-World Use

A team building an iOS app with Claude Code can run /swiftui-pro before committing AI-generated SwiftUI code. The agent will review the codebase against the reference rules—flagging a NavigationView as deprecated (use NavigationStack), spotting a missing .accessibilityLabel() on a custom button, or catching a ForEach without explicit ids that will cause performance degradation on large lists.

Code Health & Issues

Static analysis found these issues:

  • Medium — No test files detected — untested code paths, repository-wide. This is a content repo; automated tests would verify markdown structure and reference file integrity, not runtime behavior.
  • Medium — No CI/CD pipeline — no .github/ or CI config. No automated check that the skill files remain valid or that the nested skill copy stays in sync with the root.

The repo has a license and no committed secrets. No lockfile is present, which is expected—there are no runtime dependencies.

The Bottom Line

This is a well-structured knowledge package for a real problem: AI assistants writing bad SwiftUI. The content quality comes from the upstream project's track record, not from this fork. Teams already using Claude Code or Codex for SwiftUI work should adopt this. The lack of tests and CI is acceptable for a markdown-only repo, but the nested skill copy (swiftui-pro/skills/) is a maintenance risk if the two copies drift.