modern-javascript-patterns skill (wshobson): ES6+ style guide for your agent
A reference skill that makes your agent write and refactor JavaScript in modern ES6+ style.
- Installs
- 22.6K
- on skills.sh
- Stars
- 42.1K
- on GitHub
- Files
- 2
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
modern-javascript-patterns is a style guide for your agent. It triggers when you refactor old JavaScript, move callbacks to async/await, build data pipelines or tune JavaScript performance.
The SKILL.md is short: a when-to-use list and 15 best practices such as const by default, optional chaining and nullish coalescing. The detail sits in two reference files covering ES6+ features, async patterns, functional patterns, classes, modules, iterators, performance and common pitfalls. It bundles no scripts.
Good for
- Developers refactoring legacy JavaScript to ES6+
- Teams moving callbacks to Promises and async/await
- Anyone who wants consistent modern JavaScript from an agent
Install modern-javascript-patterns
Claude Code
- 1
Copy this prompt.
Install the modern-javascript-patterns skill in Claude Code. Run this command: npx skills add https://github.com/wshobson/agents --skill modern-javascript-patterns Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
Master ES6+ features including async/await, destructuring, spread operators, arrow functions, promises, modules, iterators, generators, and functional programming patterns for writing clean, efficient JavaScript code. Use when refactoring legacy code, implementing modern patterns, or optimizing JavaScript applications.
Sections in SKILL.md
- When to Use This Skill
- Detailed patterns and worked examples
- Best Practices
Key facts
- Author
- wshobson (agents repo)
- Installs on skills.sh
- 22,633 as of 2026-11-02
- License
- MIT (as detected by GitHub)
- Last commit to the repo
- 2026-10-30
- What is inside
- 3 files including SKILL.md (two reference files)
What it includes
const by default, arrow callbacks, async/await, pure functions
Also template literals, destructuring, avoiding mutation, optional chaining, nullish coalescing, array methods, modules, small functions, proper error handling and strict mode.
Read ·
15 best practicesArrow functions, destructuring, spread and rest, template literals, object literals
Five numbered sections of examples in references/details.md. Enhanced object literals are the last of the five.
Read ·
details.md: ES6+ core featuresCreating, chaining and combining promises
Shows creating and chaining promises, then the combinators Promise.all, allSettled, race and any.
Read ·
details.md: Promisestry/catch, parallel runs, retry and timeout wrappers
Covers sequential versus parallel execution with Promise.all, an async IIFE, async iteration, top-level await (ES2022), a retry loop and a timeout wrapper built on Promise.race.
Try: “Convert this callback-based file loader to async/await.”
Read ·
details.md: async/awaitClasses, modules, generators, operators
Short summaries of ES2022 classes (private fields, static fields, getters, setters), named, default and dynamic imports, generators, optional chaining, nullish coalescing and logical assignment. Each points to advanced-patterns.md for the full example.
Read ·
details.md: short sectionsArray methods, higher-order functions, composition, immutability
Map, filter, reduce, find, some, every, flatMap and Array.from; currying, partial application and memoization; compose and pipe; pure functions with immutable array and object updates and deep cloning.
Read ·
advanced-patterns.md: functional patternsFull examples with inheritance and generators
A class with private fields and inheritance, named, default and dynamic imports, custom iterators, generators, infinite generators and async generators.
Read ·
advanced-patterns.md: classes, modules, iteratorsDebounce, throttle and lazy evaluation
Short helper implementations of debounce and throttle, and lazy evaluation with generators.
Read ·
advanced-patterns.md: performance helpersEight mistakes to avoid
this binding, async/await without error handling, wrapping already async functions in new promises, mutating objects, forgetting await, blocking the event loop, memory leaks from listeners and timers, and unhandled promise rejections.
Read ·
advanced-patterns.md: common pitfalls
From the official docs
Questions
What does modern-javascript-patterns do?
It gives your agent a modern JavaScript style guide. The agent uses it to refactor legacy code, write async/await, use destructuring and spread, and apply functional patterns.
How do I install it in Claude Code, the Claude app or Codex?
Use the install box at the top of this page. The SKILL.md does not name which clients it works in, and the repo is a collection of plugins, so check the repo README for its own install routes.
Does it cover TypeScript?
The SKILL.md and its reference files are about JavaScript ES6+. The plugin folder it sits in is named javascript-typescript, but nothing in this skill describes TypeScript rules.
Does it need an API key or a build step?
None is mentioned in the SKILL.md or its reference files, and the skill bundles no scripts.
Is it safe to install?
It is three markdown files and bundles no scripts. The risk is in the code the agent writes with it. Review refactors that change async flow or object mutation, since those can change behavior.
Information
updated Nov 2, 2026
- Repository
- wshobson/agents
- Folder
plugins/javascript-typescript/skills/modern-javascript-patterns
Sources
Docs, issue trackers and discussions this page is built from.
Show all 3Hide
- modern-javascript-patterns SKILL.md · github.com
- modern-javascript-patterns details.md · github.com
- modern-javascript-patterns advanced-patterns.md · github.com