Real Agent Cases

Diagnose why your Mac is running slow with Claude Code

Posted
by Anthony Roux (via Lenny's Newsletter)
Last checked
Method:
How we verify

Evidence: Article or interviewA newsletter, journalist or interview account of what happened.

Outcome

Anthony Roux uses Claude Code to check load, memory pressure, disk space, stuck processes and swap, dig into causes like caches, Docker and Time Machine snapshots, explain the results and suggest fixes with risk notes.

Agent

Claude Code

Prompt Recreated prompt

The source didn't share its exact prompt, so we wrote this from what it describes.

Here's a task I'd like your help with. Read it all the way through before you start.

Goal: Find out why my Mac is running slow and tell me how to fix it.

Check with me first: When did it start, and is it slow all the time or only sometimes?

What I'll give you:
- My Mac, with permission for you to run read-only checks

Rules:
- Check load, memory, disk space, stuck processes and swap first.
- Explain what the numbers mean in plain language.
- For each fix, give the exact command and how risky it is.
- Don't delete or change anything without my OK.

Output: What's slowing it down, why, and a list of fixes from safest to riskiest.

If anything here is unclear or missing, ask me instead of guessing.

You'll know it worked when: I know the cause and have a safe fix to try first.

Try this in:

Sends the Recreated prompt shown above. ChatGPT and Grok open with it filled in, and ChatGPT may send it straight away. Gemini opens empty, so we copy the prompt for you to paste. Every button also copies it.

The source used Claude Code, which can take actions on your computer or in a browser. These are general chat tools, so results may differ, and a normal chat may only give you a plan.

Opens in a new tab. We don't see what you send.

These links are only a shortcut. We're not affiliated with OpenAI, Google or xAI, and your results may not match the source.

Optional stronger version

Our rewrite with extra checks. The poster didn't test it.

Here's a task I'd like your help with. Read it all the way through before you start.

Goal: Find out why my Mac is slow and give me safe fixes, using read-only checks first.

Quick check first: tell me if anything below is missing or unclear.

Inputs (fill in or confirm):
- My Mac (permission for read-only commands)
- When it started and when it's slow
- macOS version and Mac model

Rules:
- Check load, memory pressure, swap, disk space, CPU-heavy and stuck processes, login items and Spotlight indexing.
- Explain each number in plain words and what's normal.
- Rank causes by evidence.
- Suggest fixes from least to most invasive.

Checkpoint: Ask before killing processes, deleting files or changing settings.

If you get stuck: If a command needs sudo, explain why and let me run it. If a login, CAPTCHA or two-step code appears, stop and ask me to handle it; never guess or store passwords.

Verify before you finish: After a fix, re-measure the same numbers.

Output: Findings, before/after numbers and fixes applied.

Done when: the Mac is measurably faster and I know why it was slow.

Source

https://www.lennysnewsletter.com/p/everyone-should-be-using-claude-code

  • Diagnose a Kubernetes pod-scheduling outage with Claude CodeRecreated promptEvidence: Company case study

    Anthropic's Data Infrastructure team gave Claude Code dashboard screenshots, and it traced the problem to pod IP exhaustion and supplied the commands to add a new IP pool; Anthropic says this saved about 20 minutes during an outage.

    According to Anthropic:20 minutes saved during an outage

    Claude Code · Ops · Source date:

  • Clear a clogged sink with Gemini Live guiding each stepRecreated promptEvidence: Described by posterBeginner-friendly

    Instead of calling a plumber, the poster used Gemini Live, which guided them through the job, said what to buy and what might be causing the clog; they cross-checked the advice with Claude Opus. In about 15 minutes the sink was fixed, and the poster says they now understand how it works.

    Gemini Live, Claude · Personal · Source date:

  • Using the poster's logged-in browser, Claude in Chrome submitted a bug report to DigitalOcean after finding warnings in the logs.

    Claude in Chrome · Ops · Source date: