Agent skill

Swiftui Performance

by Livsy90 in Livsy90/iOS-Performance-Agent-Skills

A skill your agent uses when reviewing or fixing SwiftUI performance issues, including unnecessary invalidation, unstable identity, broad state dependencies, expensive body work, heavy rows…

MITAuto-check passedMobile

Install Swiftui Performance

skills CLI
$ npx skills add Livsy90/iOS-Performance-Agent-Skills --skill swiftui-performance -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Livsy90/iOS-Performance-Agent-Skills swiftui-performance --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Livsy90/iOS-Performance-Agent-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/swiftui-performance .claude/skills/swiftui-performance && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
swiftui-performance
GitHub stars
117
Token cost
~1.6k tokens
SKILL.md length
763 words
Files
10 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when reviewing or fixing SwiftUI performance issues, including unnecessary invalidation, unstable identity, broad state dependencies, expensive body work, heavy rows…

  • Works in 3 steps: What changed? → Which views depend on that change? → How much UI work happens because of it?
  • Fixing SwiftUI performance issues
  • SKILL.md covers Purpose, Scope, Core Model and Review Workflow, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Swiftui Performance is an agent skill from Livsy90/iOS-Performance-Agent-Skills. Use this skill when reviewing or fixing SwiftUI performance issues, including unnecessary invalidation, unstable identity, broad state dependencies, expensive body work, heavy rows, scrolling hitches, layout/drawing cost, or async lifecycle work. Do not use it for general SwiftUI syntax, styling, UIKit-only performance, or generic profiling unless SwiftUI update behavior is central.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files (for example `agents/openai.yaml`, `references/async-lifecycle-and-mainactor.md` and `references/body-cost-and-render-models.md`).

It sits in Mobile, covering iOS development. It works with SwiftUI. The repository describes itself as: A collection of AI-agent skills for reviewing, diagnosing, and improving performance in iOS applications. The licence is MIT.

When your agent uses it

  • Fixing SwiftUI performance issues
  • Including unnecessary invalidation
  • Unstable identity
  • Broad state dependencies

Example prompts

  • “/swiftui-performance”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. What changed?
  2. Which views depend on that change?
  3. How much UI work happens because of it?

What it can do on your machine

Read from SKILL.md and the folder at commit c259885. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Swiftui Performance loads about 1.6k tokens when it runs, and up to ~40k if it reads all its reference files. Until then it costs about 101 tokens; SKILL.md has 763 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~101
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~40k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Livsy90/iOS-Performance-Agent-Skills at commit c259885, republished under its MIT licence (© Livsy90). 763 words, ~1,562 tokens.

Download SKILL.mdSave it as .claude/skills/swiftui-performance/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
swiftui-performance
description
Use this skill when reviewing or fixing SwiftUI performance issues, including unnecessary invalidation, unstable identity, broad state dependencies, expensive body work, heavy rows, scrolling hitches, layout/drawing cost, or async lifecycle work. Do not use it for general SwiftUI syntax, styling, UIKit-only performance, or generic profiling unless SwiftUI update behavior is central.

SwiftUI Performance

Purpose

Use this skill to review and refactor SwiftUI code with a performance-first mental model focused on change locality.

SwiftUI performance work should explain which change invalidates which part of the UI, why that work matters, and how to keep updates local.

Scope

Use this skill for:

  • SwiftUI screen, list, row, layout, drawing, animation, and lifecycle reviews
  • targeted refactors that reduce unnecessary updates or rendering work
  • profiling plans only when they validate a SwiftUI performance hypothesis

Do not use this skill for:

  • UIKit-only performance problems
  • app launch performance unless the issue is inside SwiftUI root view or scene construction
  • networking, backend latency, database performance, or caching unless they affect SwiftUI updates
  • generic Instruments walkthroughs without a SwiftUI code path
  • broad architecture rewrites without a concrete SwiftUI performance risk

Core Model

Answer three questions first:

  1. What changed?
  2. Which views depend on that change?
  3. How much UI work happens because of it?

Then inspect:

  • Identity: does SwiftUI preserve the same logical view across updates?
  • Lifetime: is state owned by the smallest stable component that needs it?
  • Dependencies: does each view read only the data it needs to render?
  • Rendering: is body cheap, predictable, and free from heavy transformation work?
  • Lifecycle: is async work tied to .task, .onAppear, or explicit actions rather than started from body?

A SwiftUI view is a value description of UI. Do not treat it as a long-lived UIKit-style object.

Review Workflow

Inspect the smallest relevant code path before suggesting broad changes.

Check in this order:

  1. Stable and intentional identity.
  2. Expensive work in body.
  3. Broad state or model reads.
  4. State ownership and lifetime.
  5. List, row, and pagination structure.
  6. Closure-heavy inputs, custom bindings, and unnecessary type erasure.
  7. Layout, drawing, and animation cost in repeated content.
  8. Async lifecycle, cancellation, and main-actor work.
  9. Profiling or debug probes when confirmation is useful.

Prefer targeted refactors over architectural rewrites.

Evidence Rule

Always separate:

  • static code review findings
  • likely risks
  • hypotheses
  • measured results
  • user-provided evidence
  • tool-generated evidence

Never invent timing numbers or claim profiling results unless the user provided evidence or a profiling command was actually run.

Prefer:

This parent view reads the whole model, so changes to that model can invalidate a large part of the screen.

Avoid:

This costs 500 ms.

Common Red Flags

Flag these patterns when they appear on an update or scrolling path:

  • unstable IDs such as .id(UUID()) or var id: UUID { UUID() }
  • index-based identity for mutable collections
  • sorting, filtering, grouping, formatting, parsing, decoding, or database reads inside body
  • filtering inside ForEach instead of preparing visible rows first
  • passing one giant model into every child view
  • broad computed properties that hide many state reads
  • AnyView in large repeated collections
  • custom Binding(get:set:) when a key-path binding would work
  • many stored non-visual closures in row views
  • GeometryReader, preferences, heavy shadows, masks, blurs, or overlays in every row
  • async work started directly from body
  • unguarded .onAppear pagination triggers inside rows
Show full SKILL.md (272 more words)Show less

Refactor Guidelines

Use the smallest fix that addresses the cause:

  • keep identity stable
  • move expensive transformations out of body
  • prepare render-ready models outside repeated rendering paths
  • move state closer to the component that owns it
  • split large views into dependency-focused subviews
  • simplify row inputs and repeated structure
  • prefer key-path bindings over custom closure bindings when no transformation is needed
  • use .equatable() only when visual equality is clear and cheaper than recomputing
  • use .task(id:) when work is tied to a changing input and should cancel/restart automatically
  • consider UIKit only for genuinely hot paths that need lower-level control

Do not use .equatable(), memoization, or caching as blanket fixes. Explain the invalidation or rendering issue first.

Reference Routing

Read references only when the task needs more detail:

  • references/identity-and-state.md — identity, .id, ForEach, @State, @StateObject, @ObservedObject, owned observable models
  • references/observation-and-dependencies.md — Observation, ObservableObject, broad dependencies, environment reads
  • references/body-cost-and-render-models.md — sorting, filtering, formatting, derived data, render models
  • references/lists-pagination-and-rows.md — List, ScrollView, LazyVStack, rows, pagination, scrolling
  • references/closures-bindings-and-equatable.md — closures, bindings, .equatable(), action handlers
  • references/layout-drawing-and-animation.md — layout, drawing, modifiers, animation hitches
  • references/async-lifecycle-and-mainactor.md — .task, .onAppear, cancellation, MainActor
  • references/profiling-validation.md — Instruments, xctrace, signposts, XCTest, MetricKit

Response Format

For code reviews, answer with:

  1. Main issue
  2. Why it matters in SwiftUI
  3. Risk level
  4. Suggested refactor
  5. Code example when useful
  6. What to measure if confirmation is needed

For profiling requests, answer with:

  1. Scenario
  2. Hypothesis
  3. Tool or probe
  4. What to look for
  5. How to compare before and after

Keep the answer concrete. Do not say “SwiftUI is slow.” Explain the specific identity, dependency, rendering, layout, drawing, animation, or lifecycle issue.

Final Principle

SwiftUI performance improves when code makes change locality obvious.

© Livsy90, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (references) in swiftui-performance of Livsy90/iOS-Performance-Agent-Skills.

  • SKILL.md
  • agents/openai.yaml
  • references/async-lifecycle-and-mainactor.md
  • references/body-cost-and-render-models.md
  • references/closures-bindings-and-equatable.md
  • references/identity-and-state.md
  • references/layout-drawing-and-animation.md
  • references/lists-pagination-and-rows.md
  • references/observation-and-dependencies.md
  • references/profiling-validation.md

Open the folder on GitHubat commit c259885

Compare with similar skills

Swiftui Performance next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Swiftui Performance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Swiftui Performance this skillLivsy90/iOS-Performance-Agent-Skills117—~1.6kAutomated safety check: PassMIT
Swiftui Protwostraws/SwiftUI-Agent-Skill5.6k2 repos~1.5kAutomated safety check: PassMIT
Swiftui UI PatternsAFK-surf/OpenBridge4304 repos~887Automated safety check: PassMIT
Swiftui Performance Auditharperreed/dotfiles3348 repos~1.4kAutomated safety check: PassNone
Hig Project Contextraintree-technology/hig-doctor1435 repos~1.2kAutomated safety check: PassMIT
Hig Components Contentraintree-technology/hig-doctor1435 repos~1.3kAutomated safety check: PassMIT

Similar skills

  • Swiftui Pro

    twostraws/SwiftUI-Agent-Skill

    Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.

    5.6k GitHub starsUsed in 2 repos~1.5k tokens
    MobileAuto-check passed
  • Swiftui UI Patterns

    AFK-surf/OpenBridge

    Best practices and example-driven guidance for building SwiftUI views and components.

    430 GitHub starsUsed in 4 repos~887 tokens
    MobileAuto-check passed
  • Swiftui Performance Audit

    harperreed/dotfiles

    Audit and improve SwiftUI runtime performance from code review and architecture.

    334 GitHub starsUsed in 8 repos~1.4k tokens
    MobileAuto-check passed
  • Hig Project Context

    raintree-technology/hig-doctor

    Create or update a shared Apple design context document that other HIG skills use to tailor guidance.

    143 GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed
  • Hig Components Content

    raintree-technology/hig-doctor

    Apple Human Interface Guidelines for content display components.

    143 GitHub starsUsed in 5 repos~1.3k tokens
    MobileAuto-check passed
  • Chunui

    liseami/ChunUI

    Build iOS apps with the ChunUI design system (Monochrome texture extracted from the production app Zinner/Chat0IM).

    533 GitHub stars~642 tokensUpdated 16 days ago
    MobileAuto-check passed

More from Livsy90/iOS-Performance-Agent-Skills

  • iOS Perceived Performance

    Livsy90/iOS-Performance-Agent-Skills

    A skill your agent uses for product-level iOS responsiveness and loading/feedback flows, including perceived latency, time to first feedback, progressive rendering, loading states, skeletons…

    117 GitHub stars~2.7k tokensUpdated 3 mo ago
    Auto-check passed
  • iOS Performance Profiling

    Livsy90/iOS-Performance-Agent-Skills

    A skill your agent uses when choosing, running, or interpreting iOS performance profiling workflows, including Instruments traces, signposts, XCTest metrics, MetricKit, Xcode Organizer, hangs…

    117 GitHub stars~3.3k tokensUpdated 3 mo ago
    Auto-check passed
  • Swift Runtime Performance

    Livsy90/iOS-Performance-Agent-Skills

    A skill your agent uses when reviewing Swift code for runtime-level performance costs, including heap allocation, ARC traffic, stack vs heap storage, closure capture contexts, method dispatch…

    117 GitHub stars~4.3k tokensUpdated 3 mo ago
    Auto-check passed
  • iOS Launch Performance

    Livsy90/iOS-Performance-Agent-Skills

    A skill your agent uses when diagnosing iOS app launch performance, startup regressions, first-frame readiness, or early responsiveness.

    117 GitHub stars~4k tokensUpdated 3 mo ago
    Auto-check passed
  • Swift Concurrency Performance

    Livsy90/iOS-Performance-Agent-Skills

    A skill your agent uses when reviewing Swift Concurrency performance and responsiveness, including task explosions, actor hopping, MainActor bottlenecks, cancellation, AsyncSequence cleanup…

    117 GitHub stars~2.9k tokensUpdated 3 mo ago
    Auto-check passed

Works with

Categories

Questions about Swiftui Performance

What does Swiftui Performance do?

A skill your agent uses when reviewing or fixing SwiftUI performance issues, including unnecessary invalidation, unstable identity, broad state dependencies, expensive body work, heavy rows…. Swiftui Performance is an agent skill from Livsy90/iOS-Performance-Agent-Skills. Use this skill when reviewing or fixing SwiftUI performance issues, including unnecessary invalidation, unstable identity, broad state dependencies, expensive body work, heavy rows, scrolling hitches, layout/drawing cost, or async lifecycle work.

When should I use Swiftui Performance?

Swiftui Performance fits situations like: fixing SwiftUI performance issues; including unnecessary invalidation; unstable identity; broad state dependencies.

How do I install Swiftui Performance in Claude Code?

Run `npx skills add Livsy90/iOS-Performance-Agent-Skills --skill swiftui-performance -a claude-code`. Or copy the skill folder (swiftui-performance in Livsy90/iOS-Performance-Agent-Skills) into .claude/skills/swiftui-performance in your project. Claude Code loads it when a task matches its description.

How do I install Swiftui Performance in Codex?

Run `npx skills add Livsy90/iOS-Performance-Agent-Skills --skill swiftui-performance -a codex`. Or copy the skill folder (swiftui-performance in Livsy90/iOS-Performance-Agent-Skills) into .agents/skills/swiftui-performance in your project. Codex loads it when a task matches its description.

Can I use Swiftui Performance in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Livsy90/iOS-Performance-Agent-Skills --skill swiftui-performance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swiftui-performance, .gemini/skills/swiftui-performance, .github/skills/swiftui-performance and .opencode/skills/swiftui-performance in your project.

What does Swiftui Performance need to run?

SKILL.md names no scripts, command-line tools or credentials: Swiftui Performance is instructions for the agent only.

Does Swiftui Performance access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Swiftui Performance safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Swiftui Performance use?

Swiftui Performance is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Swiftui Performance use?

About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 38k tokens, read only when the agent opens those files.

What are the alternatives to Swiftui Performance?

Skills that share tags, products or a category with Swiftui Performance: Swiftui Pro (twostraws/SwiftUI-Agent-Skill, 5.6k stars), Swiftui UI Patterns (AFK-surf/OpenBridge, 430 stars), Swiftui Performance Audit (harperreed/dotfiles, 334 stars) and Hig Project Context (raintree-technology/hig-doctor, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Swiftui Performance?

Livsy90 (a GitHub user) maintains it in Livsy90/iOS-Performance-Agent-Skills, which has 117 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on July 12, 2026.

Source: Livsy90/iOS-Performance-Agent-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.