Command Palette

Search for a command to run...

Назад к скиллам
скилл № 12803

axiom-hang-diagnostics

Use when app freezes, UI unresponsive, main thread blocked, watchdog termination, or diagnosing hang reports from Xcode Organizer or MetricKit

БесплатноБез исполняемых скриптов
ComeOnOliverот ComeOnOliver★ 67 звёзд на GitHub

Установить axiom-hang-diagnostics в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Hang Diagnostics

Systematic diagnosis and resolution of app hangs. A hang occurs when the main thread is blocked for more than 1 second, making the app unresponsive to user input.

Red Flags — Check This Skill When

Symptom This Skill Applies
App freezes briefly during use Yes — likely hang
UI doesn't respond to touches Yes — main thread blocked
"App not responding" system dialog Yes — severe hang
Xcode Organizer shows hang diagnostics Yes — field hang reports
MetricKit MXHangDiagnostic received Yes — aggregated hang data
Animations stutter or skip Maybe — could be hitch, not hang
App feels slow but responsive No — performance issue, not hang

What Is a Hang

A hang is when the main runloop cannot process events for more than 1 second. The user taps, but nothing happens.

User taps → Main thread busy/blocked → Event queued → 1+ second delay → HANG

Key distinction: The main thread handles ALL user input. If it's busy or blocked, the entire UI freezes.

Hang vs Hitch vs Lag

Issue Duration User Experience Tool
Hang >1 second App frozen, unresponsive Time Profiler, System Trace
Hitch 1-3 frames (16-50ms) Animation stutters Animation Hitches instrument
Lag 100-500ms Feels slow but responsive Time Profiler

This skill covers hangs. For hitches, see axiom-swiftui-performance. For general lag, see axiom-performance-profiling.

The Two Causes of Hangs

Every hang has one of two root causes:

1. Main Thread Busy

The main thread is doing work instead of processing events.

Subcategories:

Type Example Fix
Proactive work Pre-computing data user hasn't requested Lazy initialization, compute on demand
Irrelevant work Processing all notifications, not just relevant ones Filter notifications, targeted observers
Suboptimal API Using blocking API when async exists Switch to async API

2. Main Thread Blocked

The main thread is waiting for something else.

Subcategories:

Type Example Fix
Synchronous IPC Calling system service synchronously Use async API variant
File I/O Data(contentsOf:) on main thread Move to background queue
Network Synchronous URL request Use URLSession async
Lock contention Waiting for lock held by background thread Reduce critical section, use actors
Semaphore/dispatch_sync Blocking on background work Restructure to async completion

Decision Tree — Diagnosing Hangs

START: App hangs reported
  │
  ├─→ Do you have hang diagnostics from Organizer or MetricKit?
  │     │
  │     ├─→ YES: Examine stack trace
  │     │     │
  │     │     ├─→ Stack shows your code running
  │     │     │     → BUSY: Main thread doing work
  │     │     │     → Profile with Time Profiler
  │     │     │
  │     │     └─→ Stack shows waiting (semaphore, lock, dispatch_sync)
  │     │           → BLOCKED: Main thread waiting
  │     │           → Profile with System Trace
  │     │
  │     └─→ NO: Can you reproduce?
  │           │
  │           ├─→ YES: Profile with Time Profiler first
  │           │     │
  │           │     ├─→ High CPU on main thread
  │           │     │     → BUSY: Optimize the work
  │           │     │
  │           │     └─→ Low CPU, thread blocked
  │           │           → Use System Trace to find what's blocking
  │           │
  │           └─→ NO: Enable MetricKit in app
  │                 → Wait for field reports
  │                 → Check Organizer > Hangs

Tool Selection

Scenario Primary Tool Why
Reproduces locally Time Profiler See exactly what main thread is doing
Blocked thread suspected System Trace Shows thread state, lock contention
Field reports only Xcode Organizer Aggregated hang diagnostics
Want in-app data MetricKit MXHangDiagnostic with call stacks
Need precise timing System Trace Nanosecond-level thread analysis

Time Profiler Workflow for Hangs

  1. Launch Instruments → Select Time Profiler template
  2. Record during hang → Reproduce the freeze
  3. Stop recording → Find the hang period in timeline
  4. Select hang region → Drag to select frozen timespan
  5. Examine call tree → Look for main thread work

What to look for:

  • Functions with high "Self Time" on main thread
  • Unexpectedly deep call stacks
  • System calls that shouldn't be on main thread

System Trace Workflow for Blocked Hangs

  1. Launch Instruments → Select System Trace template
  2. Record during hang → Capture thread states
  3. Find main thread → Filter to main thread
  4. Look for red/orange → Blocked states
  5. Examine blocking reason → Lock, semaphore, IPC

**Threa

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл axiom-hang-diagnostics?

Use when app freezes, UI unresponsive, main thread blocked, watchdog termination, or diagnosing hang reports from Xcode Organizer or MetricKit

Как установить скилл axiom-hang-diagnostics?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл axiom-hang-diagnostics запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить axiom-hang-diagnostics с