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

cumulative-layout-shift

できること

このスキルは、画像や広告が文章を下に押し下げるなど、読み込み中に動く要素を探します。安定した、予測できるページを求めるWebの制作者向けです。

使う場面

  • ✓訪問者が、クリックする直前にボタンが動くと不満を言っているとき。
  • ✓画像や広告が表示された後、ページの文章が下にずれるとき。
  • ✓Googleのページ速度のチェックで、より良いスコアが欲しいとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/cumulative-layout-shift/SKILL.md

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“私のページは、読み込み中に文章が動くのはなぜですか?”

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

仕組み

エージェントは、ページが画像、埋め込み、その他のコンテンツのためにどのように場所を確保しているかを確認します。その後、後からずれないように、あらかじめサイズを設定することを提案します。

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

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

Minimize cumulative layout shift

Layout shifts cause accidental clicks, reading disruption, and user frustration—a good CLS score ensures content stays where users expect it.

Quick Reference

  • CLS measures visual stability—target score below 0.1
  • Always set width/height on images and embeds
  • Reserve space for ads, banners, and dynamic content
  • Use transform animations instead of layout-changing properties

Check

Measure CLS using Lighthouse or PageSpeed Insights. Verify score is below 0.1 for good visual stability.

Fix

Reserve space for images/embeds with dimensions, use font-display strategies, and avoid injecting content above existing content.

Explain

Explain how CLS measures visual stability and why unexpected layout shifts frustrate users and cause accidental clicks.

Code Review

Review the routes, assets, and loading behavior that affect Minimize cumulative layout shift. Flag exact files, requests, or rendering steps that add unnecessary network, CPU, or layout cost, and describe the measurement method used to confirm the issue.


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

Rule page: https://frontendchecklist.io/rules/performance/cumulative-layout-shift

よくある質問

レイアウトのずれとは何ですか?

画面にすでに表示された後で、内容が動くことです。訪問者が間違ったものをクリックする原因になります。

この問題はどう測定されますか?

LighthouseまたはPageSpeed Insightsを提案し、0.1未満のスコアを目指すとしています。

このスキルは、読み込みの遅さも直しますか?

全体の速度よりも、読み込み中の動きに焦点を当てています。

詳細

作者による元の説明

Use when auditing slow page loads, heavy assets, or rendering delays related to Minimize cumulative layout shift. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.

repo: thedaviddias/Front-End-Checklist

人気

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

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

0

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

コメント

  • …

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

似ているスキル