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

third-party-scripts

できること

このスキルは、アクセス解析、広告、チャットウィジェットなどの外部スクリプトを確認します。読み込みが遅いと感じている開発者やサイト運営者向けです。

使う場面

  • ✓アクセス解析、広告、チャットのスクリプトのせいでページが遅く感じるとき。
  • ✓script タグに async や defer の属性がないとき。
  • ✓パフォーマンス監査で、サードパーティのコードがボトルネックだと指摘されたとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/third-party-scripts/SKILL.md

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“サイトの読み込みが遅く、チャットウィジェットとアクセス解析が原因だと思います。どのように読み込まれているか確認してもらえますか。”

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

仕組み

エージェントは、各外部スクリプトの読み込み方法と、ページをブロックしているかを確認します。アクセス解析のような独立したスクリプトには async、ページに依存するチャットウィジェットには defer、遅延読み込みを提案します。まず計測によって本当のボトルネックを確認します。

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

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

Optimize third-party script loading

Third-party scripts are the #1 cause of slow websites—unoptimized loading can add 2-5 seconds to your page load time.

Quick Reference

  • Use async for independent scripts (analytics, ads)
  • Use defer for DOM-dependent scripts (chat widgets, social)
  • Lazy-load non-critical scripts after page load
  • Consider self-hosting critical third-party scripts

Check

Analyze third-party scripts on this page to ensure they use async/defer and don't block rendering.

Fix

Add async or defer attributes to third-party scripts and consider lazy loading non-critical scripts.

Explain

Explain the performance impact of third-party scripts and strategies to minimize their blocking effect.

Code Review

Review the routes, assets, and loading behavior that affect Optimize third-party script loading. 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/third-party-scripts

よくある質問

スクリプトに async や defer を使うべきなのはいつですか?

アクセス解析のように独立したスクリプトには async、チャットウィジェットのようにページに依存するスクリプトには defer を勧めています。

これらのスクリプトは自分でホストすべきですか?

重要なサードパーティのスクリプトでは、自分でホストすることに意味がある場合があるとこのスキルは説明しています。

遅いスクリプトはどのように確認されますか?

変更を勧める前に、ブラウザの開発者ツール、Lighthouse、実際の利用者のデータなどの証拠を確認します。

詳細

作者による元の説明

Use when auditing slow page loads, heavy assets, or rendering delays related to Optimize third-party script loading. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.

repo: thedaviddias/Front-End-Checklist

人気

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

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

0

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

コメント

  • …

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

似ているスキル