next-partial-prefetching-optimizer
Optimize what selected Next.js client navigations include before the click under Partial Prefetching. Use after Cache Components and Partial Prefetching are…
от Asymmetric-al★ 354 звезды на GitHub
Установить next-partial-prefetching-optimizer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
This repository (Asymmetric-al/core)
Core overlay, reviewed 2026-11-18 against Next.js 16.4.5. The upstream text below is unchanged. Where it conflicts with this block, this block wins.
- Reuse the rig. The root
instant-nav.rig.mdandtests/e2e/instant-navigation.spec.tsare Core's productioninstant()rig, and@next/playwrightis pinned to the installed Next.js. Use the rig's Bun commands, not thepnpmexamples inrig-template.md, and add this skill's source link, destination markers and prefetch budget to that rig instead of writing another. - Local loop only. Core's rig builds, starts and tests locally, with no push. Do not use the remote loop in
rig-template.md: pushing to measure a deployment is not part of this skill. - Scope. Optimize only the navigations the user named. Commits, pushes and pull requests follow
docs/ai/rules/general.md; asking the user whether to commit or open a pull request does not authorize either. Route changes follow Instant Navigation indocs/ai/rules/frontend.md.
Partial Prefetching optimizer
Optimize each requested source link and destination as its own contract. Turn
the requested prefetched UI, navigation-only UI, and trigger into a production
instant()
test. Record the current behavior, make the smallest optimization, verify the
differential, and keep the passing test as regression coverage.
Before making framework changes, read the bundled Optimizing prefetching guide
at
node_modules/next/dist/docs/01-app/02-guides/optimizing-prefetching.md. If the
bundled guide is unavailable, use the online
guide. It is the
source of truth for prefetch stages, prefetch={true}, session-specific UI,
and cost trade-offs.
When the work changes what belongs in the App Shell, follow the Instant navigation and Caching docs for cache placement, Suspense boundaries, loading UI, and authorization.
The guides own framework behavior and implementation patterns. This skill owns the navigation contract, production rig, trustworthy RED-to-GREEN loop, parity check, differential, and report.
This is not an adoption skill. If Cache Components or Partial Prefetching are
not adopted, use their adoption skills and return to this workflow. If the App
Shell itself cannot commit under instant(), use
next-cache-components-optimizer first, then resume the selected navigation.
Run the workflow unattended. Resolve the contract from the request and the existing application. Stop for user input only when a product decision is genuinely blocked and cannot be inferred safely without changing cost, freshness, authorization, or user-visible behavior.
Reporting to the user
This loop runs unattended, so do not stop between implementation steps. Finish the navigations the user named, then check in. The rig, lock, RED/GREEN loop, and stage names are internal scaffolding; report the product behavior instead.
- Speak their language. Describe the source link and result in terms of what the user sees before and after the click, not the validation mechanics.
- Show, don't tell. Drive the exact link in a production browser so the user sees which content is already available and which content streams after the click. If a live demonstration is unavailable, attach before/after captures.
- Give them a concise click-through list, not a technical results table. Use one line per navigation with the source URL, link to click, UI ready before the click, UI that waits for navigation, and whether prefetching starts in the viewport or after intent.
- Only surface a question for a genuine fork. Ask when the choice changes cost, freshness, authorization, or visible behavior. If the user already requested a PR or named every navigation, finish that scope without asking again.
Define the contract
Inspect the source route, the exact link or interaction, the destination's
Suspense boundaries, its data reads, existing prefetch policy, and any existing
instant() test. Record:
- which destination UI should be ready before the click;
- which reusable UI should wait for navigation;
- whether per-link prefetching should start in the viewport or only after intent.
The trigger is part of the contract. Two links to the same URL may use different prefetch policies and need separate tests.
Use the guide's cost model when the trigger is not already specified. Do not silently increase the number of links that can invoke the server or cache data whose freshness contract is unknown.
Reuse the production rig
Read an existing instant-nav.rig.md. Cache Components optimization, Partial
Prefetching adoption, and this optimizer share the
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- reference/red-test-robustness.md
- references/UPSTREAM-license.md
- references/upstream.md
- rig-template.md
FAQ
Что делает скилл next-partial-prefetching-optimizer?
Optimize what selected Next.js client navigations include before the click under Partial Prefetching. Use after Cache Components and Partial Prefetching are adopted when the user wants selected URL-specific UI to be instant, wants reusable content to wait for navigation, or needs to choose between default, viewport, and intent prefetching. Requires Next.js 16.3+.
Как установить скилл next-partial-prefetching-optimizer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл next-partial-prefetching-optimizer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…