Skip to main content
Agent skill

Ios Ettrace Performance

Capture and interpret ETTrace profiles for iOS simulator apps, including symbolicated launch and runtime flamegraphs. Use when asked to profile an iOS app flow, gather simulator performance traces, identify CPU-heavy stacks, compare before/after traces, or produce flamegraph evidence for startup, scrolling, navigation, rendering, or other user-visible latency.

All install options
Quick install · Personal (~/.claude/skills)Project / Cursor / Desktop →
mkdir -p ~/.claude/skills/ios-ettrace-performance && curl -fsSL 'https://raw.githubusercontent.com/omarshahine/HomeClaw/main/.claude/skills/ios-ettrace-performance/SKILL.md' -o ~/.claude/skills/ios-ettrace-performance/SKILL.md

Get the complete skill folder, including its scripts and reference files.

When to use this skill

Use Ios Ettrace Performance when an AI agent needs a reusable SKILL.md workflow for this job: Capture and interpret ETTrace profiles for iOS simulator apps, including symbolicated launch and runtime flamegraphs. Use when asked to profile an iOS app flow, gather simulator performance traces, identify CPU-heavy stacks, compare before/after traces, or produce flamegraph evidence for startup, scrolling, navigation, rendering, or other user-visible latency.

When not to use it

Skip Ios Ettrace Performance when the task is outside the coding category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.

How to install

Where will you use it?

Install scope
One-line install (Claude Code)
mkdir -p ~/.claude/skills/ios-ettrace-performance && curl -fsSL 'https://raw.githubusercontent.com/omarshahine/HomeClaw/main/.claude/skills/ios-ettrace-performance/SKILL.md' -o ~/.claude/skills/ios-ettrace-performance/SKILL.md
  1. Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/ios-ettrace-performance/SKILL.md. For a shared project, commit the folder at .claude/skills/ios-ettrace-performance/ instead.
  2. Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
  3. For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.

Full install guide for Claude, Cursor, and Codex →

Try a starter prompt

After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.

Starter prompt
Use the Ios Ettrace Performance skill for this task: Use Ios Ettrace Performance when this documented workflow matches the task. Confirm any required inputs or files before making changes.

What supports this recommendation?

70/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.

Documentation
77/100
Practical detail
68/100
Source evidence
61/100
Source signals
72/100
Model compatibility evidence
  • claudeinferred

    The skill text mentions Claude or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.

  • chatgptuntested

    No model-specific signal or recorded compatibility test was found.

  • geminiuntested

    No model-specific signal or recorded compatibility test was found.

  • copilotuntested

    No model-specific signal or recorded compatibility test was found.

  • llamauntested

    No model-specific signal or recorded compatibility test was found.

  • perplexityuntested

    No model-specific signal or recorded compatibility test was found.

  • mistraluntested

    No model-specific signal or recorded compatibility test was found.

  • grokuntested

    No model-specific signal or recorded compatibility test was found.

Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.

What this skill does

# iOS ETTrace Performance

Use this skill to capture a focused, symbolicated ETTrace profile from an iOS simulator app. 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. Pick one focused flow and write down the expected start and stop points. 2. Build the exact simulator app that will be installed and profiled. 3. Temporarily link ETTrace into that app target for simulator/debug profiling. 4. Collect UUID-matched dSYMs for the app executable and embedded dynamic frameworks. 5. Capture one launch or runtime trace. 6. Preserve the processed flamegraph JSON immediately after the run. 7. Analyze only the processed JSON and report the flow, artifacts, hotspots, and caveats.

Avoid broad "use the app for a while" captures. One trace should correspond to one user-visible flow.

## Setup

Use a writable run folder for each profiling session:

```bash if [ -z "${RUN_DIR:-}" ]; then RUN_DIR="$(mktemp -d "${TMPDIR:-/tmp}/codex-ios-ettrace.XXXXXX")" fi mkdir -p "$RUN_DIR" ```

Install the ETTrace runner CLI if it is not already available:

```bash brew install emergetools/homebrew-tap/ettrace ```

`ettrace` is the host-side macOS runner. The app must also link an `ETTrace.xcframework` for the iOS Simulator architecture. This workflow is validated for ETTrace v1.1.0 processed `output_<thread>.json` files with top-level `nodes`.

## Link ETTrace Into The App

Wire ETTrace into the exact app target being profiled. Keep the integration in a clearly temporary patch and remove it when the profiling task is done unless the user explicitly asks to keep it.

Preferred options:

- Reuse an existing simulator-compatible `ETTrace.xcframework` if the repo already vendors one. - If none exists, build a simulator-only copy into `RUN_DIR` from the upstream ETTrace package. - Link the framework directly into the app target, not only into tests, resources, data files, or a nested launcher target. - Confirm launch logs print `Starting ETTrace`. - Profile only one ETTrace-instrumented simulator app at a time because simulator mode listens on a fixed localhost port.

Build a simulator framework when needed:

```bash ETTRACE_TAG="${ETTRACE_TAG:-v1.1.0}" # Override to match the installed runner when Homebrew updates. ETTRACE_SRC="$RUN_DIR/ETTrace-src" if [ ! -d "$ETTRACE_SRC" ]; then git clone --depth 1 --branch "$ETTRACE_TAG" https://github.com/EmergeTools/ETTrace "$ETTRACE_SRC" fi

rm -rf "$RUN_DIR/ETTrace-iphonesimulator.xcarchive" "$RUN_DIR/ETTrace.xcframework" pushd "$ETTRACE_SRC" >/dev/null xcodebuild archive \ -scheme ETTrace \ -archivePath "$RUN_DIR/ETTrace-iphonesimulator.xcarchive" \ -sdk iphonesimulator \ -destination 'generic/platform=iOS Simulator' \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ INSTALL_PATH='Library/Frameworks' \ SKIP_INSTALL=NO \ CLANG_CXX_LANGUAGE_STANDARD=c++17

xcodebuild -create-xcframework \ -framework "$RUN_DIR/ETTrace-iphonesimulator.xcarchive/Products/Library/Frameworks/ETTrace.framework" \ -output "$RUN_DIR/ETTrace.xcframework" popd >/dev/null ```

For Bazel apps, a temporary import usually looks like:

```python load("@rules_apple//apple:apple.bzl", "apple_dynamic_xcframework_import")

package(default_visibility = ["//visibility:public"])

apple_dynamic_xcframework_import( name = "ETTrace", xcframework_imports = glob(["ETTrace.xcframework/**"]), ) ```

For Xcode projects, temporarily add the simulator `ETTrace.xcframework` to the app target's Link Binary With Libraries / Embed Frameworks phases for the debug simulator build you are profiling, then remove that wiring after profiling.

## Symbolication Gate

Do not draw conclusions from an unsymbolicated flamegraph. Before every capture, prepare a dSYM folder that includes the app dSYM and any embedded first-party dynamic framework dSYMs.

Collect dSYMs after the final build that produced the installed app:

```bash SKILL_DIR="<absolute path to this loaded skill folder>" APP="<path-to-built-simulator-App.app>" DSYMS="$RUN_DIR/dsyms"

"$SKILL_DIR/scripts/collect_ios_dsyms.sh" \ --app "$APP" \ --out-dir "$DSYMS" \ --search-root "$(dirname "$APP")" \ --search-root "$PWD" \ --extra-dsym "$RUN_DIR/ETTrace-iphonesimulator.xcarchive/dSYMs/ETTrace.framework.dSYM" ```

Add `--require-framework <FrameworkName>` for app-owned dynamic frameworks that must symbolicate; use `--require-all-frameworks` only when every embedded framework is app-owned or expected to have symbols. If the helper reports a missing required app or framework dSYM, rebuild the exact simulator app with dSYM generation before tracing, or add the build output directory that contains those dSYMs as another `--search-root`.

Verify important UUIDs before tracing when the report looks suspicious:

```bash dwarfdump --uuid "$APP/$(/usr/libexec/PlistBuddy -c 'Print :CFBundleExecutable' "$APP/Info.plist")" find "$DSYMS" -maxdepth 1 -type d -name '*.dSYM' -print -exec dwarfdump --uuid {} \; ```

After ETTrace exits, read its symbolication summary. Treat meaningful first-party "have library but no symbol" lines as a failed trace unless they are tiny noise. Unsymbolicated system-framework or ETTrace internal buckets are usually acceptable.

## Capture

For launch traces:

```bash cd "$RUN_DIR" CAPTURE_MARKER="$RUN_DIR/.ettrace-capture-start" : > "$CAPTURE_MARKER" find "$RUN_DIR" -maxdepth 1 \( -name 'output.json' -o -name 'output_*.json' \) -delete ettrace --simulator --launch --verbose --dsyms "$DSYMS" ```

Use `--launch` only when measuring startup or first render. The first launch connection can force quit the app; relaunch from the simulator home screen rather than Xcode if prompted. For first-launch-after-install traces, temporarily set `ETTraceRunAtStartup=YES` in the app Info.plist, then run `ettrace --simulator` and launch from the home screen.

For runtime flow traces:

```bash cd "$RUN_DIR" CAPTURE_MARKER="$RUN_DIR/.ettrace-capture-start" : > "$CAPTURE_MARKER" find "$RUN_DIR" -maxdepth 1 \( -name 'output.json' -o -name 'output_*.json' \) -delete ettrace --simulator --verbose --dsyms "$DSYMS" ```

Start from a stable screen, start ETTrace, perform exactly one focused flow, wait until visible work is complete, then stop the runner. For wider attribution, add `--multi-thread`; otherwise start with the main thread.

In Codex, run `ettrace` with a TTY and answer prompts with `write_stdin`. Without a TTY, the runner can exit without a useful trace.

## Preserve Outputs

The next ETTrace run can overwrite processed flamegraph files, so preserve fresh `output_<thread-id>.json` files immediately. Do not analyze a saved `output.json`; ETTrace also serves a viewer route with that name, and raw `emerge-output/output.json` files are not the processed flamegraph artifacts this workflow expects.

```bash PRESERVED_DIR="$(mktemp -d "$RUN_DIR/run-$(date +%Y%m%d-%H%M%S).XXXXXX")" : > "$PRESERVED_DIR/summary.txt" if [ ! -e "$CAPTURE_MARKER" ]; then echo "error: capture marker missing; start a fresh ETTrace capture before preserving outputs" >&2 exit 1 fi find "$RUN_DIR" -maxdepth 1 -name 'output_*.json' -newer "$CAPTURE_MARKER" -print | while IFS= read -r json; do preserved="$PRESERVED_DIR/${json##*/}" cp "$json" "$preserved" { echo "## ${preserved##*/}" python3 "$SKILL_DIR/scripts/analyze_flamegraph_json.py" "$preserved" } >> "$PRESERVED_DIR/summary.txt" done if [ ! -s "$PRESERVED_DIR/summary.txt" ]; then echo "error: no fresh processed ETTrace output JSON found in $RUN_DIR" >&2 exit 1 fi ```

Analyze only processed `output_*.json` files in `RUN_DIR`. Ignore `output.json` and raw `emerge-output/output.json` files unless debugging ETTrace itself. If the analyzer rejects the JSON shape, capture again with the Homebrew ETTrace runner and matching app-side `ETTrace.xcframework` tag instead of trying to interpret the rejected file.

## Read The Profile

Start from `run-*/summary.txt`, then inspect processed JSON directly if needed.

Report:

- exact flow, app build, simulator model/runtime, and run count - processed flamegraph JSON paths - top active leaves and inclusive first-party stacks with sample weights or percentages - whether symbols were complete for app-owned binaries - caveats such as first-run setup, simulator-only cost, network variance, or low sample count - before/after deltas only when the same flow was captured with comparable setup

## Cleanup

Remove temporary ETTrace app wiring when profiling is complete unless the user asked to keep it. Keep or discard run artifacts based on the active task.

Intended uses

  • Use Ios Ettrace Performance when this documented workflow matches the task.

Implementation notes

  • Review the source instructions and adapt inputs before running the workflow.

Try it, then tell us how it went

A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.