mcpField
M
modern-javascript

modern-javascript

github.com/ccheneyDevelopment61259 installsUpdated 7w ago
Repository

About modern-javascript

A JavaScript skill for making changes with attention to language semantics, runtime support, and toolchain compatibility. It is for developers modernizing code while preserving behavior and checking the relevant standards and compatibility references.

Key features

  1. 01Check runtime and toolchain support
  2. 02Preserve evaluation and concurrency behavior
  3. 03Distinguish transforms from polyfills
  4. 04Consult targeted compatibility references
  5. 05Verify changed behavior and fallbacks

Use cases

  1. 01Modernizing code for a declared runtime
  2. 02Choosing syntax supported by project targets
  3. 03Assessing async iteration and promise behavior
  4. 04Planning a compatibility fallback

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/ccheney/robust-skills --skill modern-javascript

After installing, type/modern-javascriptin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
CHEATSHEET.md
COMPATIBILITY.md
CONCURRENCY.md
ES2016-ES2017.md
ES2018-ES2019.md
ES2022-ES2023.md
ES2024.md
ES2025.md
ES2026.md
PROMISES.md
UPCOMING.md

Details

From the project README

Modern JavaScript

Keep specification status, runtime support, and toolchain support separate. The user's explicit instructions take precedence over this skill's guidelines.

Work against the target

Use the relevant JavaScript, required behavior, and declared runtime as input. Inspect engines, browser targets, lockfiles, and build configuration as needed for the feature. Do not invent a baseline or upgrade runtimes merely to use newer syntax.

Prefer a supported standardized feature. A proposal can fit when the user/project chooses it and a maintained transform or polyfill implements the required revision. Bundled edition and support tables are dated snapshots; verify changing status against the sources below.

Preserve semantics

  • Keep mutation, property access, iterator consumption, evaluation order, error propagation, and concurrency behavior intact when modernizing.
  • Distinguish syntax transforms from runtime polyfills. TypeScript declarations do not supply missing runtime APIs.
  • Treat iterator helpers as lazy and single-pass; Array.fromAsync consumes sequentially, while Promise.all observes already-started work concurrently.
  • Do not use forEach(async ...) when completion must be awaited. Rejection and timeouts do not cancel underlying work by themselves.
  • Distinguish host APIs such as fetch and structuredClone from ECMA-262 features, and Intl from the separate ECMA-402 standard.
  • Do not introduce withdrawn Records & Tuples syntax or silently switch between legacy and standard-style decorator semantics.

Deliver the requested code or explanation, noting a required compatibility path when relevant. Verify changed behavior and any fallback that ships; select checks proportional to the change rather than requiring every project check for a syntax answer.

References

Load the semantic or compatibility topic needed, not every edition.

TaskReference
Runtime targets, Babel, TypeScript, polyfillsCOMPATIBILITY.md
Async functions and early annual additionsES2016-ES2017.md
Object spread, async iteration, RegExp, flatteningES2018-ES2019.md
Classes, property checks, change-by-copyES2022-ES2023.md
Grouping, promise resolvers, buffers, Unicode setsES2024.md
Set/iterator helpers, import attributes, RegExpES2025.md
ES2026 additions such as Array.fromAsyncES2026.md
Temporal, resource management, proposals, withdrawn syntaxUPCOMING.md
Promise combinators and error behaviorPROMISES.md
Pools, retries, cancellation, async iterationCONCURRENCY.md
Compact syntax lookupCHEATSHEET.md

Use frozen ECMA-262 editions for edition membership, TC39 proposals for proposal status, and official runtime/toolchain documentation for availability.

Comments

Markdown supported