ios-performance-profiler

ios-performance-profiler is a skill for Claude Code, Codex from Desquared/agents-rules-skills. It costs 56 tokens per session (1,468 once invoked), scanned A, original, MIT.

A code-review guide for finding likely performance problems in SwiftUI, Apple's framework for building app interfaces.

In plain words
What is it for?
It is for reviewing SwiftUI lists, animations, complex layouts, remote data handling, and other performance-sensitive code.
Why use it?
It helps identify slow view calculations, unnecessary screen redraws, unstable list items, concurrency issues, and memory problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for reviewing SwiftUI lists, animations, complex layouts, remote data handling, and other performance-sensitive code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/desquared/agents-rules-skills/ios-performance-profiler
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 Desquared/agents-rules-skills --skill ios-performance-profiler
Clone the repo
git clone --depth 1 https://github.com/Desquared/agents-rules-skills

Made for: Claude Code, Codex.

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 ios-performance-profiler

README.md
[![agentmods](https://agentmods.dev/badge/skills/desquared/agents-rules-skills/ios-performance-profiler.svg)](https://agentmods.dev/skills/desquared/agents-rules-skills/ios-performance-profiler)
Your own site
<a href="https://agentmods.dev/skills/desquared/agents-rules-skills/ios-performance-profiler"><img src="https://agentmods.dev/badge/skills/desquared/agents-rules-skills/ios-performance-profiler.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,468 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.
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.00056 $0.01468
Opus 5 $0.00028 $0.00734
Sonnet 5 $0.00011 $0.00294
Haiku 4.5 $0.00006 $0.00147

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

Security

Grade A, and why

ios-performance-profiler 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 7d 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/ios-performance-profiler/SKILL.md · 128 lines

How it starts

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

Performance Profiler

View Identity & Diffing

  • Stable, persistent identity (Identifiable with stable id, avoid random UUIDs in rows)
  • Prefer value types + structural identity over class reference identity when possible
  • Avoid .id() unless absolutely necessary (use stable keys instead)

Body Computation & Redraws

  • No heavy work (network, decoding, sorting, filtering) inside body
  • Expensive derived state computed once and stored (.onAppear, ViewModel, or memoized computed property)
  • @State, @Bindable, @Observable properties are narrowly scoped
  • Child views extracted when parent state changes frequently
  • Prefer @Observable (Observation framework) over @ObservableObject / @Published for new code — finer-grained invalidation, less boilerplate

Lists & Large Collections

  • Use List / LazyVStack / LazyHGrid instead of ScrollView + ForEach + VStack
  • Rows are lightweight; avoid @StateObject / @ObservedObject inside row bodies
  • Use stable Identifiable conformance or explicit id: key path

Concurrency & Main Actor (Swift 6 era)

  • @MainActor used appropriately on view-bound types (avoid overuse → thread hops)
  • Nonisolated properties / computed vars when safe
  • Actors used for model / service layers; avoid @MainActor on pure data models
  • No data races when using @Observable types across concurrency domains
  • Prefer .task over .onAppear for async work (automatic cancellation on view disappear, structured concurrency)

Environment & State Propagation

  • Avoid injecting large @Observable objects via @Environment when only a small slice of state is needed — extract a child view that reads only what it needs
  • Minimize over-subscription from EnvironmentObject — split into focused, smaller observable types if necessary

Memory & Retain Cycles

  • [weak self] in async / escaping closures that capture self
  • @StateObject for view-owned view models (not in List rows)
  • Remote images use proper caching (AsyncImage with cache, or Kingfisher / Nuke)
  • Downscale images to display size before rendering (.resizable() + .frame() alone doesn't reduce memory)
  • Use preparingThumbnail(of:) for large images
  • Avoid long-lived strong references in @Observable / @ObservableObject

Read the full file on GitHub · 128 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. 7d ago First seen · 128 lines · 56 tokens per session scan A 536ccd23c6db

Subscribe to this mod's changes

ios-performance-profiler is a skill published in the GitHub repository Desquared/agents-rules-skills (4 stars, last pushed 24d ago), licensed MIT. It adds 56 tokens to every session and 1,468 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

accessibility-cleanup

Finds common violations of the Android accessibility API in the Clank App Java code and attempts to address them (e.g. hardcoded state change announcements, missing events, focus moving, assertive live regions, etc).

chromium/chromium · 49 tokens

app-store-review

Evaluates code against Apple's App Store Review Guidelines. Use this skill when reviewing iOS, macOS, tvOS, watchOS, or visionOS app code (Swift, Objective-C, React Native, or Expo) to identify potential App Store rejection issues before submission. Triggers on tasks involving app review preparation, compliance…

jacklandrin/OnlySwitch · 76 tokens

swift-concurrency-pro

Reviews Swift code for concurrency correctness, modern API usage, and common async/await pitfalls. Use when reading, writing, or reviewing Swift concurrency code.

jacklandrin/OnlySwitch · 35 tokens

swiftui-pro

Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance. Use when reading, writing, or reviewing SwiftUI projects.

jacklandrin/OnlySwitch · 36 tokens

axiom-audit-camera

Use this agent to scan Swift code for camera, video, and audio capture issues including deprecated APIs, missing interruption handlers, threading violations, and permission anti-patterns.

CharlesWiltgen/Axiom · 39 tokens

mobile-platform-offline-validate

Review a Lightning Web Component for mobile offline compatibility — the Komaci offline static analyzer that pre-primes the data graph for Salesforce Mobile App Plus and Field Service Mobile App. Produces a finding list with code-level fixes covering inline GraphQL queries in @wire configurations, modern lwc:if /…

forcedotcom/sf-skills · 207 tokens