Agent skill
profile
Analyze speedscope profiles from Alt-Tabby's built-in profiler
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/profile-cwilliams5-alt-tabby
SKILL.md
Analyze a profiling session captured by Alt-Tabby's --profile build. The user may provide additional context (specific file, focus area, comparison instructions, or multiple files to analyze together).
File Resolution
Resolve the profile file(s) using the argument (if any):
- No argument: Use
release/recorder/, pick the newestprofile_*.speedscope.jsonby modification time - Count (e.g., "3 newest", "last 2"): Load that many newest profiles from
release/recorder/ - Exact filename (no path separators): Search
release/recorder/for a matching file - Full path: Use as-is
- "today" or "from today": All
profile_*.speedscope.jsonfiles from today inrelease/recorder/
Use ls -t release/recorder/profile_*.speedscope.json to find files. Confirm the resolved file path(s) to the user before analyzing.
Analysis Steps
Run these via python tools/query_profile.py <file>:
-
Summary (no flags) — always run first. Show the table to the user.
-
Reentrancy check (
--reentrant) — always run. Flag any reentrant calls as potential bugs. -
Deep dive — based on the summary, pick the top 2-3 functions by total time and run
--function <name>on each. Usequery_timers.ps1to check if hot functions are timer callbacks — this helps interpret high call counts (timer-driven vs event-driven). Focus on:- Unexpected caller chains (who is triggering this function and should they be?)
- High call counts relative to session activity
- Large max vs avg gaps (outliers worth investigating)
-
User focus — if the user specified a focus area (e.g., "investigate animation draw times", "look at komorebi processing"), prioritize functions related to that area in the deep dive.
Multi-Profile Comparison
When analyzing multiple profiles:
- Run summary on each, present side-by-side
- Highlight differences: functions that appear in one but not others, significant count/time changes
- If the user described what varies between recordings (e.g., "different workspace switch types"), correlate the differences with the described scenarios
Reporting
Present findings as:
- Session overview: duration, CPU%, key activity counts (switches, Alt-Tab cycles, etc.)
- Hot spots: top functions with actionable observations
- Anomalies: reentrancy, outlier calls, unexpected callers
- Comparison: if multiple profiles or the user mentions a previous profile, compare before/after metrics
Keep it concise — tables over prose. The user knows the codebase.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?