/javascript:javascriptfrom javascript
Covers JavaScript runtime semantics, meaning ESM vs CommonJS, import side effects, promises and the event loop, async cleanup and cancellation, browser vs Node/Bun/Deno/edge, measured performance and JS tests. Use when writing, reviewing or debugging *.js/*.mjs/*.cjs or runtime behavior of JS/TS code (import errors, unhandled rejections, leaks, ordering bugs).
Ships in javascript. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
For type-level work use the typescript skill, for React react, for Vite config and bundling vite, and for HTML, CSS and accessibility web-development (whichever are installed).
Preserve the observable contract (values and errors, side effects, ordering, module initialization, supported runtimes) unless the request changes it.
package.json (type, exports, engines, scripts), the lockfile, and any bundler or transpiler config..nvmrc, .node-version, engines, mise.toml, devenv.nix, Dockerfile), the module format (ESM or CJS), and whether a bundler rewrites imports.search_graph, trace_path) when the repo is indexed. Otherwise use the LSP tool or Grep.npm ls <pkg> or the lockfile) with Context7 (resolve-library-id, then query-docs). For runtime built-ins, check MDN or the runtime's docs for that version.undefined versus null, truthy versus falsy, object identity and mutation, and a synchronous throw versus a rejected promise.=== for exact comparison. Use ?? / ?. only when null/undefined are the values to replace, since || also replaces 0, '', and false.this binding, evaluation order, sparse-array holes, getters, mutation, or when errors fire.require and import in one module system without the runtime's documented interop.package.json exports/type, file extensions, the resolved file, and the build output before editing source.Classify each async path as a returned promise, callback, event listener, timer, stream, or intentionally detached task.
await any work whose completion affects the caller. A detached task needs an error handler and a cancellation owner at its launch site.new Error(msg, { cause: err }). Logging and continuing turns failure into false success.AbortController/AbortSignal is the standard cancellation channel, and { signal } on addEventListener removes listeners in bulk.Promise.all, or Promise.allSettled when partial failure is acceptable. Never create a floating promise in a loop.window.onerror and unhandledrejection are for observation, not recovery.await expect(p).rejects.toThrow(...)). Never let a test finish before its async work settles.unit-testing skill, if installed, to pick which cases to add.npm run test -- <file>, pnpm vitest run <file>, node --test <file>).Before optimizing, read references/performance.md.
| Signal | Look first at | Avoid |
|---|---|---|
| Can't reproduce | Inputs, runtime version, command, timing; vary one thing at a time | Coding to an unverified theory |
| Module behavior changed | Restore the known-good boundary, then compare package.json, command, build output, import order | Mixing module systems or rewriting every import |
| Async timeout or duplicate work | Completion, cancellation, and error ownership for each promise and callback | Arbitrary delays or retries |
| Runtime API missing | Target runtime docs and installed version | Silently substituting another runtime's API |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin javascript