ax-performance

ax-performance is a skill for Claude Code from Kasempiternal/axiom-v2. It costs 50 tokens per session (9,633 once invoked), scanned A, original, MIT.

A guide to finding and fixing slow performance, memory leaks, hangs, and low frame rates in Apple-platform apps. It explains Apple’s Instruments profiling tool, memory debugging, MetricKit, command-line tracing, and common object-retention problems.

In plain words
What is it for?
Use it to find CPU-heavy code, investigate growing memory use, diagnose app hangs, improve screen drawing speed, inspect performance reports, or track down retain cycles involving Objective-C blocks and timers.
Why use it?
It provides a structured way to identify what is making an app slow or unstable instead of guessing from symptoms or adding random changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the axiom plugin — 40 skills, 8 commands, 12 agents, 2 hooks shipped together

Good fit Use it to find CPU-heavy code, investigate growing memory use, diagnose app hangs, improve screen drawing speed, inspect performance reports, or track down retain cycles involving Objective-C blocks and timers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kasempiternal/axiom-v2/ax-performance
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 Kasempiternal/axiom-v2 --skill ax-performance
Clone the repo
git clone --depth 1 https://github.com/Kasempiternal/axiom-v2

Made for: Claude Code.

Or install axiom, the plugin that ships this one along with the rest of its 40 skills, 8 commands, 12 agents, 2 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/kasempiternal/axiom-v2/ax-performance/github.svg)](https://agentmods.dev/skills/kasempiternal/axiom-v2/ax-performance)
Your own site
<a href="https://agentmods.dev/skills/kasempiternal/axiom-v2/ax-performance"><img src="https://agentmods.dev/badge/skills/kasempiternal/axiom-v2/ax-performance/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 ax-performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/kasempiternal/axiom-v2/ax-performance"><img src="https://agentmods.dev/badge/skills/kasempiternal/axiom-v2/ax-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,633 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00050 $0.09633
Opus 5 $0.00025 $0.04816
Sonnet 5 $0.00010 $0.01927
Haiku 4.5 $0.00005 $0.00963

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

Security

Grade A, and why

ax-performance scanned grade A with 1 finding 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 9d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

let tracks = try context.fetch(Track.fetchRequest())
axiom-plugin/skills/ax-performance/SKILL.md · 1,221 lines

How it starts

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

Performance

Quick Patterns

Time Profiler: Find CPU Hotspots

// 1. Launch Instruments > Time Profiler template
// 2. Attach to running app on device (not simulator)
// 3. Record during slow operation for 10-30 seconds
// 4. Stop, examine call tree

// KEY: Check Self Time, not Total Time
// Self Time 80%? Function is doing expensive work
// Self Time 5%, Total Time 80%? Function calls slow code - drill deeper

Memory Leak Detection (5 min)

// 1. Add deinit logging to suspect classes
class MyViewController: UIViewController {
    deinit { print("MyViewController deallocated") }
}

// 2. Navigate to view, navigate away
// See "deallocated"? No leak. Missing? Retained somewhere.

// 3. Debug > Memory Graph Debugger
// Look for purple/red circles with warning badge
// Click to see retain cycle chain

Fix Timer Leak (Most Common - 50% of leaks)

// BAD: Timer never invalidated - RunLoop retains it
progressTimer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { [weak self] _ in
    self?.updateProgress()
}

// GOOD: Combine auto-cleans when released
cancellable = Timer.publish(every: 1.0, tolerance: 0.1, on: .main, in: .default)
    .autoconnect()
    .sink { [weak self] _ in self?.updateProgress() }

Fix Hang: Move Work Off Main Thread

// BAD: Blocks main thread
func loadUserData() {
    let data = try! Data(contentsOf: largeFileURL)  // BLOCKS
    processData(data)
}

// GOOD: Async
func loadUserData() {
    Task.detached {
        let data = try Data(contentsOf: largeFileURL)
        await MainActor.run { self.processData(data) }
    }
}

Enable ProMotion 120Hz (iPhone)

<!-- Info.plist - REQUIRED for >60Hz on iPhone -->
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
// MTKView defaults to 60fps - set explicitly
let mtkView = MTKView(frame: frame, device: device)
mtkView.preferredFramesPerSecond = 120
mtkView.isPaused = false
mtkView.enableSetNeedsDisplay = false

Read the full file on GitHub · 1,221 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. 9d ago First seen · 1,221 lines · 50 tokens per session scan A 7c2de578125a

Subscribe to this mod's changes

ax-performance is a skill published in the GitHub repository Kasempiternal/axiom-v2 (4 stars, last pushed 6mo ago), licensed MIT. It adds 50 tokens to every session and 9,633 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

workflow-audit

Systematic UI workflow auditing for SwiftUI applications. Discovers entry points, traces user flows, detects dead ends and broken promises, audits data wiring, evaluates from user perspective. Triggers: "workflow audit", "audit flows", "find dead ends", "check navigation".

Terryc21/workflow-audit · 59 tokens

ttb-skill-bugfix

Systematic bug fixing workflow for TTBaseUIKit apps: root cause analysis, fix strategy, xcodebuild verify, zero regression.

tqtuan1201/TTBaseUIKit · 34 tokens

push-notifications

Implement or debug local and APNs notifications, permissions, payloads, categories, actions, silent pushes, and notification extensions. Use for alerts, badges, sounds, background delivery, rich content, registration, or delivery diagnosis; route Live Activity updates to activitykit.

thiennc-tesoglobal/ios-skills · 57 tokens

swiftui-performance

Profiles and fixes SwiftUI runtime performance with code review, Instruments, and repeatable measurement. Use for slow rendering, scrolling or animation hitches, excessive body updates, identity churn, layout spikes, broad Observation invalidation, CPU cost, or before/after verification.

thiennc-tesoglobal/ios-skills · 57 tokens

ios-ettrace-performance

Use when capturing or analyzing ETTrace profiles for a focused iOS launch or runtime flow, including exact-build dSYM UUID matching, Simulator or device capture, processed per-thread flamegraph JSON, sampled inclusive/exclusive time, unresolved symbols, and comparable verification. Use debugging-instruments or…

thiennc-tesoglobal/ios-skills · 69 tokens

ios-memgraph-analysis

Captures or analyzes iOS memgraph files and persistent heap growth with Apple CLI evidence, ownership paths, raw artifacts, and matched-flow verification. Use for leaks or memory-growth investigations; route interactive Xcode Memory Graph, Instruments, or LLDB work to debugging-instruments.

thiennc-tesoglobal/ios-skills · 61 tokens