/why-slow — in-session perf diagnostic

SkillAI & models

'In-session diagnostic for "why is Claude hanging / slow right now?" Reads recent startup-timing

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the /why-slow — in-session perf diagnostic skill

What this skill tells your AI

The instructions your AI receives, as published by matteotitta/genesys-skills in skills/meta/session/why-slow/SKILL.md and read by ahel’s review.

When the user says "why is this slow" or invokes /why-slow, run the four checks below in parallel and emit a focused report. Goal: identify the top suspect in <30 lines so the user knows whether to restart, kill a process, or rephrase the query.

Checks (run all four in parallel via Bash)

1. Recent startup-timing log (last 10 entries)

tail -10.claude/automation/sync-pull/startup-timing.log

Look for: rising parent_age values across recent sessions (cold-start getting slower) OR a row where worktrees count spiked.

2. Current MCP processes

ps aux | grep -E "(mcp|claude.*node)" | grep -v grep | head -15

Look for: any process with high CPU% (wedged), or duplicate processes (failed handshake retrying), or processes from MCPs the user no longer uses.

3. Latest sync-pull debug log (tail)

tail -30.claude/automation/sync-pull/session-start.debug.log

Look for: timeout errors ("timeout after 10s"), gdrive/notion error messages, OAuth failures.

4. Worktree count + size

git worktree list | grep -c worktrees/
du -sh.claude/worktrees/

Look for: count >20 or size >2GB (run the worktree-cleanup runbook).

Report format (≤30 lines)

=== /why-slow diagnostic — {timestamp} ===

TOP SUSPECT: {one of: search-domain bloat | wedged MCP | OAuth-expired MCP | slow hook | no obvious slowness}

Evidence:
- {bullet 1 from the relevant check}
- {bullet 2}
- {bullet 3}

Recommended action:
- {one specific command or change}

Other observations:
- worktrees={N} ({GREEN if ≤15, YELLOW if 16-25, RED if >25})
- always-on MCPs={N} (target ≤14 per mcp-on-demand.md)
- last sync-pull: {status from debug log}

Top-suspect heuristics (in priority order)

SymptomTop suspectAction
Recent sessions show parent_age >10sSlow MCP handshakeRead.claude/rules/mcp-on-demand.md; demote a B-tier MCP
MCP process at >100% CPUWedged MCPkill -9 <pid> and the next tool call will respawn it fresh
sync-pull log shows invalid_grantOAuth-expired MCPRun the relevant recovery (see reference_gdrive_oauth_reauth.md, reference_xero_mcp_refresh.md)
Worktree count >25Search-domain bloatRun worktree-cleanup runbook
All checks clean but tool calls slowBridge latency (/remote-control) or genuinely large searchTry the same query in CLI directly (not web); scope search to specific paths

When to escalate (the report says "no obvious slowness")

If all four checks come back clean and the user still feels slowness, the bottleneck is either:

  1. Network latency (model inference) — /remote-control adds 100-500ms per tool roundtrip; nothing actionable
  2. Genuinely large operation — the user's query asked for something that requires reading many files; encourage them to scope the query

Don't fabricate a culprit. "No obvious slowness — top phases were within normal ranges" is a valid answer.

Anti-patterns

  • ❌ Don't kill MCPs without checking CPU first — a quiet MCP process is fine, only kill if visibly wedged
  • ❌ Don't recommend pruning worktrees inline — point at the runbook (it has the safety checks)
  • ❌ Don't output more than 30 lines — defeats the "focused diagnostic" purpose
  • ❌ Don't run heavy commands (broad grep, find on whole workspace) — defeats the purpose; this skill should add <2s

Related

  • Plan that birthed this skill: ~/.claude/plans/<plan>.md
  • Auto-loaded rule: .claude/rules/mcp-on-demand.md
  • Audit snapshot: .claude/automation/sync-pull/audit-2026-05-20.md
  • Worktree runbook: .claude/automation/worktree-cleanup/cleanup-runbook.md
  • Timing log: .claude/automation/sync-pull/startup-timing.log
  • Sync-pull debug log: .claude/automation/sync-pull/session-start.debug.log

Signals

GitHub stars
36
Forks
14
Last commit
Jul 2026
Advanced
Catalog kind
skill
Gateway key
why-slow
Source
github.com/matteotitta/genesys-skills