本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #3032

speculation-rules

できること

このスキルは、ブラウザーのSpeculation Rulesの機能を、次に開かれそうなページ向けに設定し、ルールが広すぎないかを確認します。複数ページのサイトでページの移行を速くしたい制作者向けです。

使う場面

  • ✓サイト内のページ間の移動を速く感じさせるようエージェントに頼むとき。
  • ✓ページの移行が遅く、訪問者がいつも同じ少数の次のページに進むとき。
  • ✓関係のないページや個人のページを読み込まないように、Speculation Rulesを確認したいとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/speculation-rules/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/speculation-rules/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のサイトのページ間の移動が遅く感じます。次のページがあらかじめ読み込まれるよう、Speculation Rulesを追加してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、最も可能性の高い次のページのリンクを対象にするSpeculation Rulesのブロックを追加します。ページのHTMLを先に読み込むprefetchから始め、次に開かれる可能性が非常に高いページにはprerenderを提案します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Use the Speculation Rules API to prefetch and prerender navigations

Navigation latency is one of the biggest contributors to poor Interaction to Next Paint (INP) and overall perceived performance. Prerendering the most likely next page eliminates all network and rendering latency — the user sees the new page in under 100 ms regardless of server response time. Google Search has used this API to deliver its "instant" results page experience.

Quick Reference

  • Use prefetch rules to load the next page's HTML ahead of time
  • Use prerender rules to fully render the next page in the background (instant navigation)
  • Scope rules with href-matches or CSS selector patterns to avoid wasting bandwidth
  • Prefer document rules (CSS selectors) over URL list rules for dynamic sites

Check

Check whether the site uses the Speculation Rules API or equivalent prefetch/prerender techniques for likely navigation targets.

Fix

Add a Speculation Rules JSON block targeting the most likely next-page links, starting with prefetch and graduating to prerender.

Explain

Explain how the Speculation Rules API differs from rel=prefetch and rel=prerender, and how prerendering achieves near-zero navigation latency.

Code Review

Review speculation rule selectors for over-eagerness — flag patterns that would prerender unrelated pages, third-party URLs, or pages with personalised/authenticated content that should not be pre-fetched.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/performance/speculation-rules

よくある質問

prefetchとprerenderの違いは何ですか?

このスキルによると、prefetchはページのHTMLを前もって読み込み、prerenderはページを背景で完全に描画します。

これは通信量を無駄にしませんか?

ルールが広すぎると無駄になることがあるため、このスキルは範囲を厳密に絞ることを勧めています。

個人向けのページは含めるべきですか?

いいえ。このスキルは、個人向けやログインが必要なページを事前描画しないよう勧めています。

詳細

作者による元の説明

Use when optimising multi-page navigation performance, reducing INP on page transitions, or implementing progressive enhancement for fast page loads.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#3032
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル