explain-sample

Capture and aggregate macOS process stack traces to identify CPU-intensive functions.

2|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/tankygranny05/agent-box --skill explain-sample
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: explain-sample
Source: https://github.com/tankygranny05/agent-box/tree/main/agent-box/seed/claude-skills/explain-sample
Command: npx skills add https://github.com/tankygranny05/agent-box --skill explain-sample

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps diagnose why a process is consuming excessive CPU or behaving unexpectedly by analyzing its internal operations.

Core Features & Use Cases

  • Process Profiling: Captures stack traces of a running process to identify CPU bottlenecks.
  • High CPU Diagnosis: Pinpoints functions or code sections responsible for high CPU usage.
  • Use Case: If a background service is suddenly using 100% CPU, you can use this Skill to quickly see what functions it's spending all its time in, leading you to the root cause.

Quick Start

Use the explain-sample skill to profile the process with PID 12345 for 5 seconds and save the output to a file.

Frequently Asked Questions about explain-sample

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose high CPU usage by a process on macOS?

To diagnose high CPU usage on macOS, you can profile the process by capturing and aggregating stack traces to identify CPU-intensive functions responsible for the behavior.

What is the best way to profile a running process to find CPU bottlenecks?

Profiling a running process involves capturing its stack traces over a specific duration to pinpoint exact functions or code sections spending excessive time and causing CPU bottlenecks.

Can I use this approach to debug interpreted or JIT-compiled applications?

Yes, this stack trace analysis approach supports debugging compiled, interpreted, and JIT-compiled applications to resolve unexpected behavior or process hangs on macOS.

Do I need the sample command-line utility to capture stack traces on macOS?

Yes, you need the sample command-line utility available on macOS to capture and aggregate the stack traces required for identifying CPU-intensive functions.

How do I profile a macOS process with a specific PID for a few seconds?

You can profile a macOS process by targeting its PID, capturing stack traces for a duration like 5 seconds, and saving the output to a file for analysis.