cdn-usage

Select CDNs and generate script syntax for UMD and ESM dependencies.

8|Updated Oct 24, 2025
One-click install
npx skills add https://github.com/dave1010/tools --skill cdn-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cdn-usage
Source: https://github.com/dave1010/tools/tree/main/.agents/skills/cdn-usage
Command: npx skills add https://github.com/dave1010/tools --skill cdn-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers choose the most appropriate Content Delivery Network (CDN) for loading external browser dependencies, ensuring reliable script execution and avoiding common pitfalls.

Core Features & Use Cases

  • CDN Guidance: Provides recommendations on which CDN to use based on the type of package (UMD, ESM) and its popularity.
  • Syntax Examples: Demonstrates correct syntax for including scripts from popular CDNs like jsDelivr and cdnjs.
  • Error Handling Tips: Suggests adding onerror attributes to script tags to aid in debugging failed loads.
  • Use Case: When adding a new JavaScript library to a web project, consult this Skill to determine the best CDN and the correct way to include it in your HTML.

Quick Start

Provide guidance on using jsDelivr to load the latest version of the 'lodash' library as a UMD module.

Frequently Asked Questions about cdn-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load JavaScript dependencies from a CDN in my HTML?

To load JavaScript dependencies from a CDN, include a script tag in your HTML pointing to the CDN URL. This Skill provides syntax examples for jsDelivr and cdnjs to help you correctly load external browser libraries.

What's the best way to choose a CDN for UMD and ESM browser scripts?

Choosing a CDN for UMD and ESM browser scripts depends on package popularity and module format. This Skill offers CDN guidance to help you select reliable providers like jsDelivr and cdnjs for your specific JavaScript dependency.

How do I add error handling for failed CDN script loads?

Add error handling for failed CDN script loads by using the onerror attribute on your script tags. This Skill suggests implementing onerror attributes to aid in debugging when external browser dependencies fail to load.

Can I use jsDelivr to load the latest version of a JavaScript library?

Yes, you can use jsDelivr to load the latest version of a JavaScript library. This Skill demonstrates how to use jsDelivr syntax to load external dependencies like lodash as a UMD module in your web project.

Why does my external browser script fail to load from a CDN?

External browser scripts fail to load from a CDN due to network issues or incorrect URL syntax. This Skill addresses reliable script loading by providing best practices and syntax examples for jsDelivr and cdnjs.