performance-profiling

performance-profiling is a skill for Claude Code from rshankras/claude-code-apple-skills. It costs 36 tokens per session (2,826 once invoked), scanned A, original, MIT.

A performance investigation guide for Apple-platform apps using Instruments, Xcode diagnostics, and MetricKit.

In plain words
What is it for?
It helps measure CPU usage, memory leaks, launch time, dropped frames, energy use, and custom performance markers.
Why use it?
It helps find the specific code or system condition behind hangs, stutters, memory problems, slow launches, and battery drain.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the apple-skills plugin — 147 skills shipped together , and of apple-skills

Good fit It helps measure CPU usage, memory leaks, launch time, dropped frames, energy…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rshankras/claude-code-apple-skills/profiling
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 rshankras/claude-code-apple-skills --skill profiling
Clone the repo
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills

Made for: Claude Code.

Or install apple-skills, the plugin that ships this one along with the rest of its 147 skills.

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 performance-profiling

README.md
[![agentmods](https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/profiling.svg)](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/profiling)
Your own site
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/profiling"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/profiling.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,826 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.00036 $0.02826
Opus 5 $0.00018 $0.01413
Sonnet 5 $0.00007 $0.00565
Haiku 4.5 $0.00004 $0.00283

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

Security

Grade A, and why

performance-profiling 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 3d 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/performance/profiling/SKILL.md · 240 lines

How it starts

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

Performance Profiling

Systematic guide for profiling Apple platform apps using Instruments, Xcode diagnostics, and MetricKit. Covers CPU, memory, launch time, and energy analysis with actionable fix patterns.

When This Skill Activates

Use this skill when the user:

  • Reports app hangs, stutters, or dropped frames
  • Needs to profile CPU usage or find hot code paths
  • Has memory leaks, high memory usage, or OOM crashes
  • Wants to optimize app launch time
  • Needs to reduce battery/energy impact
  • Asks about Instruments, Time Profiler, Allocations, or Leaks
  • Wants to add os_signpost or performance measurement to code
  • Is preparing for App Store review and needs performance validation

Decision Tree

What performance problem are you investigating?
│
├─ App hangs / unresponsive to taps / slow UI
│  └─ Read time-profiler.md
│
├─ Scroll or animation stutter / dropped frames / hitches
│  └─ Read hitches.md
│
├─ High memory / leaks / OOM crashes / growing footprint
│  └─ Read memory-profiling.md
│
├─ Slow app launch / time to first frame
│  └─ Read launch-optimization.md
│
├─ Battery drain / thermal throttling / background energy
│  └─ Read energy-diagnostics.md
│
├─ General "app feels slow" (unknown cause)
│  └─ Start with time-profiler.md, then memory-profiling.md
│
└─ Pre-release performance audit
   └─ Read ALL reference files, use Review Checklist below

Quick Reference

Problem Instrument / Tool Key Metric Reference
UI hangs > 250ms Time Profiler + Hangs Hang duration, main thread stack time-profiler.md
Scroll/animation hitches Animation Hitches template Hitch time ratio (< 5 ms/s good, > 10 critical) hitches.md
High CPU usage Time Profiler / CPU Profiler CPU % by function, call tree weight time-profiler.md
Memory leak Leaks + Memory Graph Leaked bytes, retain cycle paths memory-profiling.md
Memory growth Allocations Live bytes, generation analysis memory-profiling.md
Slow launch App Launch Time to first frame (pre-main + post-main) launch-optimization.md
Battery drain Energy Log / Power Profiler Energy Impact score, CPU/GPU/network energy-diagnostics.md
Thermal issues Activity Monitor Thermal state transitions energy-diagnostics.md
Network waste Network profiler Redundant fetches, large payloads energy-diagnostics.md

Read the full file on GitHub · 240 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 240 lines · 36 tokens per session scan A 55dbb26e0f78

Subscribe to this mod's changes

performance-profiling is a skill published in the GitHub repository rshankras/claude-code-apple-skills (701 stars, last pushed 1mo ago), licensed MIT. It adds 36 tokens to every session and 2,826 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-09-03.

Related

Other skills, from other repositories

swift-performance-pro

Use when diagnosing or fixing performance — SwiftUI render cost, memory and retain cycles, slow lists, launch time, and using Instruments.

laxrajpurohit/swift-skills-pro · 31 tokens

swiftui-performance

Audit and improve SwiftUI runtime performance. Use when diagnosing slow rendering, janky scrolling, high CPU, memory usage, excessive view updates, layout thrash, body evaluation cost, identity churn, view lifetime issues, lazy loading, Instruments profiling guidance, and performance audit requests.

JordanCoin/ios-skills-collection · 59 tokens

motioneyes-animation-debug

Diagnose, fix, or validate SwiftUI animation and scroll behavior by temporarily instrumenting views with MotionEyes, capturing console traces over time, and comparing motion data to user intent or test expectations. Use when users report bugs such as wrong direction, premature fade, timing or easing mismatch…

JordanCoin/ios-skills-collection · 126 tokens

iOS Performance

Memory management, profiling, optimization techniques, and Instruments usage for high-performance iOS apps.

JordanCoin/ios-skills-collection · 21 tokens

swiftui-performance-audit

Audit and improve SwiftUI runtime performance from code review and architecture. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps, and to provide guidance for user-run Instruments profiling when code review alone is…

JordanCoin/ios-skills-collection · 66 tokens

ios-debugger-agent

Use XcodeBuildMCP to build, run, launch, and debug the current iOS project on a booted simulator. Trigger when asked to run an iOS app, interact with the simulator UI, inspect on-screen state, capture logs/console output, or diagnose runtime behavior using XcodeBuildMCP tools.

JordanCoin/ios-skills-collection · 70 tokens