macos-perf
Activity Monitor, Instruments, top/htop, memory pressure, thermal state, powermetrics, profiling
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o macos-perf.zip https://jpskill.com/download/22247.zip && unzip -o macos-perf.zip && rm macos-perf.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22247.zip -OutFile "$d\macos-perf.zip"; Expand-Archive "$d\macos-perf.zip" -DestinationPath $d -Force; ri "$d\macos-perf.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
macos-perf.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
macos-perfフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
macos-perf
Purpose
This skill enables monitoring and profiling macOS system performance using native tools, focusing on CPU, memory, thermal, and power metrics to identify bottlenecks and optimize applications.
When to Use
Use this skill for diagnosing high CPU usage in apps, investigating memory leaks, profiling resource-intensive processes, checking thermal states during heavy workloads, or analyzing power consumption on macOS devices.
Key Capabilities
- Monitor real-time system metrics via Activity Monitor or
top/htopfor CPU, memory, and network usage. - Profile applications with Instruments, capturing detailed traces for CPU, memory, and energy.
- Check memory pressure using
vm_statto detect low-memory conditions. - Query thermal state via
powermetricsfor CPU/GPU temperatures and fan speeds. - Analyze power metrics with
powermetricsto measure battery drain and efficiency. - Use command-line tools like
top -o cpufor sorted process lists orinstruments -s devicesfor available templates.
Usage Patterns
Invoke this skill in scripts for automated monitoring or integrate into AI workflows for real-time analysis. For example, run periodic checks in a loop for server-like macOS setups, or trigger profiling when an app exceeds resource thresholds. Always specify exact tools and flags based on the task; e.g., use top for quick views and Instruments for deep dives. If integrating with automation, export data to JSON for parsing.
Common Commands/API
- Use
top -o cpu -s 1to display processes sorted by CPU usage, updating every second; pipe output togrepfor filtering, e.g.,top -o cpu | grep "MyApp". - Check memory pressure with
vm_stat | grep "Pages"to get free pages; sample code:output = subprocess.run(['vm_stat'], capture_output=True).stdout free_pages = int(re.search(r'free:\s+(\d+)', output.decode()).group(1)) - Run
powermetrics --samplers cpu,thermal -i 1000for CPU and thermal data every 1 second. - Launch Instruments via CLI:
instruments -w <device> -t Time Profiler -D output.trace /path/to/app; use exported .trace files for analysis. - For thermal state, use
ioreg -l | grep "Ambient"to parse ambient temperature from system registry. - No API keys required for these tools; they run natively on macOS.
Integration Notes
Integrate by wrapping commands in Python or shell scripts; set environment variables for custom paths, e.g., export INSTRUMENTS_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/instruments. For data export, use plutil to convert .plist outputs to JSON. If combining with other skills, ensure macOS version compatibility (e.g., Instruments requires Xcode); check via sw_vers -productVersion. Avoid running multiple intensive tools simultaneously to prevent resource contention.
Error Handling
Check command exit codes; for example, if top fails, verify with echo $? and handle by logging errors or retrying. For Instruments, parse stderr for messages like "Template not found" and fallback to alternatives. Use try-except in scripts, e.g.:
try:
result = subprocess.run(['instruments', '-t', 'Time Profiler'], check=True)
except subprocess.CalledProcessError as e:
print(f"Error: {e.returncode} - {e.output}")
Common issues include permission errors (run with sudo) or missing dependencies (install Xcode command line tools via xcode-select --install).
Concrete Usage Examples
- To monitor CPU usage of a specific process: Run
top -pid <processID> -o cpuin a loop script, then analyze output to alert if usage > 80%; example script line:while true; do top -pid 1234 -l 1 | grep CPU; sleep 5; done. - For profiling an app's memory: Use
instruments -t Allocations -D profile.trace /Applications/MyApp.app, then open the trace in Instruments GUI to identify leaks; integrate by scripting:instruments ... && open profile.trace.
Graph Relationships
- Related to: macos cluster (e.g., macos-core for basic system ops), performance tag (links to general profiling skills), profiling tag (connects to app optimization tools).
- Dependencies: Requires macos cluster skills for foundational access; no direct API links.