cdn-usage
About
This Claude Skill provides CDN selection guidance when adding external browser dependencies. It recommends jsDelivr as the default choice with npm syntax for automatic semver resolution, and includes reliability tips like avoiding integrity hashes that LLMs often get wrong. Use this skill whenever you need to load scripts via CDN to ensure robust dependency loading.
Quick Install
Claude Code
Recommended/plugin add https://github.com/dave1010/toolsgit clone https://github.com/dave1010/tools.git ~/.claude/skills/cdn-usageCopy and paste this command in Claude Code to install this skill
Documentation
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
- Use npm syntax: https://cdn.jsdelivr.net/npm/package@1 (auto-resolves latest 1.x)
- Works for ESM and UMD; safe default when unsure.
Example:
<script type="module">
import duckdbduckdbWasm from 'https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.30.0/+esm'
</script>
cdnjs
- Only for very well-known libraries
- Eg https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js
- Explicit versions (@1.0.0) since it lacks semver resolution.
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 <script type="text/tsx">
GitHub Repository
Related Skills
content-collections
MetaThis skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.
creating-opencode-plugins
MetaThis skill provides the structure and API specifications for creating OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It offers implementation patterns for JavaScript/TypeScript modules that intercept and extend the AI assistant's lifecycle. Use it when you need to build event-driven plugins for monitoring, custom handling, or extending OpenCode's capabilities.
langchain
MetaLangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.
cloudflare-turnstile
MetaThis skill provides comprehensive guidance for implementing Cloudflare Turnstile as a CAPTCHA-alternative bot protection system. It covers integration for forms, login pages, API endpoints, and frameworks like React/Next.js/Hono, while handling invisible challenges that maintain user experience. Use it when migrating from reCAPTCHA, debugging error codes, or implementing token validation and E2E tests.
