u/Alex-S-Hamilton

Opus is ridiculous for frontend cleanup
▲ 279 r/ClaudeAI

Opus is ridiculous for frontend cleanup

I love Opus.

First I tuned one page, got the PageSpeed result where I wanted it, and wrote the whole thing down in ADR_pagespeed-l0-fixes-playbook.md.

Then I opened a fresh session, gave it the remaining 9 pages, and pointed it at the playbook.

Opus created three subagents by itself, split the work between them, and about 15 minutes later they had touched 41 frontend files that powered those pages.

Same result across the set. Basically perfect Lighthouse numbers again.

Not gonna lie, this is the kind of workflow where I stop thinking “chatbot” and start thinking “tiny frontend team that doesn’t complain about boring cleanup.”

***upd***

A PSI playbook is basically just a messy checklist I made from fixing one page manually.

I took one page, ran it through PageSpeed Insights, pasted all the PSI issues into Opus, and fixed them one by one until the score was good. After that I asked Opus to write down everything we changed into a .md file: what the issue was, what caused it in my codebase, what files were touched, how to check it after, and what not to repeat.

Then for the next pages I didn’t start from zero. I gave Claude (w/o PSI report) all other frontend pages in repo + that playbook and said: use this as a checklist, don’t redo shared stuff that was already fixed, and look for the same patterns on all this pages.

For me it was stuff like: font preload, GTM/gtag loading too early, Supabase SDK leaking into client chunks, hidden burger drawer hydrating before LCP, global CSS being too fat, bad Next Image sizes, ARIA/contrast fixes, etc.

So it’s not really a “skill” in Claude. More like project-specific notes from the first painful cleanup pass. The useful part is that Claude stops rediscovering the same problems every page and just follows the trail.

u/Alex-S-Hamilton — 6 days ago