Agent skill · software engineering · ccheney
modern-javascript
Write, modernize, and review JavaScript against real ECMAScript language features and explicit runtime targets. Use for JavaScript or Node.js code, ES edition attribution (ES2015-ES2026), compatibility and polyfill/transpile decisions, array/iterator/Set/Map/Promise/RegExp/TypedArray APIs, modules, async code, Temporal, explicit resource management, decorators, or replacing stale and withdrawn proposal syntax. Prefer standardized features, while permitting mature proposals when the required maintained transform or polyfill is stated.
Why this skill is useful
Provides detailed modern JavaScript patterns and best practices, including specific ECMAScript features and their support across versions.
What it needs
About 6k tokens when loaded. Last updated 2026-07-07. 58 stars on the source repository.
What this skill does
Modern JavaScript Use current JavaScript without confusing specification status, runtime support, and toolchain support. Treat these as three separate questions: 1. Is it standardized? Check the frozen annual ECMA-262 edition or TC39's current proposal tracker. 2. Does the target run it? Check the project's declared Node/browser targets and current compatibility data. 3. Can tooling bridge the gap? Syntax may need a transform; built-ins need a polyfill. One does not imply the other. Workflow 1. Inspect package.json (engines, browserslist, dependencies), runtime/deployment config, tsconfig.json, and Babel/bundler config. Do not invent a baseline. 2. Select the simplest standardized feature supported by that baseline. 3. For a newer standard or mature proposal, state the required runtime, transform, or polyfill in the implementation or handoff. 4. Preserve observable behavior while modernizing: mutation, evaluation order, iterator consumption, concurrency, cancellation, property descriptors, and error propagation matter more than shorter syntax. 5. Run the project's formatter, type-checker, linter, and tests. Exercise both the native path and compatibility path when both ship. Read references/COMPATIBILITY.md whenever support is uncertain, the feature is newer than ES2023, or a proposal is involved. Status Rules Use the frozen ECMAScript 2026 specification for ES2026 attribution and the living draft for already-integrated future features. Use TC39's finished-proposals table for Stage 4 publication-year mapping and its active tracker for current stages. Do not infer an edition from the year a browser shipped a feature. Array.fromAsync, for example, shipped before its ES2026 publication. Do not describe Stage 3 or 2.7 syntax as standard JavaScript. It can still be a sound project choice when a maintained toolchain implements the selected proposal revision. Do not emit withdrawn Records & Tuples syntax (#{} / #[]). …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills ccheney/modern-javascript