swiftui-performance-inspector

swiftui-performance-inspector is a skill for Claude Code, Codex from Xopoko/build-swift-apps. It costs 40 tokens per session (587 once invoked), scanned A, original, MIT.

A diagnostic guide for finding why a SwiftUI app renders slowly, updates too often, uses excessive CPU or memory, or becomes unresponsive. SwiftUI is Apple's framework for building app interfaces.

In plain words
What is it for?
Use it to inspect SwiftUI code, interpret profiling evidence from Apple's Instruments tools, and document likely causes, fixes, and validation steps.
Why use it?
It connects visible performance problems to likely causes in the code and identifies when runtime profiling evidence is needed.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the build-swift-apps plugin — 61 skills, 3 commands, 3 MCP servers shipped together

Good fit Use it to inspect SwiftUI code, interpret profiling evidence from Apple's Instruments tools, and document likely causes, fixes, and validation steps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xopoko/build-swift-apps/swiftui-performance-inspector
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Xopoko/build-swift-apps --skill swiftui-performance-inspector
Clone the repo
git clone --depth 1 https://github.com/Xopoko/build-swift-apps

Made for: Claude Code, Codex.

Or install build-swift-apps, the plugin that ships this one along with the rest of its 61 skills, 3 commands, 3 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swiftui-performance-inspector

README.md
[![agentmods](https://agentmods.dev/badge/skills/xopoko/build-swift-apps/swiftui-performance-inspector/github.svg)](https://agentmods.dev/skills/xopoko/build-swift-apps/swiftui-performance-inspector)
Your own site
<a href="https://agentmods.dev/skills/xopoko/build-swift-apps/swiftui-performance-inspector"><img src="https://agentmods.dev/badge/skills/xopoko/build-swift-apps/swiftui-performance-inspector/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for swiftui-performance-inspector

Your own site · 80×15
<a href="https://agentmods.dev/skills/xopoko/build-swift-apps/swiftui-performance-inspector"><img src="https://agentmods.dev/badge/skills/xopoko/build-swift-apps/swiftui-performance-inspector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 587 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.00587
Opus 5 $0.00020 $0.00293
Sonnet 5 $0.00008 $0.00117
Haiku 4.5 $0.00004 $0.00059

Measured 10d ago against content hash ad3ca601ee1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

swiftui-performance-inspector scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/swiftui-performance-inspector/SKILL.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SwiftUI Performance Inspector

Diagnose from code first, then request profiling evidence when code review cannot explain the symptom.

Workflow

  1. Classify the symptom: slow rendering, scrolling jank, high CPU, memory growth, hangs, broad updates, or layout thrash.
  2. If code is available, review with references/code-smells.md.
  3. If code is missing, ask for the smallest useful slice: target view, data flow, reproduction steps, device/simulator, build config, and deployment target.
  4. If runtime evidence is needed, use references/profiling-intake.md for the exact Instruments checklist.
  5. Report likely causes, evidence, fixes, and validation steps using references/report-template.md when useful.

Code Review Focus

  • invalidation storms from broad observation or environment reads
  • unstable identity in List/ForEach
  • heavy derived work in body or view builders
  • layout thrash from complex hierarchy, GeometryReader, or preferences
  • main-thread image decode/resize or other expensive work
  • animation and transition work applied too broadly

Profiling Evidence

Ask for SwiftUI timeline or Time Profiler export/screenshots, device/OS/build configuration, exact profiled interaction, and before/after metrics when comparing changes.

Map evidence to invalidation, identity churn, layout, main-thread work, image cost, animation cost, or hangs. Distinguish trace-backed findings from code-level suspicion and state what evidence would reduce uncertainty.

Fix Defaults

  • narrow state scope and observation fan-out
  • stabilize list identities
  • move heavy work out of body into model/service precomputation, memoized helpers, background preprocessing, or input-driven derived state
  • use @State only for view-owned state, not arbitrary caches
  • use equatable() only when equality is cheaper than recomputing and inputs are value-semantic
  • downsample images before rendering
  • reduce layout complexity or add stable sizing where appropriate

Output

Provide a short metrics table when available, top issues ordered by impact, proposed fixes with effort, and verification steps.

Read the full file on GitHub · 58 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 58 lines · 40 tokens per session scan A ad3ca601ee1f

Subscribe to this mod's changes

swiftui-performance-inspector is a skill published in the GitHub repository Xopoko/build-swift-apps (45 stars, last pushed 13d ago), licensed MIT. It adds 40 tokens to every session and 587 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

firebase-crashlytics

Use when implementing crash reporting, capturing fatal/non-fatal errors, recording isolate/async exceptions, customizing reports, or uploading obfuscated symbols.

evanca/flutter-ai-rules · 34 tokens

flutter-errors

Use when hitting layout errors (RenderFlex overflow, unbounded constraints, RenderBox not laid out), scroll errors, or setState-during-build errors.

evanca/flutter-ai-rules · 34 tokens

push-notification-tester

Test VoIP push notifications for Telnyx WebRTC iOS (APNs) and Android (FCM) apps. Use when debugging push notification delivery, validating certificate/credential setup, or testing that a device receives VoIP pushes correctly.

team-telnyx/ai · 55 tokens

mobile-emulator-start

Boot Android emulator + Metro (Expo / bare RN) in order: inspect IDE terminals, kill stale ports, pick an AVD. Use when "start Metro", "start emulator", "Cannot connect to Expo", or a stuck dev loop. QA on the running emulator → mobile-emulator-test.

kensaurus/cursor-kenji · 65 tokens

apple-cleanup

Exhaustive engineering hardening of an iOS app. Reviews for Swift 6 compliance, crash risks, App Store rejection risks, and tech debt; builds a surgical plan; dispatches parallel subagents to fix all P0-P2 issues; then pushes an alpha to TestFlight. Use for pre-submission cleanup and code hardening, not design polish.

markdavidgan/apple-dev-skills · 77 tokens

apple-polish

Design and keynote-readiness craftsmanship review of an iOS app. Evaluates through Jony Ive (visual obsession) and Steve Jobs (demo readiness) perspectives, presents prioritized findings, then orchestrates parallel agents to fix selected issues and push a TestFlight build. Use for design polish, not engineering bugs.

markdavidgan/apple-dev-skills · 65 tokens