html-resource-hints
できること
このスキルは、ブラウザが見つけるのが遅すぎる重要なファイルがないかをページで確認します。初回表示を速くしたい開発者向けです。
使う場面
- ✓ウェブフォントが、スタイルシートを読んだ後にようやく見つかるとき。
- ✓メインのヒーロー画像や重要なスクリプトが、必要より遅く読み込まれるとき。
- ✓ページが多くのサードパーティのサービスを使い、早期に接続する必要があるとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/html-resource-hints/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“メインのフォントとヒーロー画像が早く読み込まれるように、preload のヒントを追加してもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、遅く読み込まれる重要なリソースを探し、それらに preload のヒントを提案します。ページの初めに使われるサードパーティのドメインには preconnect を提案します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Add resource hints (preload, prefetch, dns-prefetch)
The browser's HTML parser discovers resources sequentially — a font referenced in a CSS file won't be fetched until the CSS is parsed. Resource hints break this dependency chain, allowing the browser to start fetching critical resources in parallel with parsing. A single preload directive for a critical font can eliminate a 100–300ms Flash of Invisible Text.
Quick Reference
- preload forces immediate download of resources needed by the current page
- prefetch fetches resources likely needed for the next navigation (low priority)
- dns-prefetch resolves DNS for third-party origins in advance
- preconnect does DNS + TCP + TLS for origins you'll connect to soon
Check
Look at this HTML file for late-discovered critical resources — fonts referenced in CSS, hero images, and key scripts. Identify where preload or preconnect hints would help.
Fix
Add appropriate preload hints for critical fonts, images, and scripts. Add preconnect for third-party domains used early in the page.
Explain
Explain each resource hint type (preload, prefetch, preconnect, dns-prefetch), when to use each, and the consequences of misusing them.
Code Review
Review templates, server-rendered HTML, and shared components that output markup related to Add resource hints (preload, prefetch, dns-prefetch). Flag exact elements, attributes, and routes where the rendered HTML violates the rule.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/en/rules/html/html-resource-hints
よくある質問
preload と prefetch の違いは何ですか?
preload は現在のページが今必要とするものを取得し、prefetch は次のページで必要になりそうなものを低い優先度で取得します。
preconnect は何をしますか?
DNS、TCP、TLS を含め、サイトへの接続を早めに開き、後のリクエストを早く始められるようにします。
dns-prefetch とは何ですか?
サードパーティのドメイン名を早めに解決するもので、preconnect より軽い方法です。
詳細
作者による元の説明
Use when reviewing templates, rendered HTML, or shared components related to Add resource hints (preload, prefetch, dns-prefetch). Validate the final browser-facing markup, not just the source framework abstraction.
人気
- GitHubのスター
- 75k
- ランキング
- #2871
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。