BumpyClock/agent-templates / skills_archive/apple-platform-skills/native-app-performance
native-app-performance
VerifiedNative 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.1 KB |
| agents/openai.yaml | config | 205 B |
| scripts/extract_time_samples.py | script | 1.1 KB |
| scripts/record_time_profiler.sh | script | 1.3 KB |
| scripts/top_hotspots.py | script | 4.0 KB |
scripts/record_time_profiler.sh
View on GitHub#!/usr/bin/env bash
set -euo pipefail
# Minimal CLI wrapper for Time Profiler recording via xctrace.
# Supports attach or launch and always writes a .trace output.
usage() {
cat <<'USAGE'
Usage:
record_time_profiler.sh --attach <pid> --trace <path> [--duration 90s]
record_time_profiler.sh --launch <binary> --trace <path> [--duration 90s]
USAGE
}
attach_pid=""
launch_cmd=""
trace_path=""
duration="90s"
while [[ $# -gt 0 ]]; do
case "$1" in
--attach)
attach_pid="$2"; shift 2 ;;
--launch)
launch_cmd="$2"; shift 2 ;;
--trace)
trace_path="$2"; shift 2 ;;
--duration)
duration="$2"; shift 2 ;;
-h|--help)
usage; exit 0 ;;
*)
echo "Unknown arg: $1"; usage; exit 1 ;;
esac
done
if [[ -z "$trace_path" ]]; then
echo "--trace is required"; usage; exit 1
fi
if [[ -n "$attach_pid" && -n "$launch_cmd" ]]; then
echo "Use either --attach or --launch, not both"; exit 1
fi
if [[ -z "$attach_pid" && -z "$launch_cmd" ]]; then
echo "Must supply --attach or --launch"; usage; exit 1
fi
if [[ -n "$attach_pid" ]]; then
xcrun xctrace record --template 'Time Profiler' --time-limit "$duration" \
--output "$trace_path" --attach "$attach_pid"
else
xcrun xctrace record --template 'Time Profiler' --time-limit "$duration" \
--output "$trace_path" --launch -- "$launch_cmd"
fi
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 319k | Updated | Claude CodeCodex | Verified | Install |
| 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: 196k | Updated | Claude CodeCodex | Verified | Install |
| 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: 196k | Updated | Claude CodeCodex | Verified | Install |
| 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: 196k | Updated | Claude CodeCodex | Verified | Install |