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.
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/[email protected]/+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/[email protected]"; - tsx mode: load https://esm.sh/tsx as a module → inline <script type="text/tsx">
Quick Install
/plugin add https://github.com/dave1010/tools/tree/main/cdn-usageCopy and paste this command in Claude Code to install this skill
GitHub 仓库
Related Skills
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.
Algorithmic Art Generation
MetaThis skill helps developers create algorithmic art using p5.js, focusing on generative art, computational aesthetics, and interactive visualizations. It automatically activates for topics like "generative art" or "p5.js visualization" and guides you through creating unique algorithms with features like seeded randomness, flow fields, and particle systems. Use it when you need to build reproducible, code-driven artistic patterns.
webapp-testing
TestingThis Claude Skill provides a Playwright-based toolkit for testing local web applications through Python scripts. It enables frontend verification, UI debugging, screenshot capture, and log viewing while managing server lifecycles. Use it for browser automation tasks but run scripts directly rather than reading their source code to avoid context pollution.
requesting-code-review
DesignThis skill dispatches a code-reviewer subagent to analyze code changes against requirements before proceeding. It should be used after completing tasks, implementing major features, or before merging to main. The review helps catch issues early by comparing the current implementation with the original plan.
