## Phase 1 — Full speed audit

Role: you are a senior web performance engineer with experience optimizing sites that serve more than 10M visitors a month.

My website's code (full HTML, CSS and JavaScript): [paste code or URL structure]

Task: run a complete audit of the site's speed and find everything that slows it down, including:
- render-blocking resources
- assets that are not compressed
- a DOM that is too large
- CSS and JS that is never used
- heavy third-party scripts
- weak caching
- layout shifts

Rank every issue you find by its impact.

## Phase 2 — Images and static assets

Context: we are optimizing the speed of my website, using the code I shared. If you do not have it yet, ask me to paste it.

Task: look only at my images and static assets and tell me:
1. which images are too heavy, and the size each one should have
2. which formats to convert them to (WebP, AVIF)
3. where lazy loading is needed, and how to implement it
4. which CSS and JS files should be minified or merged
5. where my fonts load inefficiently

For every fix, give me the exact updated code.

## Phase 3 — Render-blocking resources

Context: we are optimizing the speed of my website, using the code I shared. If you do not have it yet, ask me to paste it.

Task: analyze the critical rendering path of my site and list every CSS and JavaScript file that blocks rendering. Then:
1. refactor my CSS so the critical above-the-fold styles are extracted and inlined
2. defer every CSS file that is not critical
3. give async or defer to each JavaScript file that is not needed first
4. rewrite the order in which resources load so the browser paints the page as quickly as possible

Give me the complete updated head section and the related code.

## Phase 4 — Caching and server setup

Context: we are optimizing the speed of my website. My hosting: [Apache/Nginx/Vercel/Netlify]

Task: write a complete strategy for caching and server-side optimization. Include:
1. a full browser caching policy, with the exact cache-control headers for each file type
2. a plan to implement a CDN
3. instructions to set up GZIP/Brotli compression
4. DNS prefetch and preconnect tags for every third-party resource
5. an .htaccess or server configuration file I can copy and paste as is

## Phase 5 — Core Web Vitals and deploy checklist

Context: we are optimizing the speed of my website, using the code I shared. If you do not have it yet, ask me to paste it.

Task: optimize the site for Google's Core Web Vitals. The metrics:
- LCP, i.e. Largest Contentful Paint
- FID/INP, i.e. Interaction to Next Paint
- CLS, i.e. Cumulative Layout Shift

For every metric:
1. say which parts of the code are the likely problem areas
2. give the exact fix, with updated code
3. explain what a "good" score looks like

Finish with a performance checklist I can go through before every future deployment, so the site's speed never drops again.
