Back to Skills

cdn-usage

dave1010
Updated Yesterday
38 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/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 <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

creating-opencode-plugins

Meta

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

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

cloudflare-turnstile

Meta

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

View skill