Skip to content
Back to skills

Wsl Cursor Health

ASecurity

Diagnose WSL2 + Cursor/Claude performance on a Windows PC (Ubuntu/WSL intensive coding): memory/swap pressure, load, disk, inotify, tsserver/extensionHost RSS, Linux and Windows Cursor caches, .wslconfig, and VHDX size. Use when the user asks to check caches, WSL shutdown, lag, swap, slow IDE, memory pressure, clear caches, compact VHD, or whether the machine needs a reset after heavy agent/context sessions. Prefer detect-then-recommend; never auto wsl --shutdown.

  • 2 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 26, 2026
developmenttypescriptshellbashnodegitperformance

Works with

  • claude code
  • cursor
  • mcp

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned October 26, 2026

npx -y skills add JoshuaShepherd/my-skills --skill wsl-cursor-health --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Wsl Cursor Health?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Wsl Cursor Health
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/joshuashepherd-wsl-cursor-health/badge)](https://www.skillsdirectory.com/skills/joshuashepherd-wsl-cursor-health)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: wsl-cursor-health
description: >-
  Diagnose WSL2 + Cursor/Claude performance on a Windows PC (Ubuntu/WSL intensive
  coding): memory/swap pressure, load, disk, inotify, tsserver/extensionHost RSS,
  Linux and Windows Cursor caches, .wslconfig, and VHDX size. Use when the user
  asks to check caches, WSL shutdown, lag, swap, slow IDE, memory pressure,
  clear caches, compact VHD, or whether the machine needs a reset after heavy
  agent/context sessions. Prefer detect-then-recommend; never auto wsl --shutdown.
---

# WSL + Cursor health

You are on a **Windows PC** doing intensive context coding with **Cursor** (and
often Claude in-app / Claude Code) against **Ubuntu on WSL2**. When this skill
is invoked, **run the probe first**, then report findings and remediation in
severity order. Do not jump to `wsl --shutdown` or cache wipes without evidence.

## Invoke immediately

From any workspace (script is absolute-path safe):

```bash
bash /home/josh/dev/01-Movemental-Core/my-skills/cursor/wsl-cursor-health/scripts/check-health.sh
```

Or after install (`~/.cursor/skills/wsl-cursor-health` → my-skills):

```bash
bash ~/.cursor/skills/wsl-cursor-health/scripts/check-health.sh
```

Parse the trailing `MACHINE_SUMMARY` line (`severity=OK|WARN|CRIT`, `codes=...`).

## Progress checklist

```
wsl-cursor-health:
- [ ] 1 Run check-health.sh
- [ ] 2 Classify severity from MACHINE_SUMMARY + Findings
- [ ] 3 Soft fixes first (reload TS / window) when WARN
- [ ] 4 Safe cache clear only if sizes flagged + user confirms
- [ ] 5 Recommend wsl --shutdown from Windows only when CRIT/swap/session warrants
- [ ] 6 Optional: .wslconfig / VHDX compact guidance
- [ ] 7 Short report: what is wrong, what to do, what not to do
```

## Hard rules

- **Detect, then recommend.** Never run destructive cleanup unprompted.
- **Never run `wsl --shutdown` from inside WSL** as an “agent action” that you expect to continue afterward — it kills the distro (and this session). Tell the user to run it in **Windows PowerShell or cmd**.
- **Never delete** `~/.cursor/projects`, Claude transcripts, `.git`, `.env*`, or `node_modules` as part of this skill.
- Safe Linux clears require `CONFIRM=1` via `scripts/clear-safe-caches.sh`.
- Windows Cursor `Cache` / `CachedData` clears require **Cursor fully quit** first.
- Prefer soft IDE fixes before VM restart when severity is WARN.

## Severity → action

| Severity | Typical signals | Agent response |
|----------|-----------------|----------------|
| **CRIT** | High swap (≥40% or ≥2GiB), tiny MemAvailable, disk ≥90%, extreme tsserver RSS | Lead with **save work → `wsl --shutdown` from Windows → reopen**. Then re-probe. |
| **WARN** | Moderate swap, elevated RAM, fat caches, long uptime, busy extensionHost | Soft fixes first; optional safe cache clear; shutdown if still bad. |
| **OK** | No thresholds crossed | Say healthy; mention re-run after multi-hour agent marathons. |

## Soft fixes (try before shutdown)

Ask the user (or guide them) in this order when WARN and swap is not critical:

1. **TypeScript: Restart TS Server** (tsserver RSS flagged)
2. **Developer: Reload Window** (extensionHost / stale MCP children)
3. Close unused Cursor windows/workspaces on large monorepos
4. Kill obvious orphaned `node`/`vite`/`playwright` children only if clearly stale (confirm PIDs)

## Safe cache clear (Linux)

Only when the probe flagged sizes and the user agrees:

```bash
CONFIRM=1 bash ~/.cursor/skills/wsl-cursor-health/scripts/clear-safe-caches.sh npx trash
# or: playwright | vite | all
```

## WSL shutdown (Windows host)

When CRIT swap/memory or long uptime + swap WARN that soft fixes did not clear:

```powershell
wsl --shutdown
```

Then reopen Cursor / Ubuntu. Re-run `check-health.sh`.

Optional compact (host disk pressure / large `ext4.vhdx`) — details in [reference.md](reference.md).

## Report format

Keep it short:

```markdown
## Verdict: CRIT|WARN|OK — <one line>

### Signals
- ...

### Do now
1. ...

### Optional later
- ...

### Do not
- Auto-shutdown from WSL / wipe project state / delete node_modules
```

## Extra detail

Thresholds, `.wslconfig` knobs, Windows cache paths, VHDX compact: [reference.md](reference.md).

Files in this skill

  • SKILL.md4.1 KB
  • reference.md4.1 KB
  • scripts/check-health.sh13.3 KB
  • scripts/clear-safe-caches.sh1.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.