swiftui-expert-skill
An agent skill by AvdLee, from AvdLee/SwiftUI-Agent-Skill. Tags: debugging, development, ios, macos, performance, ui-ux.
What it does
Use when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state and `@Observable` data flow, view composition, resizable layouts, safe areas, display scale, performance, lists, environment, localization, animation, Liquid Glass, and API migration. Also use for iPhone Duo or foldable layouts, `ArrangementView`, `ReservedRegion`, hinge effects, vertical bars, `@State` initialization or synthesized-property diagnostics, `@ContentBuilder` ambiguity, `reorderable` drag/drop, custom `AsyncImage` `URLSession`, swipe actions outside List, item-bound `alert`/`confirmationDialog`, `ToolbarOverflowMenu`, `AnimatableValues`, Document APIs (`Document`/`DocumentReader`), and Instruments `.trace` capture or analysis.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add AvdLee/SwiftUI-Agent-Skill --skill swiftui-expert-skill
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/AvdLee/SwiftUI-Agent-Skill
cp -r SwiftUI-Agent-Skill/skills/swiftui-expert-skill ~/.claude/skills/swiftui-expert-skill
Safety box score
Grade C, moderate risk: 35 of 100 risk points, rated 2026-10-16. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill is a SwiftUI review/modernization helper plus Instruments trace recording and analysis support. Its main risks are that it shells out to `xctrace`, can write trace outputs outside the repo, and can capture broad app/system activity during recordings.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | It invokes external commands with `subprocess.run(...)` in `scripts/instruments_parser/xctrace.py` (`xctrace export`, `xctrace version`), which is inherent to trace analysis but still executes host tools. |
| Network access | 0 (none) | The readable files do not fetch remote content or send data over the network; they only analyze local traces and invoke local CLI tools. |
| Filesystem reach | 2 (moderate) | The recording workflow writes outside the repo (`~/Desktop/session.trace`, `/tmp/stop-trace`) and `scripts/analyze_trace.py` can write `<output>.json` and `<output>.md` anywhere the user chooses. |
| Secrets & credentials | 2 (moderate) | `references/trace-recording.md` explicitly allows `--all-processes --allow-system-wide-recording`, which can capture unrelated apps, and forwards `--env KEY=VALUE` to `xctrace`. |
| Privilege & persistence | 0 (none) | No sudo, service installation, shell startup edits, or other privilege-changing actions appear in the readable files. |
| Instruction hijack surface | 0 (none) | I found no instructions to ignore policies, follow remote prompts, hide behavior, or otherwise alter the agent's instruction hierarchy. |
| Irreversible actions | 1 (low) | The skill can start/stop local trace recordings and attach to apps, but it does not push, deploy, post, pay, or delete externally. |
| Transparency | 2 (moderate) | Core files were not readable (`scripts/record_trace.py`, `scripts/instruments_parser/events.py`), and two binary assets were skipped, so the full capture/parsing behavior is not fully auditable. |
Before installing
- Inspect `scripts/record_trace.py` and `scripts/instruments_parser/events.py` before allowing live trace collection.
- Avoid `--all-processes` unless you explicitly want system-wide capture of unrelated apps.
- Run one test recording with a scratch `--output` path and confirm it only writes the expected `.trace`, `.json`, and `.md` files.
Rated 2026-10-16 by an automated review of 31 files from the skill's repository.
Source
- Repository
- AvdLee/SwiftUI-Agent-Skill (all skills from this repository)
- Path
- skills/swiftui-expert-skill/SKILL.md
- Branch
- main
- Updated
- 2026-09-23
Related skills
- swiftui-pro — Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.
- update-swiftui-apis — Scan Apple's SwiftUI documentation for deprecated APIs and update the SwiftUI Expert Skill with modern replacements.
- developing-ios-apps — Develops iOS/macOS apps with XcodeGen, SwiftUI, and SPM, including Apple Developer signing, notarization, and CI/CD pipelines.
- macos-cleaner — Diagnoses and safely reclaims macOS disk space.
- app-platform-troubleshooting — Debug running App Platform applications by accessing containers, analyzing logs, running diagnostics, and applying fixes.
- eas-observe — EAS service (paid). Use for anything related to EAS Observe - adding `expo-observe` to an Expo project (AppMetricsRoot/ObserveRoot HOC.