All skills
dpearson2699 avatar

/ios-memgraph-analysis

@45c9085

Use when capturing or analyzing an iOS .memgraph, especially when the task mentions a memory leak, heap growth, persistent memory increase, ownership path, or matched-capture comparison with Apple CLI tools. Covers unambiguous Simulator capture, leaks/heap/vmmap/malloc_history evidence, raw artifact preservation, and same-flow verification. Use debugging-instruments for interactive Xcode Memory Graph, Instruments, generic retain-cycle inspection, or LLDB work.

Use this Skill: https://skilld.dev/gh/dpearson2699/swift-ios-skills/ios-memgraph-analysis

This session only. Nothing lands on disk.

referencesreachable-growth.md

≈470 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Reachable Growth When leaks Is Empty

Load this workflow only after a matched lifetime produces no unreachable leak but baseline and post-flow graphs show persistent growth.

Contents

Match the Captures

Capture baseline and post-flow graphs from the same app build, process, device or Simulator, launch state, and user flow. Repeated post-flow growth is stronger evidence than a single large snapshot.

Locate the Growing Region

Run vmmap -summary on both graphs. If growth is in malloc regions, compare the graphs with the installed heap tool's current syntax:

heap --diffFrom=baseline.memgraph post.memgraph

Treat the result as a type/size lead, not as proof of ownership.

Find a Suspicious Address

Obtain an address for a growing app-owned type or size:

heap --addresses='<class-or-size-pattern>' post.memgraph

Record the query and selected address so the next step is reproducible.

Trace Ownership

  • Without Malloc Stack Logging, use leaks --traceTree=<address> to find the live ownership path.
  • With Malloc Stack Logging, use malloc_history post.memgraph -fullStacks <address> for allocation evidence.
  • Use leaks --referenceTree --groupByType when aggregate ownership clues are more useful than a single path.

Stop at the first strong app-owned edge. A framework node, allocation stack, or type-count delta alone does not identify the lifetime bug.

Preserve Evidence

Check each installed tool's --help because Xcode/macOS output and flags can evolve. Preserve raw command output beside both graphs, then repeat the same queries after the ownership fix.

Source: SKILL.md on GitHub

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides a structured workflow and Python scripts for capturing and analyzing iOS memory graphs using Apple's command-line utilities. It follows best practices for technical analysis, including deterministic process matching, sanitization of bundle identifiers, and defensive coding techniques like bounded file reading to handle large tool outputs safely.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 45c9085. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Steadyupdated 3 months ago

README badge

README badge for dpearson2699/swift-ios-skills/ios-memgraph-analysis