Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

third-party

БесплатноБез исполняемых скриптовНе проверен

Teaches strategies for mitigating third-party script performance impact. Use when third-party scripts like analytics, ads, or widgets are degrading your page…

PatternsDevот PatternsDev★ 261 звезда на GitHub

Об этом скилле

Optimize loading third-parties

Table of Contents

When to Use

  • Use this when third-party scripts (analytics, ads, chat widgets, social embeds) are slowing down your site
  • This is helpful for optimizing Core Web Vitals while retaining essential third-party functionality

Instructions

  • Use async or defer attributes for non-critical third-party scripts
  • Establish early connections with preconnect and dns-prefetch resource hints
  • Lazy-load below-the-fold embeds (YouTube, maps, social media) using IntersectionObserver or facades
  • Consider self-hosting critical third-party scripts for better caching control
  • Use the Next.js Script component with appropriate strategy values for framework-level optimization

Details

It would be hard to find a modern site that operates in silos. Most sites coexist and depend on several other sources on the web for data, functions, content, and much more. Any resource located on another domain and consumed by your site is a third-party (3P) resource for your site. Typical third-party resources that are included on sites include:

  • Embeds for maps, videos, social media, and chat services
  • Advertisements
  • Analytics components and tag managers
  • A/B testing and personalization scripts
  • Utility libraries that provide ready-to-use helper functions such as those used for data visualization or animations.
  • reCAPTCHA or CAPTCHA for bot detection.

You can use third-parties to integrate other features that add value to your content or to reduce some drudgery involved in building a site from scratch. As per the Web Almanac report for 2021, more than 94% of the pages on the web use third-parties - images and JavaScript forming the most significant contributors to third-party content.

While third-party resources can enrich your site with valuable features, they can also slow it down if:

  • They cause additional round trips to the third-party domain for every required resource.
  • They make heavy usage of JavaScript (impacting download and execution time) or are bulky in size because of unoptimized images/videos.
  • Individual site owners cannot influence the implementation, and their behavior can be unpredictable.
  • They can block the rendering of other critical resources on the page and affect Core Web Vitals (CWV).

Despite these issues, third-parties may be essential to your business. If you cannot do away with 3P's, the next best thing is to optimize them to reduce performance impact.

Assessing the performance impact of 3P resources

You can use a combination of techniques to find how third-party code is affecting your site.

Optimization strategies

Since third-party code is not under your control, you cannot optimize the libraries directly. This leaves you with two options.

  1. Replace or remove: If the value provided by the third-party script is not proportional to its performance cost, consider removing it. You can also evaluate other alternatives that are lightweight but provide similar functionality.

  2. Optimize the loading sequence: The loading process involves loading several first-party and third-party resources in the browser. To design an optimal loading strategy, you would need to consider the browser assigned priority for different resources, their position on the page, and the value of each resource for the web page.

Load 3P scripts efficiently

Following are the time-tested best practices that can reduce the performance impact of third-party resources when used correctly.

Use async or defer to prevent scripts from blocking other content.

Applicable to: Non-critical scripts (tag managers,

Полный SKILL.md на GitHub

Установить third-party в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Grep
Glob

FAQ

Что делает скилл third-party?

Teaches strategies for mitigating third-party script performance impact. Use when third-party scripts like analytics, ads, or widgets are degrading your page load times or Core Web Vitals.

Как установить скилл third-party?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл third-party запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить third-party с