Modern Javascript Patterns
Unverified●30/40Claude Code◐PartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
Cursor◐PartialPlain prose you can paste in — but no Cursor rules file
Codex◐PartialPlain prose you can paste in — but no AGENTS.md
Gemini CLI◐PartialPlain prose you can paste in
Copilot◐PartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add modern-javascript-patternsWho is stuck, and on what
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.
The whole source
Frontmatter — 2 properties
| name | modern-javascript-patterns |
|---|---|
| description | 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. |
| 1 | --- |
| 2 | name: modern-javascript-patterns |
| 3 | description: 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. |
| 4 | ---A5 — No allowed-tools declared — no way to tell what this skill may touch |
| 5 | |
| 6 | # Modern JavaScript Patterns |
| 7 | |
| 8 | Comprehensive guide for mastering modern JavaScript (ES6+) features, functional programming patterns, and best practices for writing clean, maintainable, and performant code. |
| 9 | |
| 10 | ## When to Use This Skill |
| 11 | |
| 12 | - Refactoring legacy JavaScript to modern syntax |
| 13 | - Implementing functional programming patterns |
| 14 | - Optimizing JavaScript performance |
| 15 | - Writing maintainable and readable code |
| 16 | - Working with asynchronous operations |
| 17 | - Building modern web applications |
| 18 | - Migrating from callbacks to Promises/async-await |
| 19 | - Implementing data transformation pipelines |
| 20 | |
| 21 | ## Detailed patterns and worked examples |
| 22 | |
| 23 | Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient. |
| 24 | |
| 25 | ## Best Practices |
| 26 | |
| 27 | 1. **Use const by default**: Only use let when reassignment is needed |
| 28 | 2. **Prefer arrow functions**: Especially for callbacks |
| 29 | 3. **Use template literals**: Instead of string concatenation |
| 30 | 4. **Destructure objects and arrays**: For cleaner code |
| 31 | 5. **Use async/await**: Instead of Promise chains |
| 32 | 6. **Avoid mutating data**: Use spread operator and array methods |
| 33 | 7. **Use optional chaining**: Prevent "Cannot read property of undefined" |
| 34 | 8. **Use nullish coalescing**: For default values |
| 35 | 9. **Prefer array methods**: Over traditional loops |
| 36 | 10. **Use modules**: For better code organization |
| 37 | 11. **Write pure functions**: Easier to test and reason about |
| 38 | 12. **Use meaningful variable names**: Self-documenting code |
| 39 | 13. **Keep functions small**: Single responsibility principle |
| 40 | 14. **Handle errors properly**: Use try/catch with async/await |
| 41 | 15. **Use strict mode**: `'use strict'` for better error catching |
| 42 | |
| 43 | For common pitfalls (this binding, promise anti-patterns, memory leaks), see [references/advanced-patterns.md](references/advanced-patterns.md). |
| 44 |
Reviews
Installed this one?Write the first review and take the Trailblazer badge.
Alternatives
Subagent Driven DevelopmentUse when executing implementation plans with independent tasks in the current session◐◐◐◐◐●36/40Python Code Style & DocumentationPython code style, linting, formatting, naming conventions, and documentation standards. Use when writing new code, reviewing style, configuring linters, writing docstrings, or establishing project standards.◐····●35/40Competitor Price Analysis 💲Competitor pricing strategy analysis and market positioning. Price mapping, pricing gaps identification, elasticity signals evaluation, and strategic pricing optimization. Use when the user asks about competitor pricing, price analysis, pricing strategy, or co◐····●34/40Competitor Price Tracker 📊Set up competitor price tracking and monitoring workflows. Track price changes, detect promotions, analyze pricing patterns, and get alerts for competitive price movements.◐····●34/40