Agent skill

Swift Runtime Performance

by Livsy90 in 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…

MITAuto-check passedMobile

Install Swift Runtime Performance

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

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

GitHub CLI
$ gh skill install Livsy90/iOS-Performance-Agent-Skills swift-runtime-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/swift-runtime-performance .claude/skills/swift-runtime-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
swift-runtime-performance
GitHub stars
117
Token cost
~4.3k tokens
SKILL.md length
2,154 words
Files
11 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

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…

  • Works in 5 steps: whether the code is on a hot path; → what runtime cost is suspected; → whether the cost is visible in… → …
  • Reviewing Swift code for runtime-level performance costs
  • SKILL.md covers Purpose, When to use this skill, When not to use this skill and Neighbor skill boundaries, plus 11 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Swift Runtime Performance is an agent skill from Livsy90/iOS-Performance-Agent-Skills. Use this skill when reviewing Swift code for runtime-level performance costs, including heap allocation, ARC traffic, stack vs heap storage, closure capture contexts, method dispatch, protocol witness dispatch, existentials vs generics, opaque types, copy-on-write, SIL optimizer output, unsafe memory boundaries, or module-boundary optimizer visibility. Do not use it for Swift Concurrency scheduling, SwiftUI rendering, app launch, or profiling workflows unless the question is specifically about Swift runtime costs.

Its SKILL.md is about 4.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including reference files (for example `agents/openai.yaml`, `references/allocation-and-layout.md` and `references/arc-and-ownership.md`).

It sits in Mobile, covering iOS development. It works with SwiftUI and Swift. 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

  • Reviewing Swift code for runtime-level performance costs
  • Including heap allocation
  • Stack vs heap storage
  • Closure capture contexts

Example prompts

  • “/swift-runtime-performance”

Workflow steps

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

  1. whether the code is on a hot path;
  2. what runtime cost is suspected;
  3. whether the cost is visible in measurement, compiler output, or a small benchmark;
  4. whether the proposed change preserves semantics and improves the measured path;
  5. what trade-off the change introduces.

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

Swift Runtime Performance loads about 4.3k tokens when it runs, and up to ~55k if it reads all its reference files. Until then it costs about 136 tokens; SKILL.md has 2,154 words of instructions outside code blocks.

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

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). 2,154 words, ~4,264 tokens.

Download SKILL.mdSave it as .claude/skills/swift-runtime-performance/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
swift-runtime-performance
description
Use this skill when reviewing Swift code for runtime-level performance costs, including heap allocation, ARC traffic, stack vs heap storage, closure capture contexts, method dispatch, protocol witness dispatch, existentials vs generics, opaque types, copy-on-write, SIL optimizer output, unsafe memory boundaries, or module-boundary optimizer visibility. Do not use it for Swift Concurrency scheduling, SwiftUI rendering, app launch, or profiling workflows unless the question is specifically about Swift runtime costs.

Swift Runtime Performance

Purpose

Use this skill to review Swift code for runtime-level performance costs without turning every abstraction into a problem. Focus on concrete costs such as allocation, ARC traffic, dispatch, specialization, copying, optimizer visibility, and unsafe memory boundaries.

This skill should help the agent distinguish real hot-path runtime costs from theoretical micro-optimizations.

When to use this skill

Use this skill when the task involves Swift runtime behavior such as:

  • heap allocation, stack vs heap storage, object layout, boxed values, or closure contexts;
  • ARC retain/release traffic, ownership, lifetime, weak/unowned references, or closure captures;
  • direct dispatch, class dispatch, Objective-C dispatch, witness dispatch, or dynamic dispatch in hot paths;
  • any Protocol, some Protocol, generics, type erasure, specialization, or unspecialized hot code;
  • copy-on-write collections, large values, custom COW storage, or repeated copies;
  • optimized SIL inspection, compiler optimization, inlining, devirtualization, or specialization evidence;
  • unsafe Swift, pointer lifetime, memory binding, aliasing, buffer mutation, or safe wrappers around unsafe regions;
  • module boundaries that affect optimizer visibility, @inlinable, @usableFromInline, @frozen, or public API resilience trade-offs.

When not to use this skill

Do not use this skill for:

  • general Swift syntax or API usage questions with no runtime performance concern;
  • app launch investigations where the main issue is pre-main, dyld, static initializers, SDK startup, first frame, or first interaction;
  • SwiftUI performance issues where the main issue is identity, invalidation, state scope, layout, drawing, animation, or scrolling;
  • Swift Concurrency issues where the main issue is task lifetime, actor isolation, MainActor responsiveness, cancellation, AsyncSequence cleanup, reentrancy, or executor behavior;
  • profiling workflow questions where the main task is choosing tools, interpreting traces, designing signposts, XCTest metrics, MetricKit, or production signals;
  • broad architecture questions unless there is a specific runtime cost in a hot path.

If another skill is more specific, route there first and use this skill only for the runtime subproblem.

Neighbor skill boundaries

Use these boundaries before applying runtime advice:

  • Use swift-concurrency-performance when the task centers on actors, tasks, MainActor, cancellation, AsyncSequence, continuations, task groups, executor behavior, or responsiveness under async work.
  • Use ios-launch-performance when the task centers on cold launch, warm launch, pre-main, dyld, framework loading, static initializers, AppDelegate, SwiftUI App, first frame, first interaction, or launch metrics.
  • Use swiftui-performance when the task centers on SwiftUI body evaluation, invalidation, identity, state ownership, dependency scope, List, LazyVStack, layout, drawing, animation, or lifecycle work in views.
  • Use ios-performance-profiling when the task centers on choosing Instruments templates, interpreting traces, XCTest metrics, MetricKit, signposts, memory graphs, hangs, hitches, CPU, allocations, disk I/O, networking, or production telemetry.
  • Use this skill when a neighboring task reveals a Swift runtime-level cost such as allocation churn, ARC traffic, existential boxing, witness dispatch, unspecialized generics, repeated COW copies, or unsafe memory boundaries.

Core principle

Do not optimize based only on how the source code looks.

First identify:

  1. whether the code is on a hot path;
  2. what runtime cost is suspected;
  3. whether the cost is visible in measurement, compiler output, or a small benchmark;
  4. whether the proposed change preserves semantics and improves the measured path;
  5. what trade-off the change introduces.

A runtime optimization is useful only when it reduces cost in a path that matters.

Runtime cost taxonomy

Classify the suspected issue before recommending a change.

Use these categories:

  • Allocation — heap objects, boxes, closure contexts, existential containers, temporary objects, intermediate collections.
  • ARC — retain/release traffic, closure captures, weak/unowned access, bridged object lifetime, reference-backed value storage.
  • Dispatch — dynamic dispatch, witness dispatch, Objective-C dispatch, closure calls, missed devirtualization.
  • Existentials and generics — any, some, type erasure, generic specialization, unspecialized hot paths, boxing.
  • Copying — COW storage, large values, repeated collection mutation, defensive copies, bridging copies.
  • Compiler optimization — inlining, specialization, devirtualization, module visibility, resilience boundaries, optimized SIL output.
  • Unsafe boundary — pointer lifetime, binding, alignment, aliasing, mutation, escaping buffers, safe wrappers.
  • Module boundary — public API visibility, @inlinable, @usableFromInline, @frozen, ABI resilience, optimizer visibility.

Core workflow

  1. Locate the user-visible symptom. Identify whether the concern is latency, scrolling, repeated work, memory growth, CPU use, binary size, launch impact, or theoretical code review risk.
  2. Confirm the hot path. Ask whether the code runs frequently, touches many elements, blocks interaction, runs during startup, or appears in measurements.
  3. Classify the suspected cost. Use the runtime cost taxonomy instead of saying the code is vaguely “slow.”
  4. Look for evidence. Prefer Instruments, Allocations, Time Profiler, optimized SIL, benchmark output, XCTest performance tests, or production signals.
  5. Separate semantics from mechanics. Do not remove an abstraction only because it has a possible cost. Check what design purpose it serves.
  6. Propose the smallest safe change. Prefer local changes that reduce allocation, ARC traffic, dispatch, copying, or missed specialization without damaging API clarity.
  7. Explain trade-offs. Mention readability, API flexibility, testability, binary size, ABI stability, build time, or maintenance cost.
  8. Validate the result. Do not call the optimization successful without a before/after validation path.

Decision rules

If the code is not on a hot path

Avoid low-level rewrites.

Explain that the concern may be theoretically valid but unlikely to matter without evidence. Suggest measurement only if the path is suspected to affect user-visible performance.

If the issue is allocation

Check whether allocation comes from:

  • class instances;
  • closure contexts;
  • boxed variables;
  • existential storage;
  • type erasure wrappers;
  • intermediate arrays, dictionaries, sets, strings, or data buffers;
  • bridging between Swift and Objective-C/Foundation types.

Prefer reducing repeated allocation over replacing every reference type.

If the issue is ARC

Check ownership and lifetime before recommending changes.

Look for repeated retain/release traffic in loops, closure captures of large owners, unnecessary weak access in hot paths, and reference-backed value storage. Do not treat weak and unowned as performance fixes. They are ownership tools first.

If the issue is dispatch

Ask whether dynamic dispatch is intentional.

Prefer final for app-level classes that are not designed for inheritance. Use generics, concrete types, or internal implementation details only when they preserve the intended abstraction and matter in the measured path.

Do not flatten useful polymorphism without evidence.

If the issue is any Protocol

Ask whether runtime heterogeneity is required.

any Protocol is not automatically wrong. It is appropriate when values of different concrete types must be stored or passed uniformly. Consider generics or opaque types when the hot path can remain statically typed.

If the issue is generics

Check whether specialization actually happens.

Generics help most when the optimizer can see enough implementation detail to specialize the hot path. Module boundaries, public resilience, large functions, or type erasure can limit that.

If the issue is copy-on-write

Check mutation patterns and uniqueness boundaries.

Repeated mutation of COW values can be cheap when storage is uniquely referenced and expensive when it repeatedly copies. Custom COW must preserve value semantics and document thread-safety assumptions.

If the issue is SIL or compiler output

Use optimized SIL, not Debug SIL, for performance conclusions.

Look for evidence such as allocation instructions, retain/release traffic, witness dispatch, existential opening, closure creation, missed specialization, and missed devirtualization. Treat SIL as evidence, not as an excuse to overfit source code to one compiler version.

If the issue is unsafe Swift

Do not recommend unsafe code as a first step.

Use unsafe APIs only when safe APIs cannot express the operation efficiently enough, measurement shows the abstraction cost matters, and the unsafe region can be kept small behind a safe wrapper.

If the issue is module boundaries

Separate runtime optimization from architecture and build-time concerns.

Use @inlinable, @usableFromInline, and @frozen only when the API commitment is acceptable. These attributes are not generic “make it faster” switches.

Show full SKILL.md (913 more words)Show less

Common gotchas

  • struct does not guarantee stack allocation.
  • class does not automatically mean a performance bug.
  • Value semantics can still involve heap storage and ARC.
  • Array, String, Dictionary, Set, and Data can hide reference-backed storage.
  • any Protocol is a useful abstraction with runtime cost, not a mistake.
  • some Protocol is not a universal replacement for any Protocol.
  • Generics help most when specialization happens.
  • final is a good default for app-level classes that are not designed for inheritance, but it should not be oversold as a standalone performance fix.
  • @inline(__always) can increase code size and should not be the first fix.
  • @inlinable is an API and ABI commitment.
  • weak and unowned are ownership tools, not performance tools.
  • Debug-build behavior is not reliable evidence for optimized runtime performance.
  • Unsafe code can be slower, less optimizable, or incorrect if used casually.
  • Do not replace readable architecture with low-level code unless the measured path justifies it.

Reference routing

Read references selectively. Do not load all reference files by default.

  • references/allocation-and-layout.md — read when the task involves stack vs heap behavior, object layout, closure boxes, existential storage, temporary allocations, or hidden heap storage inside value types.
  • references/arc-and-ownership.md — read when the task involves retain/release traffic, closure captures, weak/unowned references, object lifetime, reference cycles, COW ownership, or bridging lifetime.
  • references/dispatch-and-specialization.md — read when the task involves direct dispatch, class dispatch, Objective-C dispatch, witness dispatch, closure dispatch, devirtualization, inlining, or generic specialization.
  • references/existentials-generics-opaque-types.md — read when the task involves any Protocol, some Protocol, generics, type erasure, protocol witness dispatch, opaque result types, or replacing existential-heavy hot paths.
  • references/cow-and-large-values.md — read when the task involves copy-on-write collections, large structs, repeated collection mutation, custom COW storage, uniqueness checks, or value-semantic API design.
  • references/sil-inspection.md — read when source-level reasoning is not enough and the task needs optimized SIL evidence for allocation, ARC, dispatch, existential opening, closure creation, specialization, or inlining.
  • references/unsafe-swift.md — read when the task involves unsafe pointers, buffer access, memory binding, alignment, aliasing, manual lifetime, unsafe wrappers, or replacing safe APIs with unsafe code.
  • references/modularization-and-linking.md — read when the task involves module-boundary optimizer visibility, public API resilience, @inlinable, @usableFromInline, @frozen, static vs dynamic libraries, or runtime trade-offs from modularization.
  • references/concurrency-runtime.md — read only when a concurrency-related question is specifically about Swift runtime costs such as allocation, ARC, closure captures, SIL lowering, or executor-related overhead. For actor design, MainActor responsiveness, cancellation, AsyncSequence cleanup, continuations, or structured concurrency workflow, use swift-concurrency-performance instead.

Evidence and validation

Prefer evidence appropriate to the suspected cost:

  • Use Allocations when the concern is object churn, boxes, closure contexts, existential storage, or temporary collections.
  • Use Time Profiler when the concern is CPU cost, dispatch overhead, copying, bridging, or hot function calls.
  • Use optimized SIL when the concern is compiler optimization, specialization, devirtualization, ARC insertion, existential opening, closure allocation, or inlining.
  • Use small benchmarks when isolating a tight loop, collection operation, dispatch pattern, or generic/existential comparison.
  • Use XCTest performance tests when the operation can be reproduced deterministically.
  • Use before/after traces when the performance claim affects a real user path.

Do not validate with Debug builds unless the task is specifically about Debug-only development performance.

Output expectations

When reviewing code, respond with:

  1. Summary — state whether the concern is likely real, theoretical, or impossible to judge from the provided code.
  2. Suspected runtime cost — classify the issue as allocation, ARC, dispatch, existential/generic, copying, compiler optimization, unsafe boundary, or module-boundary cost.
  3. Hot-path assessment — explain whether this code likely matters for user-visible performance.
  4. Evidence to check — name the measurement, SIL output, benchmark, or trace that would confirm the hypothesis.
  5. Finding — explain the concrete source pattern and why it may produce runtime work.
  6. Recommended change — propose the smallest safe change. Include code only when it clarifies the recommendation.
  7. Trade-offs — mention readability, abstraction, API flexibility, binary size, ABI stability, build time, or maintainability.
  8. Validation — explain how to confirm the result with before/after evidence.

Response style

Be precise and restrained.

Prefer:

  • “This may allocate because the closure escapes and captures self.”
  • “This existential is probably fine unless this loop is hot or allocation shows up in Instruments.”
  • “Use optimized SIL to check whether the generic function specializes across this module boundary.”
  • “A concrete enum may help here if the set of cases is closed and this path is measured as hot.”

Avoid:

  • “Structs are always faster.”
  • “Classes are slow.”
  • “Protocols are bad for performance.”
  • “Always replace any with generics.”
  • “Use unsafe pointers for speed.”
  • “Add @inline(__always).”
  • “Mark everything final for performance.”

Positive trigger examples

This skill should activate for prompts like:

  • “Review this Swift hot path for ARC and allocation overhead.”
  • “This feed stores any FeedItem values. Could that cause runtime cost?”
  • “Should this protocol-heavy code use generics instead?”
  • “Can this custom COW type accidentally copy too much?”
  • “Can you inspect this optimized SIL and explain the retains and allocations?”
  • “Is @inlinable justified for this small generic function used across module boundaries?”
  • “This closure-heavy parser allocates a lot. What should I check?”
  • “Is this unsafe buffer optimization justified?”

Negative trigger examples

This skill should not activate for prompts like:

  • “My SwiftUI list stutters when rows update.”
  • “The app takes too long to show the first screen after cold launch.”
  • “How should I structure cancellation in this task group?”
  • “Which Instruments template should I use to diagnose hangs?”
  • “How do I create a Swift protocol?”
  • “How do I make this SwiftUI screen look better?”
  • “Should I move this SDK initialization out of AppDelegate?”

Route those tasks to the more specific skill unless the user explicitly asks about Swift runtime-level cost.

© 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 10 other files (references) in swift-runtime-performance of Livsy90/iOS-Performance-Agent-Skills.

  • SKILL.md
  • agents/openai.yaml
  • references/allocation-and-layout.md
  • references/arc-and-ownership.md
  • references/concurrency-runtime.md
  • references/cow-and-large-values.md
  • references/dispatch-and-specialization.md
  • references/existentials-generics-opaque-types.md
  • references/modularization-and-linking.md
  • references/sil-inspection.md
  • references/unsafe-swift.md

Open the folder on GitHubat commit c259885

Compare with similar skills

Swift Runtime 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.

Swift Runtime Performance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Swift Runtime Performance this skillLivsy90/iOS-Performance-Agent-Skills117—~4.3kAutomated safety check: PassMIT
Swiftui Expert SkillAFK-surf/OpenBridge4302 repos~3.9kAutomated safety check: PassMIT
macOS DevelopmentKartikLabhshetwar/better-shot2.4k2 repos~735Automated safety check: PassCustom licence
Implement Featuretddworks/SkillsManager169—~2.6kAutomated safety check: PassNone
Swiftui AnimationAstraFoundry/KumoApp290—~4.1kAutomated safety check: PassAGPL-3.0
Implement Featuretddworks/ClaudeBar1.5k—~4.1kAutomated safety check: PassApache-2.0

Similar skills

  • Swiftui Expert Skill

    AFK-surf/OpenBridge

    Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, modern APIs, Swift concurrency, and iOS 26+ Liquid Glass adoption.

    430 GitHub starsUsed in 2 repos~3.9k tokens
    MobileAuto-check passed
  • macOS Development

    KartikLabhshetwar/better-shot

    Comprehensive macOS development guidance including Swift 6+, SwiftUI, SwiftData, architecture patterns, AppKit bridging, and macOS 26 Tahoe APIs.

    2.4k GitHub starsUsed in 2 repos~735 tokens
    MobileAuto-check passed
  • Implement Feature

    tddworks/SkillsManager

    Guide for implementing features following architecture-first design, TDD, rich domain models, and Swift 6.2 patterns.

    169 GitHub stars~2.6k tokensUpdated 4 mo ago
    MobileAuto-check passed
  • Swiftui Animation

    AstraFoundry/KumoApp

    Implement, review, or improve SwiftUI animations and transitions.

    290 GitHub stars~4.1k tokensUpdated 4 mo ago
    MobileAuto-check passed
  • Implement Feature

    tddworks/ClaudeBar

    Guide for implementing features in ClaudeBar following architecture-first design, TDD, rich domain models, and Swift 6.2 patterns.

    1.5k GitHub stars~4.1k tokensUpdated yesterday
    MobileAuto-check passed
  • Snapshot Tests

    microsoft/SwiftStreamingMarkdown

    Official

    Record and validate swift-snapshot-testing snapshots in the SwiftStreamingMarkdown package: regenerate reference PNGs, run snapshot tests, and diff failed snapshots.

    378 GitHub stars~2.2k tokensUpdated 14 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 2 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 2 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 2 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 2 mo ago
    Auto-check passed
  • Swiftui Performance

    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…

    117 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Swift Runtime Performance

What does Swift Runtime Performance do?

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…. Swift Runtime Performance is an agent skill from Livsy90/iOS-Performance-Agent-Skills. Use this skill when reviewing Swift code for runtime-level performance costs, including heap allocation, ARC traffic, stack vs heap storage, closure capture contexts, method dispatch, protocol witness dispatch, existentials vs generics, opaque types, copy-on-write, SIL optimizer output, unsafe memory boundaries, or module-boundary optimizer visibility.

When should I use Swift Runtime Performance?

Swift Runtime Performance fits situations like: reviewing Swift code for runtime-level performance costs; including heap allocation; stack vs heap storage; closure capture contexts.

How do I install Swift Runtime Performance in Claude Code?

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

How do I install Swift Runtime Performance in Codex?

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

Can I use Swift Runtime 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 swift-runtime-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/swift-runtime-performance, .gemini/skills/swift-runtime-performance, .github/skills/swift-runtime-performance and .opencode/skills/swift-runtime-performance in your project.

What does Swift Runtime Performance need to run?

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

Does Swift Runtime 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 Swift Runtime 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 Swift Runtime Performance use?

Swift Runtime 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 Swift Runtime Performance use?

About 4.3k tokens (SKILL.md is roughly 17k 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 51k tokens, read only when the agent opens those files.

What are the alternatives to Swift Runtime Performance?

Skills that share tags, products or a category with Swift Runtime Performance: Swiftui Expert Skill (AFK-surf/OpenBridge, 430 stars), macOS Development (KartikLabhshetwar/better-shot, 2.4k stars), Implement Feature (tddworks/SkillsManager, 169 stars) and Swiftui Animation (AstraFoundry/KumoApp, 290 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Swift Runtime 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.