BumpyClock/agent-templates / skills/ios-macos-development
ios-macos-development
UnverifiedBuild, debug, or release iOS and macOS apps with Swift and Apple platform tools.
native-app-performance/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())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |