Back to Skills

cdn-usage

dave1010
Updated Yesterday
15 views
0
View on GitHub
Designdesign

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 CommandRecommended
/plugin add https://github.com/dave1010/tools
Git CloneAlternative
git clone https://github.com/dave1010/tools.git ~/.claude/skills/cdn-usage

Copy 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

Example:

<script type="module">
import duckdbduckdbWasm from 'https://cdn.jsdelivr.net/npm/@duckdb/[email protected]/+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/[email protected]";
  • tsx mode: load https://esm.sh/tsx as a module → inline <script type="text/tsx">

GitHub Repository

dave1010/tools
Path: .skills/cdn-usage

Related Skills

content-collections

Meta

This 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.

View skill

langchain

Meta

LangChain 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.

View skill

Algorithmic Art Generation

Meta

This 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.

View skill

webapp-testing

Testing

This 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.

View skill