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.
SkillScore100Maintained
Automatic
◆Coding pack
Last verified 8/7/2026
What it changes
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
Without skill95%
With skill100%
Checks it passed that the model alone missed
Uses ES modules with import and export syntax
1 fixed21 passed either way0 still failing0 broke
Pass-rate lift
+5 pp
Tokens
+54%
Agent turns
0%
Response time
+9%
Model gemini-3.6-flashMeasured 8/7/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
In a JavaScript web application, scripts were historically loaded via script tags sharing a global window namespace. What standard JavaScript module syntax organizes code into distinct files using import and export statements?
What was checked, without and with the skill
Checked
Without skill
With skill
Uses ES modules with import and export syntax
Missed
Passed
case-16 · gemini-3.6-flash · 8/7/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md38 lines3 files
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.