Token导航 LogoToken导航

Agent Skill · 研究检索

axiom-xctrace-ref(公理 xctrace 参考)

axiom-xctrace-ref 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

axiom-xctrace-ref 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 24,232。

总安装 4,069周安装 173GitHub Stars 873下载 1,426核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:axiom-xctrace-ref(公理 xctrace 参考)
来源仓库:https://github.com/charleswiltgen/axiom
仓库路径:skills/axiom-xctrace-ref
安装命令:
npx skills add https://github.com/charleswiltgen/axiom --skill axiom-xctrace-ref
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/charleswiltgen/axiom --skill axiom-xctrace-ref

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

axiom-xctrace-ref 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。提供 xctrace CLI 命令行接口参考,支持 Instruments 性能分析的头部收集和 XML 导出。

通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/axiom-xctrace-ref

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/charleswiltgen/axiom --skill axiom-xctrace-ref;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

axiom-xctrace-ref 怎么安装?

在终端执行 npx skills add https://github.com/charleswiltgen/axiom --skill axiom-xctrace-ref。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

axiom-xctrace-ref 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

axiom-xctrace-ref 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/charleswiltgen/axiom --skill axiom-xctrace-ref;npx skills add charleswiltgen/axiom --skill "axiom-xctrace-ref" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

axiom-xctrace-ref 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

axiom-xctrace-ref 用的人多吗?

公开数据是累计安装 4,069 次,近一周安装 173 次,下载 1,426 次,GitHub 873 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

axiom-xctrace-ref 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
axiom-xctrace-ref

公理 xctrace 参考 · 本页

4,069873执行命令MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.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

# Record a 10-second CPU profile
xcrun xctrace record --instrument 'CPU Profiler' --attach 'MyApp' --time-limit 10s --output profile.trace

# Export to XML for analysis
xcrun xctrace export --input profile.trace --toc  # See available tables
xcrun xctrace export --input profile.trace --xpath '/trace-toc/run[@number="1"]/data/table[@schema="cpu-profile"]'

# List available instruments
xcrun xctrace list instruments

# List available templates
xcrun xctrace list templates

Recording Traces

Basic Recording

# Using an instrument (recommended for CLI automation)
xcrun xctrace record --instrument 'CPU Profiler' --attach 'AppName' --time-limit 10s --output trace.trace

# Using a template (may fail on export in Xcode 26+)
xcrun xctrace record --template 'Time Profiler' --attach 'AppName' --time-limit 10s --output trace.trace

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

# Attach to running process by name
xcrun xctrace record --instrument 'CPU Profiler' --attach 'MyApp' --time-limit 10s

# Attach to running process by PID
xcrun xctrace record --instrument 'CPU Profiler' --attach 12345 --time-limit 10s

# Profile all processes
xcrun xctrace record --instrument 'CPU Profiler' --all-processes --time-limit 10s

# Launch and profile
xcrun xctrace record --instrument 'CPU Profiler' --launch -- /path/to/app arg1 arg2

# Target specific device (simulator or physical)
xcrun xctrace record --instrument 'CPU Profiler' --device 'iPhone 17 Pro' --attach 'MyApp' --time-limit 10s
xcrun xctrace record --instrument 'CPU Profiler' --device 947DF45C-4ACB-4B3E-A043-DF2CD59A59B3 --all-processes --time-limit 10s

Recording Options

FlagDescription
--output <path>Output.trace file path
--time-limit <time>Recording duration (e.g., 10s, 1m, 500ms)
--no-promptSkip privacy warnings (use in automation)
--append-runAdd run to existing trace
--run-name <name>Name the recording run

Core Instruments

CPU Profiler

CPU sampling for finding hot functions.

xcrun xctrace record --instrument 'CPU Profiler' --attach 'MyApp' --time-limit 10s --output cpu.trace

Schema: cpu-profile Columns: time, thread, process, core, thread-state, weight (cycles), stack

Allocations

Memory allocation tracking.

xcrun xctrace record --instrument 'Allocations' --attach 'MyApp' --time-limit 30s --output alloc.trace

Schema: allocations Use for: Finding memory growth, object counts, allocation patterns

Leaks

Memory leak detection.

xcrun xctrace record --instrument 'Leaks' --attach 'MyApp' --time-limit 30s --output leaks.trace

Schema: leaks Use for: Detecting unreleased memory, retain cycles

SwiftUI

SwiftUI view body analysis.

xcrun xctrace record --instrument 'SwiftUI' --attach 'MyApp' --time-limit 10s --output swiftui.trace

Schema: swiftui Use for: Finding excessive view updates, body re-evaluations

Swift Concurrency

Actor and Task analysis.

xcrun xctrace record --instrument 'Swift Tasks' --instrument 'Swift Actors' --attach 'MyApp' --time-limit 10s --output concurrency.trace

Schemas: swift-task, swift-actor Use for: Task scheduling, actor isolation, async performance

All Available Instruments

Activity Monitor          Audio Client              Audio Server
Audio Statistics          CPU Counters              CPU Profiler
Core Animation Activity   Core Animation Commits    Core Animation FPS
Core Animation Server     Core ML                   Data Faults
Data Fetches              Data Saves                Disk I/O Latency
Disk Usage                Display                   Filesystem Activity
Filesystem Suggestions    Foundation Models         Frame Lifetimes
GCD Performance           GPU                       HTTP Traffic
Hangs                     Hitches                   Leaks
Location Energy Model     Metal Application         Metal GPU Counters
Metal Performance Overview Metal Resource Events    Network Connections
Neural Engine             Points of Interest        Power Profiler
Processor Trace           RealityKit Frames         RealityKit Metrics
Runloops                  Sampler                   SceneKit Application
Swift Actors              Swift Tasks               SwiftUI
System Call Trace         System Load               Thread States
Time Profiler             VM Tracker                Virtual Memory Trace

Exporting Traces

Table of Contents

# See all available data tables in a trace
xcrun xctrace export --input trace.trace --toc

Output structure:

<trace-toc>
    <run number="1">
        <info>
            <target>...</target>
            <summary>...</summary>
        </info>
        <processes>...</processes>
        <data>
            <table schema="cpu-profile" .../>
            <table schema="thread-info"/>
            <table schema="process-info"/>
        </data>
    </run>
</trace-toc>

XPath Export

# Export specific table by schema
xcrun xctrace export --input trace.trace --xpath '/trace-toc/run[@number="1"]/data/table[@schema="cpu-profile"]'

# Export process info
xcrun xctrace export --input trace.trace --xpath '/trace-toc/run[@number="1"]/data/table[@schema="process-info"]'

# Export thread info
xcrun xctrace export --input trace.trace --xpath '/trace-toc/run[@number="1"]/data/table[@schema="thread-info"]'

CPU Profile Schema

<schema name="cpu-profile">
    <col><mnemonic>time</mnemonic><name>Sample Time</name></col>
    <col><mnemonic>thread</mnemonic><name>Thread</name></col>
    <col><mnemonic>process</mnemonic><name>Process</name></col>
    <col><mnemonic>core</mnemonic><name>Core</name></col>
    <col><mnemonic>thread-state</mnemonic><name>State</name></col>
    <col><mnemonic>weight</mnemonic><name>Cycles</name></col>
    <col><mnemonic>stack</mnemonic><name>Backtrace</name></col>
</schema>

Each row contains:

  • sample-time: Timestamp in nanoseconds
  • thread: Thread ID and name
  • process: Process name and PID
  • core: CPU core number
  • thread-state: Running, Blocked, etc.
  • cycle-weight: CPU cycles
  • backtrace: Call stack with function names

Process Discovery

Find Running Simulator Apps

# List apps in booted simulator
xcrun simctl spawn booted launchctl list | grep UIKitApplication

# Output format: PID  Status  com.apple.UIKitApplication:com.bundle.id[xxxx][rb-legacy]

Find Device UUID

# List booted simulators (JSON)
xcrun simctl list devices booted -j

# List all devices
xcrun simctl list devices

Find Process by Name

# Get PID of running app
pgrep -f "MyApp"

# List all processes with app name
ps aux | grep MyApp

Automation Patterns

CI/CD Integration

#!/bin/bash
# performance-test.sh

APP_NAME="MyApp"
TRACE_DIR="./traces"
TIME_LIMIT="30s"

# Boot simulator if needed
xcrun simctl boot "iPhone 17 Pro" 2>/dev/null || true

# Wait for app to launch
sleep 5

# Record CPU profile
xcrun xctrace record \
    --instrument 'CPU Profiler' \
    --device "iPhone 17 Pro" \
    --attach "$APP_NAME" \
    --time-limit "$TIME_LIMIT" \
    --no-prompt \
    --output "$TRACE_DIR/cpu.trace"

# Export for analysis
xcrun xctrace export \
    --input "$TRACE_DIR/cpu.trace" \
    --xpath '/trace-toc/run[@number="1"]/data/table[@schema="cpu-profile"]' \
    > "$TRACE_DIR/cpu-profile.xml"

# Parse and check thresholds
# (Use xmllint, python, or custom tool to parse XML)

Before/After Comparison

# Record baseline
xcrun xctrace record --instrument 'CPU Profiler' --attach 'MyApp' --time-limit 10s --output baseline.trace

# Make changes, rebuild app

# Record after changes
xcrun xctrace record --instrument 'CPU Profiler' --attach 'MyApp' --time-limit 10s --output after.trace

# Export both for comparison
xcrun xctrace export --input baseline.trace --xpath '...' > baseline.xml
xcrun xctrace export --input after.trace --xpath '...' > after.xml

Troubleshooting

"Document Missing Template Error" on Export

Cause: Recording used --template flag in Xcode 26+ Fix: Use --instrument instead:

# Instead of
xcrun xctrace record --template 'Time Profiler' ...

# Use
xcrun xctrace record --instrument 'CPU Profiler' ...

"Unable to attach to process"

Causes:

  1. Process not running
  2. Insufficient permissions
  3. System Integrity Protection blocking

Fix:

# Verify process exists
pgrep -f "AppName"

# For simulator apps, verify simulator is booted
xcrun simctl list devices booted

# Try with --all-processes instead of --attach
xcrun xctrace record --instrument 'CPU Profiler' --all-processes --time-limit 5s

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:

# Symbolicate trace (if needed)
xcrun xctrace symbolicate --input trace.trace --dsym /path/to/App.dSYM

Post-Processing with filtercalltree

filtercalltree transforms call tree output for targeted analysis. It takes text files in the format produced by sample.

# 1. Capture a call tree with sample (writes to /tmp/*.sample.txt)
xcrun sample MyApp 5

# 2. Invert the call tree (show hottest leaf frames first)
xcrun filtercalltree -i /tmp/MyApp_*.sample.txt

# 3. Charge library costs to callers (attribute UIKitCore time to your code)
xcrun filtercalltree -chargeLibrary=UIKitCore /tmp/MyApp_*.sample.txt

# 4. Combine: invert + charge system libraries + prune noise
xcrun filtercalltree -i -chargeSystemLibraries -pruneCount 5 /tmp/MyApp_*.sample.txt
FlagEffect
-iInvert call tree — hottest leaf frames first (like Instruments "Invert Call Tree")
-chargeLibrary=XAttribute framework X time to your calling code (repeatable)
-chargeSystemLibrariesCharge all /System and /usr libraries to callers
-pruneCount NRemove branches with fewer than N samples
-pruneMallocSize SRemove branches with malloc size below S (e.g., 500K, 1.2M)

Companion CLI Tools

These tools complement xctrace for specific profiling needs:

# Quick CPU sample without full trace (5-second sample)
xcrun sample MyApp 5

# Sample by PID, save to file
xcrun sample 12345 5 -file output.txt

sample is lighter than xctrace — use for quick CPU checks when you don't need the full Instruments pipeline.

Limitations

  1. Privacy restrictions: Some instruments require privacy permissions granted in System Preferences
  2. Device support: Physical device profiling requires Developer Mode enabled
  3. Background apps: Limited profiling of backgrounded apps
  4. Export format: XML only (no JSON export)
  5. 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

平台分布

Claude Code

30.92%
按下载量换算441

OpenCode

23.9%
按下载量换算341

Codex

18.43%
按下载量换算263

Antigravity

13.44%
按下载量换算192

Cursor

7.78%
按下载量换算111

Gemini CLI

3.49%
按下载量换算50

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/charleswiltgen/axiom --skill axiom-xctrace-ref;npx skills add charleswiltgen/axiom --skill "axiom-xctrace-ref" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills