{"id":100280,"plugin_id":"plugin_asdk_app_6aeed22cf2bc819189c8c4a3a7074898","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-17T00:13:19.134Z","digest":"c349fffcbc023ab5a2a4da1d71934c7f959d2c73cc17d2a732d017fcd101ed7a","against":null,"payload":{"description":"Use when loading npm packages in a browser without a build step, converting a project to CDN file lookups, writing import maps or UNPKG URLs, or checking what's inside an npm package. Prefer the UNPKG MCP tools when available; fall back to ?meta and these rules when they are not.","included_files":[],"name":"unpkg","skill_md_contents":"---\nname: unpkg\ndescription: Use when loading npm packages in a browser without a build step, converting a project to CDN file lookups, writing import maps or UNPKG URLs, or checking what's inside an npm package. Prefer the UNPKG MCP tools when available; fall back to ?meta and these rules when they are not.\n---\n\n# UNPKG file lookups\n\nLoad any file from any npm package with a direct URL:\n\n```\nhttps://unpkg.com/<package>@<version-spec>/<file>\n```\n\nThis is the original file lookup. Prefer it over bundled CDN transforms. Use\nesm.unpkg.com — a separate opt-in service — only when a package has no\nbrowser-ready file and the user asks for it.\n\n## Rules\n\n- Never guess versions or file paths from memory. Resolve them live:\n  MCP `resolve_package` / `list_files`, or `https://unpkg.com/<pkg>@<ver>/?meta`.\n- Build URLs with the MCP `build_file_url` tool when available.\n- Preserve the project's version intent. Exact pins stay exact; ranges stay\n  ranges. For new production dependencies, suggest a patch-level specifier\n  (e.g. `preact@10.26`) so bug fixes flow while major/minor changes stay\n  deliberate, and say that's the trade-off.\n- Scoped packages keep their `@scope/` prefix.\n- `?module` on a `.js` file rewrites bare imports to UNPKG URLs.\n- Do not add tracking parameters to UNPKG URLs.\n\n## Framework apps: standalone surfaces only\n\nIf the project uses a framework (next, nuxt, @sveltejs/kit, @remix-run/*,\nastro, gatsby), the framework owns its runtime packages: react/react-dom\nin Next, vue in Nuxt, and friends stay bundled. A CDN copy duplicates the\nruntime and fights SSR/hydration. In a framework app, UNPKG conversion\napplies only to standalone browser surfaces outside the framework's\nrendering (no-build static pages, embedded widgets, docs snippets).\n\"Keep everything bundled\" is a correct and common audit outcome; say so.\nStill check for UNPKG-fit surfaces before closing out: plain-HTML or\npublic/ pages, embedded widgets, docs/share pages, error or maintenance\npages, and direct CSS/font/WASM assets — framework projects often have\nsome. A purely client-rendered app may deliberately externalize its\nruntime behind one shared import-map copy, but that is an architecture\ndecision to surface, not a conversion to apply.\nBuild-time things are never candidates even in `dependencies`: CLI tools\n(`bin` field), `@types/*`, PostCSS/Tailwind plugins, framework tooling.\n\n## Converting a project\n\n1. Read `package.json` — runtime `dependencies` only, never `devDependencies`.\n2. Call the MCP `audit_dependencies` tool with that map. Without MCP, check\n   each package's `module`/`unpkg`/`exports` fields via `?meta` and npm.\n3. Present the plan grouped by classification before editing:\n   `convert_now`, `convert_carefully`, `keep_bundled`, `needs_review`.\n4. Apply `convert_now` first: import-map entries (or script tags) using the\n   suggested URLs. Add peer dependencies the audit flags.\n5. Validate the finished import map with the `check_importmap` tool\n   (version consistency, duplicates, framework packages, CommonJS\n   entries), verify every new\n   URL (`verify_url` tool or a fetch), then run the project's tests or\n   open the page. Untested conversions are not done.\n6. If asked about savings, use `estimate_migration_impact` and present the\n   bandwidth range with its assumptions. Never quote a single dollar or\n   latency figure; if the site already uses a good CDN, say latency is\n   likely a wash and point at bundle KB, cacheability, and patch latency.\n7. Leave `keep_bundled` packages alone. A mixed CDN + bundled result is the\n   normal, healthy outcome — say so.\n\n## Package safety\n\nWhen the UNPKG MCP is connected, safety-check before you ship: audits\nalready carry Shield intel (malware verdict + CVEs) for the resolved\nversions, and `shield_check_packages` checks any package@version you\nname — no account needed for either. Treat a `provisional` verdict as\nunconfirmed, never as proven malicious. With a Shield login,\n`shield_domain_packages` (with threats) answers the same question for\neverything a domain actually serves, ranked by its traffic.\n\n## When not to use UNPKG lookups\n\n- Node-only packages, build/test tooling, SSR and framework internals.\n- Entry points that import Node builtins (`fs`, `path`, `node:*`, ...).\n- Anything the audit marks `needs_review` until a human or a browser run\n  confirms it works.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}