megastep/codex-skills/axiom-xctrace-ref
Claude Code and agent skill by megastep/codex-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when automating Instruments profiling, running headless performance analysis, or integrating profiling into CI/CD - comprehensive xctrace CLI reference with record/export patterns
Install
npx vskill@latest install megastep/codex-skills/axiom-xctrace-refSKILL.md
xctrace CLI Reference
Command-line interface for Instruments profiling. Enables headless performance analysis without GUI.
Overview
xctrace is the CLI tool behind Instruments.app. Use it for:
- Automated profiling in CI/CD pipelines
- Headless trace collection without GUI
- Programmatic trace analysis via XML export
- Performance regression detection
Requires: Xcode 12+ (xctrace 12.0+). This reference tested with Xcode 26.2.
Quick Reference
Recording Traces
Basic Recording
Note: In Xcode 26+, use --instrument instead of --template for reliable export. Templates may produce traces with "Document Missing Template Error" on export.
Target Selection
Recording Options
| Flag | Description | |
|---|---|---|
--output <path> | Output .trace file path | |
--time-limit <time> | Recording duration (e.g., 10s, 1m, 500ms) | |
--no-prompt | Skip privacy warnings (use in automation) | |
--append-run | Add run to existing trace | |
--run-name <name> | Name the recording run |
Core Instruments
CPU Profiler
CPU sampling for finding hot functions.
Schema: cpu-profile Columns: time, thread, process, core, thread-state, weight (cycles), stack
Allocations
Memory allocation tracking.
Schema: allocations Use for: Finding memory growth, object counts, allocation patterns
Leaks
Memory leak detection.
Schema: leaks Use for: Detecting unreleased memory, retain cycles
SwiftUI
SwiftUI view body analysis.
Schema: swiftui Use for: Finding excessive view updates, body re-evaluations
Swift Concurrency
Actor and Task analysis.
Schemas: swift-task, swift-actor Use for: Task scheduling, actor isolation, async performance
All Available Instruments
Exporting Traces
Table of Contents
Output structure:
XPath Export
CPU Profile Schema
Each row contains:
sample-time: Timestamp in nanosecondsthread: Thread ID and nameprocess: Process name and PIDcore: CPU core numberthread-state: Running, Blocked, etc.cycle-weight: CPU cyclesbacktrace: Call stack with function names
Process Discovery
Find Running Simulator Apps
Find Device UUID
Find Process by Name
Automation Patterns
CI/CD Integration
Before/After Comparison
Troubleshooting
"Document Missing Template Error" on Export
Cause: Recording used --template flag in Xcode 26+ Fix: Use --instrument instead:
"Unable to attach to process"
Causes:
- Process not running
- Insufficient permissions
- System Integrity Protection blocking
Fix:
Empty Trace Export
Cause: Recording too short or no activity during recording Fix: Increase --time-limit or ensure app is actively used during recording
Symbolication Issues
Raw addresses in backtraces (e.g., 0x18f17ed94) instead of function names.
Fix: Ensure dSYMs are available:
Limitations
- Privacy restrictions: Some instruments require privacy permissions granted in System Preferences
- Device support: Physical device profiling requires Developer Mode enabled
- Background apps: Limited profiling of backgrounded apps
- Export format: XML only (no JSON export)
- Template vs Instrument: In Xcode 26+, templates may not export properly
Resources
Skills: axiom-performance-profiling, axiom-memory-debugging, axiom-swiftui-performance
Docs: /xcode/instruments, /os/logging/recording-performance-data
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingaxiom-xctrace-ref/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 5
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 31 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/megastep/codex-skills/axiom-xctrace-ref)