Skip to main content
skill CX Codex

ios-memgraph-analysis — Claude Code skill: iOS memory leak analysis

A skill for reading iOS .memgraph files: it separates unreachable leaks from reachable heap growth and keeps the raw tool output.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dpearson2699/swift-ios-skills --skill ios-memgraph-analysis -a claude-code
Open on GitHub

What ios-memgraph-analysis does

This skill handles memory graphs from iOS apps and shows why an object outlives the point where it should have gone away. Unreachable leaks and reachable growth stay separate here, raw tool output is kept, and after a fix the same app-owned type and ownership path get checked again.

Two Python scripts do the work. scripts/capture_sim_memgraph.py grabs a graph from a running Simulator app: it takes --bundle-id, --output-dir and --pretty, shells out to leaks --outputGraph, and writes a manifest. scripts/summarize_memgraph.py parses the graph, drops raw artifacts into their own directory, and supports --app-image, --trace-limit, --group-by-type and --reference-tree. With several Simulators booted you need --udid; the script matches exactly one launchd label and one PID and errors out on zero or multiple hits. Capturing suspends the process, so latency numbers from a capture mean nothing.

The order matters. Name the object and the event that ends its useful life first, then run one fixed sequence of steps before and after the graph. Keep the build, the data and the Malloc Stack Logging setting identical between runs, or the comparison falls apart. Apple does not treat these text formats as stable schemas, so parser warnings are a reason to open the raw artifacts, not to soften the parser. Interactive Memory Graph Debugger, Instruments and LLDB work belong to the debugging-instruments skill.

What it helps with

  • prove an object survives past its expected lifetime boundary
  • tell an unreachable leak apart from reachable heap growth
  • capture a memory graph from a running Simulator app
  • locate the first app-owned strong edge in an ownership path
  • compare baseline and post-flow graphs from the same flow

Example prompts for the agent

  • Capture a memory graph from the running app by --bundle-id and keep the raw artifacts
  • Parse the .memgraph and show which app types still hold memory after the editor closes
  • leaks reports nothing but the heap keeps growing — diff the baseline and post-flow graphs

How to install ios-memgraph-analysis

1Skills CLI (Vercel)

npx skills add dpearson2699/swift-ios-skills --skill ios-memgraph-analysis -a claude-code

2Manually: put the files in place

~/.claude/skills/ios-memgraph-analysis/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ios-memgraph-analysis/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ios-memgraph-analysis

How do I install ios-memgraph-analysis in Claude Code?

Run npx skills add dpearson2699/swift-ios-skills --skill ios-memgraph-analysis -a claude-code. The skill lands in ~/.claude/skills/ios-memgraph-analysis/SKILL.md.

What does ios-memgraph-analysis do?

It reads .memgraph files and Apple command-line output: it splits unreachable leaks from reachable growth, preserves raw leaks, heap, vmmap and malloc_history output, and re-checks the same ownership path after a fix.

How is it different from debugging-instruments?

This skill covers .memgraph capture and command-line ownership analysis. The interactive Memory Graph Debugger, Instruments, generic retain-cycle inspection and LLDB work are handled by debugging-instruments.

Similar skills

Everything for Mobile →

From the same set86

app-store-optimization Structures App Store Connect metadata to improve organic search ranking and download conversion. It balances keywords across titles, subtitles, and the indexed keyword field. CX Codex +1 2,900installs tabletopkit Guides work on visionOS spatial board games using TabletopKit, including game pieces, turns, participant sync, and RealityKit rendering. CX Codex +1 2,900installs swift-api-design-guidelines Applies Apple's official Swift API Design Guidelines to codebases. It guides argument labels, naming conventions for mutating methods, and structured documentation comments. CX Codex +1 2,800installs core-data A skill for Core Data work in apps that have not moved to SwiftData: stack setup, concurrency, batch operations and migrations. CX Codex +1 2,700installs swift-formatstyle Teaches AI assistants to replace legacy Formatter subclasses with Foundation FormatStyle in Swift and SwiftUI. Useful for locale-safe numbers, dates, and currencies. CX Codex +1 2,700installs swiftlint Sets up SwiftLint for Swift projects, covering rules, suppressions, baselines and CI checks. Use it when adding linting to a build or bringing existing code under review. CX Codex +1 2,700installs focus-engine An AI-coding skill for focus handling in SwiftUI and UIKit: keyboard and directional movement, scene values, restoration after presentation changes. Useful when Siri Remote or Tab navigation lands on the wrong control. CX Codex +1 2,600installs ios-ettrace-performance This skill guides a focused iOS ETTrace capture from matching dSYMs to per-thread analysis. Use it when comparing a repeatable launch or runtime flow. CX Codex +1 1,200installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor