Skill

Diagnose and Resolve Claude Performance Issues

Diagnoses whether Claude Code lag is a local system bottleneck or an API issue, via a fast CPU/RAM/disk/network health check.


71
Spark score
out of 100
Updated last month
Version 13.1.1
Models
claude

Add to Favorites

Why it matters

Diagnose and resolve performance bottlenecks affecting Claude Code and your local system. This skill identifies whether the issue lies with your PC or the Claude API, providing actionable insights and reports.

Outcomes

What it gets done

01

Perform a rapid health check of CPU, RAM, disk, and network latency.

02

Analyze browser and Claude Code resource consumption.

03

Generate system health reports with clear summaries and suggestions.

04

Offer automated corrective actions for identified performance issues.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-claude-monitor | bash

Overview

Claude Monitor - Performance Diagnostics

Diagnoses Claude Code and system slowness by measuring CPU, RAM, browser process load, disk space, and network latency to Claude's API in about 3 seconds, classifying the bottleneck (CPU, RAM, browsers, disk, network, or Claude API) and suggesting specific corrective actions. Use it whenever the user reports Claude Code feeling slow, laggy, or freezing, slow conversation-session switching, or slow responses. Not for tasks outside this diagnostic domain.

What it does

Claude Monitor diagnoses whether Claude Code slowness is caused by the local machine or by the Claude API, then suggests corrective action. The first step is always health_check.py, which analyzes the system in about 3 seconds: CPU usage overall and per core (>80% is a likely bottleneck), RAM total/used/available (>85% is memory pressure), browser processes and RAM per browser (>5GB total means too many tabs), Claude Code's own process and RAM usage, free disk space (<10% affects swap and general performance), and network latency to the Claude API endpoint. It returns a JSON diagnosis with a classified bottleneck (cpu, ram, browsers, disk, network, claude_api, or ok), a severity (critical, warning, ok), a list of suggested actions, and a plain-language summary to show the user.

When to use - and when NOT to

Use it whenever a user reports Claude Code feeling slow or freezing, slow session switching between conversations, slow Claude responses, or the PC generally feeling sluggish while using Claude Code - any mention of lag or slowness. Corrective actions are diagnosis-specific: high CPU means listing top CPU-consuming processes and checking for background updates; heavy browsers (>5GB RAM or >40 processes) means running health_check.py --browsers-detail to see RAM per browser and suggesting which to close - but never closing processes without explicit user permission; a nearly full disk means showing the largest folders and suggesting temp/cache/trash cleanup; slow network (>500ms latency) means testing the connection to api.anthropic.com and checking VPN/proxy/WiFi.

Inputs and outputs

Reference thresholds classify each metric as OK/warning/critical: CPU under 60%/60-85%/over 85%, RAM used under 70%/70-85%/over 85%, browser RAM under 3GB/3-6GB/over 6GB, browser process count under 30/30-60/over 60, free disk over 15%/10-15%/under 10%, network latency under 200ms/200-500ms/over 500ms. For ongoing monitoring, monitor.py --interval 30 --duration 300 (configurable interval, duration, alert thresholds, log output path) takes periodic snapshots and produces a final report with CPU/RAM peaks, a trend (improving/worsening/stable), detected alert events, and a recommendation. api_bench.py measures the local Claude Code process's response time (not actual API calls) and compares it against typical timings to indicate whether performance is within expected range.

Integrations

Runs on Python 3.10+ with psutil (auto-installed if missing) and requires no API key. Contextual tips explain common causes: many browser tabs each being a separate competing process, Claude Code's own Electron processes normally using 3-5GB (more with multiple sessions open), slow session switching usually tracing back to CPU contention while conversation history loads, and a near-full disk degrading virtual memory/swap performance broadly.

Who it's for

Users experiencing Claude Code slowness who want a fast, evidence-based diagnosis of whether the problem is their machine or the API, plus a specific next action, instead of guessing or restarting things at random.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.