AvdLee/SwiftUI-Agent-Skill

Add expert SwiftUI Best Practices guidance to your AI coding tool (Agent Skills open format).

What it solves

This project provides expert-level guidance for AI coding tools to help them write, review, and optimize SwiftUI code. It prevents AI agents from using outdated APIs or inefficient patterns by providing a structured library of best practices covering state management, view composition, and performance.

How it works

It is packaged as an "Agent Skill" (following the Agent Skills open format), which acts as a portable plugin for AI assistants. Instead of bloating the agent's context window, the skill provides a set of reference files that the agent can load on demand. It also includes a Python-based toolchain that wraps xctrace to allow AI agents to record and analyze Instruments traces to diagnose performance issues like hangs and hitches.

Who it’s for

  • Developers and teams using AI coding assistants (like Claude Code, Cursor, or ChatGPT) to build SwiftUI applications.
  • Engineers reviewing or refactoring SwiftUI views and data flow.
  • Developers needing to optimize the performance of lists, scrolling, and navigation in SwiftUI.

Highlights

  • Comprehensive SwiftUI Coverage: Includes guidance on @Observable, Swift Charts, macOS multi-window scenes, and the latest SDK 27 changes.
  • Automated Performance Analysis: Ships with a Python toolchain for agents to record and analyze .trace files, distinguishing between CPU-bound and blocked main-thread issues.
  • Broad Tool Compatibility: Compatible with Claude Code, Cursor, Codex, and other tools supporting the Agent Plugins spec.
  • On-Demand Reference: Uses a modular structure so agents only load the specific guidance needed for the current task.

Related

  • Project
  • Project
  • Project
  • Project
  • Project