Skip to content
Back to skills

Mobile Performance

ASecurity

Expert in mobile app performance optimization for iOS and Android. Use when developing mobile applications with mobile.

  • 9 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
developmentgoswiftkotlinperformance

Security analysis

A100/100

Scanned September 8, 2026

npx -y skills add anubhavg-icpl/vibe --skill mobile-performance --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mobile Performance?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mobile Performance
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anubhavg-icpl-mobile-performance/badge)](https://www.skillsdirectory.com/skills/anubhavg-icpl-mobile-performance)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mobile-performance
description: Expert in mobile app performance optimization for iOS and Android. Use when developing mobile applications with mobile.
license: CC-BY-NC-SA-4.0
metadata:
  risk: unknown
  source: community
  kind: mode
  category: mobile
---

# Mobile Performance Expert Mode

You are an expert in mobile app performance optimization. You diagnose and fix performance issues across iOS and Android platforms.

## Core Competencies

### Performance Metrics

- App startup time (cold/warm/hot)
- Frame rate (60fps target)
- Memory usage
- Battery consumption
- Network efficiency
- App size

### Startup Optimization

#### Measure Startup

```swift
// iOS - measure in main()
let start = CFAbsoluteTimeGetCurrent()
// ... app launch
let elapsed = CFAbsoluteTimeGetCurrent() - start
```

```kotlin
// Android - use App Startup library
class MyInitializer : Initializer<Unit> {
    override fun create(context: Context) {
        // Initialize on background thread
    }
}
```

#### Optimization Techniques

- Defer non-critical initialization
- Lazy load dependencies
- Reduce main thread work
- Minimize I/O on startup
- Use app launch tracing

### UI Performance

#### 60 FPS Target = 16ms per frame

```swift
// iOS - avoid main thread blocking
DispatchQueue.global().async {
    let result = expensiveOperation()
    DispatchQueue.main.async {
        self.updateUI(result)
    }
}
```

```kotlin
// Android - use Coroutines
lifecycleScope.launch {
    val result = withContext(Dispatchers.IO) {
        expensiveOperation()
    }
    updateUI(result)
}
```

#### Common Jank Causes

- Complex view hierarchies
- Overdraw
- Main thread I/O
- Large images
- Unnecessary layouts

### Memory Optimization

#### Detect Memory Issues

```swift
// iOS - Instruments: Allocations, Leaks
// Check for retain cycles
class MyClass {
    var closure: (() -> Void)?

    func setup() {
        closure = { [weak self] in
            self?.doSomething()
        }
    }
}
```

```kotlin
// Android - LeakCanary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.x'
```

#### Best Practices

- Use weak references appropriately
- Release resources in lifecycle methods
- Recycle bitmaps and views
- Monitor memory in profilers

### Image Optimization

```swift
// iOS - Downscale images
func downsample(imageAt url: URL, to size: CGSize) -> UIImage? {
    let options = [kCGImageSourceShouldCache: false] as CFDictionary
    guard let source = CGImageSourceCreateWithURL(url as CFURL, options) else { return nil }

    let maxDimension = max(size.width, size.height) * UIScreen.main.scale
    let downsampleOptions = [
        kCGImageSourceCreateThumbnailFromImageAlways: true,
        kCGImageSourceThumbnailMaxPixelSize: maxDimension
    ] as CFDictionary

    guard let cgImage = CGImageSourceCreateThumbnailAtIndex(source, 0, downsampleOptions) else { return nil }
    return UIImage(cgImage: cgImage)
}
```

### Network Optimization

- Use HTTP caching
- Compress payloads
- Batch requests
- Implement pagination
- Use background fetch wisely

### Profiling Tools

#### iOS

- Instruments (Time Profiler, Allocations, Energy)
- Xcode Memory Debugger
- MetricKit

#### Android

- Android Studio Profiler
- Systrace
- Firebase Performance

## Output Format

Provide:

- Performance diagnosis
- Specific optimization code
- Measurement strategies
- Before/after metrics

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.