Optimize third-party script loading

SkillMedia

A skill for auditing how third-party scripts affect page load performance. It guides an agent through verifying the actual bottleneck with DevTools, Lighthouse, or field data before recommending changes, then applying fixes like async, defer, and lazy loading.

Available today. Use it from your connected AI after setup.

Have a page with slow load times or heavy third-party assets to audit.

Then ask your AI: use the Optimize third-party script loading skill

What your AI can do with it

  • Analyze third-party scripts on a page for async/defer usage and render blocking
  • Verify bottlenecks using DevTools, Lighthouse, or field data
  • Add async or defer attributes to third-party scripts
  • Lazy-load non-critical scripts after page load
  • Review routes, assets, and loading behavior for unnecessary network, CPU, or layout cost
  • Explain the performance impact of third-party scripts and how to minimize blocking

Getting started

  1. Have a page with slow load times or heavy third-party assets to audit.
  2. Add the skill to the agent's available skills.
  3. Ask the agent to analyze third-party scripts on the page and confirm the bottleneck with DevTools, Lighthouse, or field data.
  4. Review the flagged files, requests, or rendering steps and apply the recommended fixes.
  5. Consult references/rule.md for full implementation details and framework-specific guidance.

What this skill tells your AI

The instructions your AI receives, as published by thedaviddias/front-end-checklist in skills/third-party-scripts/SKILL.md and read by ahel’s review.

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/en/rules/performance/third-party-scripts

Signals

GitHub stars
74k
Forks
7k
Last commit
Aug 2026

Questions

When should this skill be used?
When auditing slow page loads, heavy assets, or rendering delays related to third-party script loading. It verifies the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.
What fixes does it recommend?
Use async for independent scripts like analytics and ads, defer for DOM-dependent scripts like chat widgets, lazy-load non-critical scripts, and consider self-hosting critical third-party scripts.
How long does an audit take?
The estimated time is 20 minutes.
Advanced
Item type
skill
Key
third-party-scripts
Source
github.com/thedaviddias/front-end-checklist