enhance-web-instant-nav
Installation
SKILL.md
Surface router:
/uiux. You are here:enhance-web-instant-nav.
enhance-web-instant-nav — Instant Navigations
Degree of freedom: MIXED. Which pages to speculate [HIGH freedom];
the exclusion list, Sec-Purpose handling, and re-measure [LOW freedom — run exactly].
Applies to MPAs and Next.js App Router (server-rendered routes). Pure SPA routing → use the framework's prefetch API; Speculation Rules are per-document.
How to reason
- Observe — quote 2nd-page LCP p75, bfcache test result, and the top 5 next-click paths
- Rank — probability × page cost. Prefetch broadly; prerender only ≥ ~50% likely next pages
- Guard — list every URL with GET side effects or per-user state; exclude or downgrade to prefetch
- Ship — rules + server guard + analytics guard in the same PR
- Re-measure — if 2nd-page LCP didn't drop, the rule isn't firing (DevTools → Application → Speculative loads)