Agent skill

Instruments Profiling

by steipete in steipete/agent-scripts

Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports.

MITAuto-check passedDevelopment

Install Instruments Profiling

skills CLI
$ npx skills add steipete/agent-scripts --skill instruments-profiling -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install steipete/agent-scripts instruments-profiling --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/steipete/agent-scripts.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/instruments-profiling .claude/skills/instruments-profiling && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
instruments-profiling
GitHub stars
7.3k
Used in
2 other repos
Token cost
~937 tokens
SKILL.md length
441 words
Files
1
Skills in repo
45
Repo updated
First seen
Licence
MIT

At a glance

Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports.

  • Tasks that involve Performance optimization
  • SKILL.md covers Quick Start (CLI), Picking the Correct Binary…, Command Arguments (xctrace) and Exporting Stacks (CLI), plus 4 more sections
  • Calls xcrun

What it does

Instruments Profiling is an agent skill from steipete/agent-scripts. Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports.

Its SKILL.md is about 940 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Performance optimization. It works with iOS and macOS. The repository describes itself as: Scripts for agents, shared between my repositories. The licence is MIT.

When your agent uses it

  • Tasks that involve Performance optimization

Example prompts

  • “/instruments-profiling”

What it can do on your machine

Read from SKILL.md and the folder at commit 79150cf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • xcrun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Instruments Profiling loads about 937 tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 441 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~937

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from steipete/agent-scripts at commit 79150cf, republished under its MIT licence (© steipete). 441 words, ~937 tokens.

Download SKILL.mdSave it as .claude/skills/instruments-profiling/SKILL.md (or your agent's skills folder).
name
instruments-profiling
description
Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports.
metadata.short-description
Instruments profiling for macOS/iOS apps

Instruments Profiling (macOS/iOS)

Use this skill when the user wants performance profiling or stack analysis for native apps. Focus: Time Profiler, xctrace CLI, and picking the correct binary/app instance.

Quick Start (CLI)

  • List templates: xcrun xctrace list templates
  • Record Time Profiler (launch):
    • xcrun xctrace record --template 'Time Profiler' --time-limit 60s --output /tmp/App.trace --launch -- /path/To/App.app
  • Record Time Profiler (attach):
    • Launch app yourself, get PID, then:
    • xcrun xctrace record --template 'Time Profiler' --time-limit 60s --output /tmp/App.trace --attach <pid>
  • Open trace in Instruments:
    • open -a Instruments /tmp/App.trace

Note: xcrun xctrace --help is not a valid subcommand. Use xcrun xctrace help record.

Picking the Correct Binary (Critical)

Gotcha: Instruments may profile the wrong app (e.g., one in /Applications) if LaunchServices resolves a different bundle. Use these rules:

  • Prefer direct binary path for deterministic launch:
    • xcrun xctrace record ... --launch -- /path/App.app/Contents/MacOS/App
  • If launching .app, ensure it’s the intended bundle:
    • open -n /path/App.app
    • Verify with ps -p <pid> -o comm= -o command=
  • If both /Applications/App.app and a local build exist, explicitly target the local build path.
  • After launch, confirm the process path before trusting the trace.

Command Arguments (xctrace)

  • --template 'Time Profiler': template name from xctrace list templates.
  • --launch -- <cmd>: everything after -- is the target command (binary or app bundle).
  • --attach <pid|name>: attach to running process.
  • --output <path>: .trace output. If omitted, file saved in CWD.
  • --time-limit 60s|5m: set capture duration.
  • --device <name|UDID>: required for iOS device runs.
  • --target-stdout -: stream launched process stdout to terminal (useful for CLI tools).

Exporting Stacks (CLI)

  • Inspect trace tables:
    • xcrun xctrace export --input /tmp/App.trace --toc
  • Export raw time-profile samples:
    • xcrun xctrace export --input /tmp/App.trace --xpath '/trace-toc/run[@number="1"]/data/table[@schema="time-profile"]' --output /tmp/time-profile.xml
  • Post-process in a script (Python/Rust) to aggregate stacks.
Show full SKILL.md (166 more words)Show less

Instruments UI Workflow

  • Template: Time Profiler
  • Use “Record” and capture the slow path (startup vs steady-state)
  • Call Tree tips:
    • Hide System Libraries
    • Invert Call Tree
    • Separate by Thread
    • Focus on hot frames and call counts

Gotchas & Fixes

  • Wrong app profiled: LaunchServices resolves installed app instead of local build.
    • Fix: use direct binary path or --attach with known PID.
  • No samples / empty trace: App exits quickly or never hits work.
    • Fix: longer capture, trigger workload during recording.
  • Privacy prompts: xctrace may need Developer Tools permission.
    • Fix: System Settings → Privacy & Security → Developer Tools → allow Terminal/Xcode.
  • Large XML exports: time-profile exports are huge.
    • Fix: filter with XPath and aggregate offline; don’t print to terminal.

iOS Specific Notes

  • Device: use xcrun xctrace list devices and --device <UDID>.
  • Launch via Xcode if needed; attach with xctrace --attach.
  • Ensure debug symbols for meaningful stacks.

Verification Checklist

  • Confirm trace process path matches target build.
  • Confirm stacks show expected app frames.
  • Capture covers the slow operation (startup/refresh).
  • Export stacks for automated diffing if optimizing.

© steipete, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/instruments-profiling of steipete/agent-scripts.

Open the folder on GitHubat commit 79150cf

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in steipete/agent-scripts, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Instruments Profiling next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Instruments Profiling compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Instruments Profiling this skillsteipete/agent-scripts7.3k2 repos~937Automated safety check: PassMIT
Native App Performanceharperreed/dotfiles3344 repos~538Automated safety check: PassNone
Cmux Debugging Guidemanaflow-ai/cmux28k1 repos~1.1kAutomated safety check: PassCustom licence
Git Worktree Setupk8zdev/k8z155—~930Automated safety check: PassNone
Swiftdata ArchitectureKartikLabhshetwar/better-shot2.4k2 repos~1.2kAutomated safety check: PassCustom licence
PR Writermicrosoft/SwiftStreamingMarkdown377—~2.9kAutomated safety check: PassMIT

Similar skills

  • Native App Performance

    harperreed/dotfiles

    Native macOS/iOS app performance profiling via xctrace/Time Profiler and CLI-only analysis of Instruments traces.

    334 GitHub starsUsed in 4 repos~538 tokens
    DevelopmentAuto-check passed
  • Cmux Debugging Guide

    manaflow-ai/cmux

    Covers debug logging, the Debug menu, profiling rules and runtime pitfalls for working on the cmux macOS terminal app.

    28k GitHub starsUsed in 1 repo~1.1k tokens
    DevelopmentAuto-check passed
  • Automate git worktree creation and copy private files (not tracked in git) to new workdirs.

    155 GitHub stars~930 tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Swiftdata Architecture

    KartikLabhshetwar/better-shot

    Deep dive into SwiftData design patterns and best practices.

    2.4k GitHub starsUsed in 2 repos~1.2k tokens
    DevelopmentAuto-check passed
  • PR Writer

    microsoft/SwiftStreamingMarkdown

    Official

    Prepare and publish SwiftStreamingMarkdown pull requests end-to-end: generate PR description, commit changes, create/push branch, and open a PR when needed.

    377 GitHub stars~2.9k tokensUpdated 12 days ago
    DevelopmentAuto-check passed
  • Core Data Expert

    AvdLee/Core-Data-Agent-Skill

    Expert Core Data guidance (iOS/macOS): stack setup, fetch requests & NSFetchedResultsController, saving/merge conflicts, threading & Swift Concurrency, batch operations & persistent history…

    314 GitHub stars~1.2k tokensUpdated 23 days ago
    DevelopmentAuto-check passed

More from steipete/agent-scripts

All 45 skills in this repo
  • Mac Fleet Maintenance

    steipete/agent-scripts

    Inventories and maintains a fleet of Macs from a desired-state file: package updates, repo and Xcode sync, and disk, backup and security health reports.

    7.3k GitHub stars~4.8k tokensUpdated 2 days ago
    Auto-check passed
  • Agent Transcript for PRs

    steipete/agent-scripts

    Finds a coding agent's session log, trims and redacts it, and inserts it into a GitHub PR or issue only when the user has asked for a transcript.

    7.3k GitHub starsUsed in 1 repo~698 tokens
    Auto-check passed
  • Parallels macOS VM Lab

    steipete/agent-scripts

    Uses a clean Parallels macOS VM to test GUI automation, TCC permission prompts and screenshot tools like Peekaboo, verifying results from outside the guest.

    7.3k GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check passed
  • ClawSweeper Status

    steipete/agent-scripts

    Reports ClawSweeper's status with a bundled script: workflow health, active workers, queue health and recently merged, reviewed, commented and closed items.

    7.3k GitHub stars~972 tokensUpdated 2 days ago
    Auto-check passed
  • GitHub Project Triage

    steipete/agent-scripts

    Produces maintainer-facing triage cards for a project's GitHub issues and pull requests, each with its URL, risk, test state, blockers and a next action.

    7.3k GitHub stars~4k tokensUpdated 2 days ago
    Auto-check passed
  • Nano Banana Image Generation

    steipete/agent-scripts

    Generates and edits images with Google's Nano Banana 2 (Gemini 3.1 Flash Image) through a uv script, with a draft-then-final workflow and sizes from 512 to 4K.

    7.3k GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed

Works with

Categories

Questions about Instruments Profiling

What does Instruments Profiling do?

Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports. Instruments Profiling is an agent skill from steipete/agent-scripts. Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports.

When should I use Instruments Profiling?

Instruments Profiling fits situations like: tasks that involve Performance optimization.

How do I install Instruments Profiling in Claude Code?

Run `npx skills add steipete/agent-scripts --skill instruments-profiling -a claude-code`. Or copy the skill folder (skills/instruments-profiling in steipete/agent-scripts) into .claude/skills/instruments-profiling in your project. Claude Code loads it when a task matches its description.

How do I install Instruments Profiling in Codex?

Run `npx skills add steipete/agent-scripts --skill instruments-profiling -a codex`. Or copy the skill folder (skills/instruments-profiling in steipete/agent-scripts) into .agents/skills/instruments-profiling in your project. Codex loads it when a task matches its description.

Can I use Instruments Profiling in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add steipete/agent-scripts --skill instruments-profiling -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/instruments-profiling, .gemini/skills/instruments-profiling, .github/skills/instruments-profiling and .opencode/skills/instruments-profiling in your project.

What does Instruments Profiling need to run?

Going by SKILL.md and its folder, Instruments Profiling needs the command-line tools its instructions call (xcrun).

Does Instruments Profiling access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Instruments Profiling safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Instruments Profiling use?

Instruments Profiling is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Instruments Profiling use?

About 937 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Instruments Profiling?

Skills that share tags, products or a category with Instruments Profiling: Native App Performance (harperreed/dotfiles, 334 stars), Cmux Debugging Guide (manaflow-ai/cmux, 28k stars), Git Worktree Setup (k8zdev/k8z, 155 stars) and Swiftdata Architecture (KartikLabhshetwar/better-shot, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Instruments Profiling?

steipete (a GitHub user) maintains it in steipete/agent-scripts, which has 7,259 GitHub stars. The repository holds 45 skills in this directory. The repository was last updated on October 4, 2026.

Source: steipete/agent-scripts on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.