Master ES6+ features including async/await, destructuring
Modern javascript patterns

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…
--- 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. --- # Modern JavaScript Patterns Comprehensive guide for mastering modern JavaScript (ES6+) features, functional programming patterns, and best practices for writing clean, maintainable, and performant code. ## When to Use This Skill - Refactoring legacy JavaScript to modern syntax - Implementing functional programming patterns - Optimizing JavaScript performance - Writing maintainable and readable code - Working with asynchronous operations - Building modern web applications - Migrating from callbacks to Promises/async-await
Overview
Comprehensive guide for mastering modern JavaScript (ES6+) features, functional programming patterns, and best practices for writing clean, maintainable, and performant code.
Manual install (npx, ZIP)
npx skills add wshobson/agents --skill modern-javascript-patterns -g -a claude-codemkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \
| tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/javascript-typescript/skills/modern-javascript-patternsNew-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/bc9405f9b4e0cbf0513f/modern-javascript-patterns.zip" -OutFile "$env:TEMP\modern-javascript-patterns.zip"; Expand-Archive "$env:TEMP\modern-javascript-patterns.zip" -DestinationPath "$HOME\.claude\skills" -ForceConnects with Agent Alley MCP · agentalley.io/mcp
Files included
SKILL.md2.1 KBreferences/2 files · 20.0 KB
Read the files here
Show the full text44 lines
Modern JavaScript Patterns
Comprehensive guide for mastering modern JavaScript (ES6+) features, functional programming patterns, and best practices for writing clean, maintainable, and performant code.
When to Use This Skill
- Refactoring legacy JavaScript to modern syntax
- Implementing functional programming patterns
- Optimizing JavaScript performance
- Writing maintainable and readable code
- Working with asynchronous operations
- Building modern web applications
- Migrating from callbacks to Promises/async-await
- Implementing data transformation pipelines
Detailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Best Practices
- Use const by default: Only use let when reassignment is needed
- Prefer arrow functions: Especially for callbacks
- Use template literals: Instead of string concatenation
- Destructure objects and arrays: For cleaner code
- Use async/await: Instead of Promise chains
- Avoid mutating data: Use spread operator and array methods
- Use optional chaining: Prevent "Cannot read property of undefined"
- Use nullish coalescing: For default values
- Prefer array methods: Over traditional loops
- Use modules: For better code organization
- Write pure functions: Easier to test and reason about
- Use meaningful variable names: Self-documenting code
- Keep functions small: Single responsibility principle
- Handle errors properly: Use try/catch with async/await
- Use strict mode:
'use strict'for better error catching
For common pitfalls (this binding, promise anti-patterns, memory leaks), see references/advanced-patterns.md.
| 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 | |
| 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 | **Use const by default**: Only use let when reassignment is needed |
| 28 | **Prefer arrow functions**: Especially for callbacks |
| 29 | **Use template literals**: Instead of string concatenation |
| 30 | **Destructure objects and arrays**: For cleaner code |
| 31 | **Use async/await**: Instead of Promise chains |
| 32 | **Avoid mutating data**: Use spread operator and array methods |
| 33 | **Use optional chaining**: Prevent "Cannot read property of undefined" |
| 34 | **Use nullish coalescing**: For default values |
| 35 | **Prefer array methods**: Over traditional loops |
| 36 | **Use modules**: For better code organization |
| 37 | **Write pure functions**: Easier to test and reason about |
| 38 | **Use meaningful variable names**: Self-documenting code |
| 39 | **Keep functions small**: Single responsibility principle |
| 40 | **Handle errors properly**: Use try/catch with async/await |
| 41 | **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]. |
| 44 |
Details
- Updated
- Sep 21, 2026
- License
- MIT
- Stars on the repo
- ★ 39,857
- Checked
- Source
- wshobson/agents ↗
- Creator
- wshobson · 179 listings
Similar skills
See all →
SkillA task is too large for one model passAdvisor orchestrator worker
SkillRun the CCS Align seat's hourly breathing cycleCCS Align — Worker Watch seat (Phases 0–2 shipped; Phase 3 = verify / sign-off)
SkillSummarize and review what changed while you were awayCatchup — Async-Team Return Briefing
SkillMaster Python asyncio, concurrent programmingAsync python patterns
SkillMaster Go concurrency with goroutines, channelsGo concurrency patterns
SkillDesign microservices architectures with service boundariesMicroservices patternsMore from wshobson
SkillMaster C/.NET backend development patterns for building
SkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliance
SkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Design
SkillMigrate from AngularJS to Angular using hybrid modeAngular migration
SkillUnderstand anti-reversing, obfuscationAnti reversing techniques
SkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patterns