Skip to content

BumpyClock/agent-templates / skills_archive/apple-platform-skills/native-app-performance

native-app-performance

Verified

Native macOS/iOS app performance profiling via xctrace/Time Profiler and CLI-only analysis of Instruments traces. Use when asked to profile, attach, record, or analyze Instruments .trace files, find hotspots, or optimize native app performance without opening Instruments UI.

scripts/extract_time_samples.py

View on GitHub
#!/usr/bin/env python3
import argparse
import subprocess
from pathlib import Path


def main() -> int:
    parser = argparse.ArgumentParser(description="Export time-sample XML from a .trace file.")
    parser.add_argument("--trace", required=True, help="Path to .trace bundle")
    parser.add_argument("--output", required=True, help="Output XML path")
    args = parser.parse_args()

    trace = Path(args.trace)
    output = Path(args.output)

    if not trace.exists():
        raise SystemExit(f"trace not found: {trace}")

    # xctrace export needs an XPath into the trace table-of-contents. The schema
    # name 'time-sample' is stable for Time Profiler sample tables.
    xpath = '/trace-toc/run[@number="1"]/data/table[@schema="time-sample"]'

    cmd = [
        "xcrun",
        "xctrace",
        "export",
        "--input",
        str(trace),
        "--xpath",
        xpath,
        "--output",
        str(output),
    ]

    subprocess.check_call(cmd)

    if not output.exists():
        raise SystemExit(f"export failed: {output} missing")

    return 0


if __name__ == "__main__":
    raise SystemExit(main())
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 319kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 196kUpdated Claude CodeCodexVerifiedInstall