Skip to main content
skill CX Codex GP ChatGPT official · OpenAI

ios-memgraph-leaks — Codex skill: what it does, how to install

Captures and inspects iOS leaks from a simulator process or .memgraph. Useful for tracing retained objects and checking a fix with before-and-after evidence.

Install into Codex · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openai/plugins --skill ios-memgraph-leaks -a codex
Open on GitHub

What ios-memgraph-leaks does

This skill helps prove a leak in a live simulator process or an existing .memgraph. Its workflow repeats the release scenario, captures memory with scripts/capture_sim_memgraph.sh, summarizes leaks through scripts/summarize_memgraph_leaks.py, then inspects ownership with leaks --traceTree and grouped leak output.

After a patch, it reruns the same flow on the same simulator when possible and compares leaked types, ownership paths, and counts. A smaller .memgraph alone is not proof of a fix; the retaining path should disappear as well. Check the simulator UDID, bundle identifier, and capture paths before starting. Pair it with ../ios-debugger-agent/SKILL.md when the task also includes building, installing, launching, UI driving, logs, or screenshots.

What it helps with

  • capture a .memgraph from a running simulator app
  • summarize leaked objects in a report
  • trace the ownership path keeping an object alive
  • compare leak evidence before and after a patch

Example prompts for the agent

  • “Capture a `.memgraph` from the running simulator app and summarize the leaks.”
  • “Inspect `/path/to/app.memgraph` with `--trace-limit 5` and write the result to `/path/to/leak-summary.md`.”
  • “Repeat the same flow after the fix and report disappeared types, remaining leaks, and ownership paths.”

How to install ios-memgraph-leaks

1Skills CLI (Vercel)

npx skills add openai/plugins --skill ios-memgraph-leaks -a codex

2Manually: put the files in place

.agents/skills/ios-memgraph-leaks/SKILL.md

For all projects use ~/.agents/skills/

From the same set199

The whole set →
supabase official supabase Guides the agent through database configuration and strict RLS policies in Supabase. CX Codex GP ChatGPT 8installs swiftui-performance-audit official OpenAI Pinpoints SwiftUI runtime issues like frame drops, unresponsive taps, and excessive view body computations. Works code-first and guides Instruments profiling. CX Codex GP ChatGPT 109installs swiftui-liquid-glass official OpenAI This skill helps build and review SwiftUI Liquid Glass interfaces for iOS 26+. Use it when adopting the API or checking fallbacks, interaction, and design fit. CX Codex GP ChatGPT 121installs swiftui-ui-patterns official OpenAI This skill helps build and refactor SwiftUI interfaces, from navigation and state to layouts and controls. Use it for new screens or changes to an existing project. CX Codex GP ChatGPT 114installs swiftui-view-refactor official OpenAI Refactors SwiftUI view files into clean, testable structures with dedicated subview types and proper Observation ownership. CX Codex GP ChatGPT 113installs status official Vercel Labs Inspects the state of a linked Vercel project, including recent deployments, domain health, and log drain setup. CX Codex GP ChatGPT 348installs android-emulator-qa official OpenAI This skill checks Android app flows in an emulator through adb. Use it for navigation tests, UI bug reproduction, screenshots, and logcat capture. CX Codex GP ChatGPT 308installs frontend-app-builder official OpenAI This skill designs and builds frontend apps, websites, and games, then checks the result in a browser. Use it for a new interface or an explicit redesign request. CX Codex GP ChatGPT 252installs

Similar

app-store-optimization Alireza Rezvani ASO skill for keyword scoring, competitor gap analysis, and metadata drafting across Apple App Store and Google Play Store limits. Claude Code 867installs apple-hig-expert Alireza Rezvani Audits iOS, macOS, watchOS, and visionOS interfaces against Apple HIG. Use it to review mockups or design native-feeling Apple UI. Claude Code 662installs mvvm-toolkit-di official github Wires CommunityToolkit.Mvvm ViewModels into Microsoft.Extensions.DependencyInjection across WPF, WinUI 3, .NET MAUI, Uno, and Avalonia projects. GitHub Copilot 92installs vercel-react-native-skills vercel A rules pack for React Native and Expo work: lists, animations, navigation, native modules. Load it so your agent makes mobile changes the same way every time. Claude Code CX Codex Cursor +1 253,900installs animate-expo emilkowalski Builds React Native and Expo animations using Reanimated and Gesture Handler. Helps keep motion on the UI thread and avoid dropped frames on physical devices. Claude Code CX Codex Cursor +1 135,900installs aso coreyhaines31 Audits App Store and Google Play listings against store optimization standards. Helps uncover gaps in metadata, visual assets, and conversion. Claude Code CX Codex Cursor +1 74,900installs accessibility affaan-m Designs and audits user interfaces to WCAG 2.2 Level AA across Web, iOS, and Android. It guides the model through semantic roles, focus states, and screen readers. Claude Code CX Codex Cursor +1 5,000installs apple-appstore-reviewer official github Reviews an iOS project from an Apple App Store reviewer’s perspective and ranks rejection risks. Use it before submitting an app for review. GitHub Copilot 11,295installs

Questions about ios-memgraph-leaks

How do I install ios-memgraph-leaks in Codex?

Run npx skills add openai/plugins --skill ios-memgraph-leaks -a codex, then use .agents/skills/ios-memgraph-leaks/SKILL.md.

What does ios-memgraph-leaks do?

It captures a memgraph from an iOS simulator process, summarizes leaks, and traces the ownership path that keeps an object alive. After a patch, it compares the same flow before and after the change.

Do I need ios-debugger-agent to use this skill?

Use it with ../ios-debugger-agent/SKILL.md when the task also requires building, installing, launching, UI control, logs, or screenshots.

Source text

SKILL.md · MIT
---
name: ios-memgraph-leaks
description: Capture and inspect iOS leaks and memgraphs. Use when debugging leaked objects, retain cycles, memory growth, or before/after leak evidence.
---

# iOS Memgraph Leaks

Use this skill to prove iOS leaks from a live simulator process or an existing `.memgraph`. Pair it with `../ios-debugger-agent/SKILL.md` when the task also needs simulator build, install, launch, UI driving, logs, or screenshots.

## Core Workflow

1. Build, launch, and drive the exact flow that should release objects.
2. Capture a memgraph from the running simulator process with `scripts/capture_sim_memgraph.sh`.
3. Summarize leaks with `scripts/summarize_memgraph_leaks.py`.
4. For each app-owned leaked type, inspect ownership with `leaks --traceTree=<address> <file.memgraph>` and grouped leak evidence.
5. Make the smallest root-cause patch, then recapture the same flow on the same simulator when possible.
6. Report proof: before/after leak counts, disappeared root types, remaining leaks, memgraph paths, and test/build results.

Do not claim a leak fix from a smaller memgraph alone. A credible fix explains the ownership path that kept the object alive and shows that the same path or type disappears after the patch.

## Capture

Prefer capturing from the simulator already used for the reproduction. Resolve the simulator UDID and app bundle identifier, then capture the running app:

```bash
SKILL_DIR="<absolute path to this loaded skill folder>"
SIM="<simulator-udid>"
BUNDLE_ID="<app.bundle.identifier>"
MEMGRAPH_DIR="$(mktemp -d "${TMPDIR:-/tmp}/codex-ios-memgraph.XXXXXX")"

"$SKILL_DIR/scripts/capture_sim_memgraph.sh" \
  --udid "$SIM" \
  --bundle-id "$BUNDLE_ID" \
  --out-dir "$MEMGRAPH_DIR"
```

Do not derive `SKILL_DIR` from the target app repo's `pwd`; installed plugins usually live outside the app being debugged. Store captures in a run-specific temp or user-chosen folder, not under `SKILL_DIR`.

If the process cannot be found, confirm the bundle identifier and use `xcrun simctl spawn "$SIM" launchctl list` to inspect running labels.

## Summarize

Summarize an existing memgraph:

```bash
"$SKILL_DIR/scripts/summarize_memgraph_leaks.py" \
  /path/to/app.memgraph \
  --trace-limit 5 \
  --out /path/to/leak-summary.md
```

Use `--trace-limit` sparingly. Trace trees are useful root-cause evidence, but large memgraphs can produce noisy output. If a trace tree says `Found 0 roots referencing`, treat it as an unreachable/self-retained leak candidate and use the summary's grouped leak tree or `leaks --groupByType <file.memgraph>` to identify the retained fields and payload chain.

## Root Cause Rules

- Identify the first app-owned leaked type in the leak output or trace.
- Determine the intended lifetime: process, session, account, view, request, or task.
- Treat lazy or deferred allocation as a scope reduction, not a leak fix, unless the original eager allocation itself violated the intended lifetime.
- Prove retain-cycle claims with either a `traceTree` ownership path or an isolated reproduction.
- For unreachable/self-cycle leaks, `traceTree` may have no root path; use `leaks --groupByType` plus source verification to find the self-retaining edge.
- Do not claim success just because total leak count went down; prove the specific type or path disappeared.
- Separate real root-cause branches from candidate/noise branches.
- Prefer deleting the retaining edge over adding broad cleanup code.

## Report

A useful leak report includes:

- the exact flow and simulator/app build
- the memgraph and summary paths
- app-owned leaked types and counts
- at least one ownership path, or grouped leak tree evidence when the object is unreachable from roots
- the smallest proposed or applied retaining-edge fix
- before/after evidence when a fix was made

If the memgraph shows only framework/runtime noise, say that and recommend the next narrower capture rather than inventing an app leak.

© OpenAI · MIT · openai/plugins

See also

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