Token导航 LogoToken导航TokenDH.com
前端设计只读github未标认证来源可访问许可证需确认审计通过

instruments-analyzer仪器分析仪

Agent Skill

instruments-analyzer 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

218

周安装

9

GitHub Stars

21

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jlreyes/instruments-analyzer --skill instruments-analyzer

简介

instruments-analyzer 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适用于围绕仓库状态、代码变更或协作事项进行整理的任务场景。
  • 支持对 GitHub 相关协作信息和代码变更的处理与跟踪。
  • 安装前需确认权限范围、维护状态及是否触发联网或命令执行。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Instruments Analyzer

This tool gives you programmatic access to Apple Instruments trace data. Instruments is normally a GUI tool — this tool bridges the gap by exporting .trace files into DuckDB, where you can query them with SQL.


When to use this tool

  • You have (or want to record) an Instruments .trace file
  • You want to analyze performance data: CPU profiling, hitches, hangs, signposts, Core Animation, SwiftUI updates, RunLoop activity, etc.
  • You want root-cause analysis backed by frame-level or event-level evidence

For scroll & animation jank diagnosis: See scroll_and_animation.md — a frame-first workflow for isolating interaction windows, ranking dropped frames, cascade analysis, per-frame attribution, and producing a prioritized fix plan.


Workflow overview

  1. Record a trace (or use an existing one)
  2. Export the trace to DuckDB
  3. Explore the exported tables
  4. Prepare derived views (optional, for frame-level analysis)
  5. Analyze using SQL queries against the DuckDB database

Step 1: Record a trace

Use xctrace to record from the command line:

# Attach to a running app
xcrun xctrace record --template 'SwiftUI' --time-limit 20s \
  --output ./traces/recording.trace \
  --attach AppName --no-prompt

# Or launch the app
xcrun xctrace record --template 'SwiftUI' --time-limit 20s \
  --output ./traces/recording.trace \
  --launch /path/to/App.app --no-prompt

You can also use the included PerfDebugging.tracetemplate in Instruments.

Choosing a template

  • SwiftUI: SwiftUI view updates, hitches, Core Animation, signposts
  • Time Profiler: CPU sampling with backtraces
  • Animation Hitches: Frame lifetimes, hitch detection
  • Custom: Combine instruments as needed

Use xcrun xctrace list templates to see available templates.


Step 2: Export to DuckDB

The export script converts an Instruments .trace file into a DuckDB database with Parquet backing:

./scripts/export_to_duckdb.py traces/recording.trace traces/recording/analysis.duckdb

The script:

  • Uses uv run via shebang — run it directly (not with python3)
  • Requires uv
  • Creates any missing parent directories for the output path
  • Exports each Instruments table as a compressed Parquet file
  • Creates a DuckDB database with views referencing the Parquet files

If key tables are empty after export, recommend a different Instruments template or a longer recording.


Step 3: Explore the exported tables

After export, connect to the DuckDB database and explore what's available:

-- List all tables/views
SHOW TABLES;

-- Check row counts
SELECT 'updates' AS tbl, COUNT(*) AS rows FROM updates
UNION ALL SELECT 'hitches', COUNT(*) FROM hitches
UNION ALL SELECT 'time_profile', COUNT(*) FROM time_profile
UNION ALL SELECT 'os_signpost_intervals', COUNT(*) FROM os_signpost_intervals
UNION ALL SELECT 'runloop_intervals', COUNT(*) FROM runloop_intervals
UNION ALL SELECT 'potential_hangs', COUNT(*) FROM potential_hangs;

Key tables

TableWhat it contains
updatesIndividual SwiftUI view body evaluations
update_groupsBatched SwiftUI transaction groups
hitchesDetected animation hitches (frame drops)
hitches_frame_lifetimesComplete frame lifetime data
hitches_updates / hitches_renders / hitches_gpu / hitches_framewaitPer-phase frame data
time_profileCPU sampling with backtraces
os_signpost_intervalsSignpost intervals (begin/end pairs)
os_signpostSignpost point events
os_logLog messages from os_log
runloop_intervalsRunLoop activity (main thread scheduling)
coreanimation_context_intervalsCA rendering phases (Layout, Display, Prepare, Commit)
coreanimation_lifetime_intervalsCA frame lifetimes with acceptable latency thresholds
potential_hangsDetected hangs and unresponsiveness
life_cycle_periodsApp lifecycle transitions
swiftui_causesSwiftUI dependency/causality graph
swiftui_changesSwiftUI change events with backtraces

Full schema reference: SCHEMAS.md

Common exploration queries

-- Signpost overview (what instrumentation exists)
SELECT
  name, category, subsystem,
  COUNT(*) AS n,
  MAX(CAST(duration_ns AS BIGINT))/1e6 AS max_ms
FROM os_signpost_intervals
WHERE name IS NOT NULL
GROUP BY 1,2,3
ORDER BY max_ms DESC
LIMIT 50;
-- Worst hitches
SELECT start_ns/1e9 AS time_s, duration_ns/1e6 AS ms, narrative_description
FROM hitches
ORDER BY duration_ns DESC
LIMIT 20;
-- Heaviest CPU backtraces
SELECT
  COUNT(*) AS samples,
  SUM(weight_ns)/1e6 AS approx_ms,
  backtrace_json
FROM time_profile
WHERE backtrace_json IS NOT NULL
GROUP BY backtrace_json
ORDER BY approx_ms DESC
LIMIT 10;
-- Hang summary
SELECT hang_type, COUNT(*) AS count, MAX(duration_ns)/1e6 AS max_ms
FROM potential_hangs
GROUP BY hang_type
ORDER BY max_ms DESC;

Step 4: Prepare derived views (for frame analysis)

The prepare_analysis.py script creates analysis-ready views on top of the raw exported data:

./scripts/prepare_analysis.py traces/recording/analysis.duckdb

This creates a frames view from hitches_frame_lifetimes with:

  • Computed missed_frames count
  • Severity buckets (Low / Medium / High / Extreme)
  • Inferred frame budget from coreanimation_lifetime_intervals.acceptable_latency_ns
  • Falls back to 60fps (16.67ms) if unavailable

Override for 120fps displays:

./scripts/prepare_analysis.py traces/recording/analysis.duckdb --budget-ms 8.33

Frame-specific cascade analysis

Analyze a specific frame with surrounding context:

./scripts/prepare_analysis.py traces/recording/analysis.duckdb --swap-id 166871
./scripts/prepare_analysis.py traces/recording/analysis.duckdb --swap-id 166871 --context-frames 10

This outputs:

  • Target frame details
  • Preceding frames with budget status
  • Root cause identification (first over-budget frame in a cascade)
  • Signposts and logs during the root cause frame

Time units

  • All timestamps and durations are in nanoseconds
  • start_ns is relative to trace start (not wall clock)
  • Convert: duration_ns / 1e6 for milliseconds, start_ns / 1e9 for seconds
  • os_signpost_* timestamps are strings — cast to BIGINT when comparing

Use-case companion resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.16%
按下载量换算24

Claude

33.08%
按下载量换算23

Cursor

17.29%
按下载量换算12

Gemini CLI

10.28%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills