Philipp Schmid· @_philschmid · X·· 1 小时前AI 评分45
Gemini 4 Neon 一夜优化 Next.js 博客:成本降 55%
AI 导读
有人用一句提示词让 Gemini 4 Neon 自主跑了 13 轮,把 Next.js 博客的动态路由全部转为静态/SSG,并搭建缓存的 Sharp AVIF/WebP 与 OG 图片管线、按路由拆分 CSS/JS、加入 Speculation Rules,每轮用桌面与移动端像素级截图验证。
正文 · 原文
I pointed Gemini 4 Neon at my Next.js blog and overnight it reduced my daily cost by 50% with one prompt “Make it faster, cheaper on @vercel , modern web standards and don't change how it looks.”
Across 13 autonomous runs, it converted accidentally dynamic routes to 100% static/SSG, built a cached Sharp AVIF/WebP + OG image pipeline, scoped CSS/JS per route, and added Speculation Rules—verifying every run with pixel-level desktop & mobile screenshots.
Live 24h production results (at +63% higher traffic):
- Mobile LCP: 912ms → 380ms (2.4× faster)
- Daily infra cost: \$0.36 → \$0.16 (-55%)
- Compute: 0.94 → 0.01 GB-h/day (-99%)
- Client JS: 237KB → 142KB (-40%)
- CSS: 81KB → 37KB (-54%)
- Visual diff: 27/27 pixel-matched screenshots
Prompt in thread ⬇️
来源:Philipp Schmid · x.com