cdn-usage

Use when adding external browser dependencies via CDN - Provides CDN selection guidance to ensure reliable script loading.

$ Installer

git clone https://github.com/dave1010/tools /tmp/tools && cp -r /tmp/tools/.skills/cdn-usage ~/.claude/skills/tools

// tip: Run this command in your terminal to install the skill


name: cdn-usage description: "Use when adding external browser dependencies via CDN - Provides CDN selection guidance to ensure reliable script loading."

CDNs (if needed)

  • UMD is probably best, unkess you're composing multiple modern packages and know they expose export syntax.
  • Skip integrity hashes (LLMs get them wrong)
  • LLM training data may get URLs wrong. Add onerror="alert('Failed to load: ' + this.src)"

jsDelivr

Example:

<script type="module">
import duckdbduckdbWasm from 'https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.30.0/+esm'
</script>

cdnjs

esm.sh

  • Use for live ESM transforms, not static files. Transforms TS/TSX on the fly.
  • Eg import * as THREE from "https://esm.sh/three@0.180.0";
  • tsx mode: load https://esm.sh/tsx as a module → inline