modern-javascript

modern-javascript is a skill for Claude Code, Codex from ccheney/robust-skills. It costs 47 tokens per session (759 once invoked), scanned A, original, MIT.

A guide to writing and reviewing JavaScript using current language standards and a specified Node.js or browser runtime. It separates what JavaScript supports in theory from what the target environment and build tools support.

In plain words
What is it for?
Modernizing JavaScript, checking compatibility, choosing transforms or polyfills, reviewing asynchronous code, and running project checks.
Why use it?
It helps avoid using syntax or built-in features that the intended runtime cannot execute, while preserving existing behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Modernizing JavaScript, checking compatibility, choosing transforms or polyfills, reviewing asynchronous code, and running project checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ccheney/robust-skills/modern-javascript
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ccheney/robust-skills --skill modern-javascript
Clone the repo
git clone --depth 1 https://github.com/ccheney/robust-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for modern-javascript

README.md
[![agentmods](https://agentmods.dev/badge/skills/ccheney/robust-skills/modern-javascript/github.svg)](https://agentmods.dev/skills/ccheney/robust-skills/modern-javascript)
Your own site
<a href="https://agentmods.dev/skills/ccheney/robust-skills/modern-javascript"><img src="https://agentmods.dev/badge/skills/ccheney/robust-skills/modern-javascript/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for modern-javascript

Your own site · 80×15
<a href="https://agentmods.dev/skills/ccheney/robust-skills/modern-javascript"><img src="https://agentmods.dev/badge/skills/ccheney/robust-skills/modern-javascript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 759 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.00759
Opus 5.5 $0.00019 $0.00304
Sonnet 5.5 $0.00009 $0.00152
Haiku 4.5 $0.00005 $0.00076

Measured 1mo ago against content hash a2cc69874bc5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

modern-javascript scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/modern-javascript/SKILL.md · 46 lines

How it starts

The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Task Reference
Runtime targets, Babel, TypeScript, polyfills COMPATIBILITY.md
Async functions and early annual additions ES2016-ES2017.md
Object spread, async iteration, RegExp, flattening ES2018-ES2019.md
Classes, property checks, change-by-copy ES2022-ES2023.md
Grouping, promise resolvers, buffers, Unicode sets ES2024.md
Set/iterator helpers, import attributes, RegExp ES2025.md
ES2026 additions such as Array.fromAsync ES2026.md
Temporal, resource management, proposals, withdrawn syntax UPCOMING.md
Promise combinators and error behavior PROMISES.md
Pools, retries, cancellation, async iteration CONCURRENCY.md
Compact syntax lookup CHEATSHEET.md

Read the full file on GitHub · 46 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -136 lines · -64 tokens per session a2cc69874bc5
  2. 1mo ago First seen · 182 lines · 111 tokens per session scan A 9ef7c2398ee4

Subscribe to this mod's changes

modern-javascript is a skill published in the GitHub repository ccheney/robust-skills (61 stars, last pushed 21d ago), licensed MIT. It adds 47 tokens to every session and 759 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

language-bash

Bash idioms — strict mode, parameter expansion, arrays, trap cleanup, heredocs, and POSIX portability. Auto-load when working with .sh, .bash files, or when the user mentions bash, shell, shellcheck, set -e, or pipefail.

lugassawan/swe-workbench · 60 tokens

language-csharp

C# and .NET idioms — .NET 8 LTS, C# NRT, records, value semantics, switch expressions, async/await, Task, ValueTask, CancellationToken, ConfigureAwait, IOptions , LINQ, Span , ArrayPool, hot path, allocation profiling, and performance. Auto-load when working with .cs files, .csproj, .sln, Directory.Build.props, or…

lugassawan/swe-workbench · 142 tokens

language-dart

Dart idioms — null safety, Futures and Streams, widget composition, and Riverpod app architecture. Auto-load when working with .dart files, pubspec.yaml, or when the user mentions Dart, Flutter, widgets, Riverpod, Streams, or null safety.

lugassawan/swe-workbench · 58 tokens

language-go

Go idioms — error handling, concurrency, and standard library usage. Auto-load when working with .go files, go.mod, go.sum, or when the user mentions Go, Golang, goroutines, channels, context, or error wrapping.

lugassawan/swe-workbench · 53 tokens

language-java

Java idioms — records, sealed types, virtual threads, and JDK 21+ patterns. Auto-load when working with .java files, pom.xml, build.gradle, or when the user mentions Java, JVM, Spring, Maven, Gradle, sealed classes, or virtual threads.

lugassawan/swe-workbench · 61 tokens

language-kotlin

Kotlin idioms — null safety, sealed interfaces, scope functions, and Flow. Auto-load when working with .kt files, build.gradle.kts, or when the user mentions Kotlin, coroutines, StateFlow, or Kotlin DSL.

lugassawan/swe-workbench · 52 tokens