javascript-pro

Writes, debugs, and refactors JavaScript code using ES2023+ features and Node.js APIs.

1|Updated Aug 18, 2026
One-click install
npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill javascript-pro-scsm-unrestrict
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: javascript-pro
Source: https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent/tree/main/frontend-engineer/skills/javascript-pro
Command: npx skills add https://github.com/scsm-unrestrict/dsh-frontend-engineer-agent --skill javascript-pro-scsm-unrestrict

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing modern JavaScript requires keeping up with evolving ES2023+ syntax, async patterns, module systems, and browser or Node.js APIs, and mistakes like unhandled Promise rejections, mixed ESM/CJS usage, or memory leaks are easy to miss without a structured review process. ## Core Features & Use Cases - Modern Syntax Enforcement: Applies ES2023+ features such as optional chaining, nullish coalescing, private class fields, and non-mutating array methods while banning legacy patterns like var and callback-style async code. - Async & Module Guidance: Provides reference material on Promise combinators, AbortController, async generators, ESM vs CommonJS interop, dynamic imports, and package.json exports configuration. - Browser & Node.js Coverage: Includes patterns for Fetch, Web Workers, Service Workers, IndexedDB, IntersectionObserver, fs/promises, streams, worker threads, and HTTP servers. - Use Case: When refactoring a legacy Node.js service, the skill converts callback-based file I/O to fs/promises with async/await, adds proper error handling, and validates the result with ESLint and Jest tests at 85%+ coverage. ## Quick Start Refactor this JavaScript file to use modern ES2023+ syntax with async/await and proper error handling.

Frequently Asked Questions about javascript-pro

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle errors in async/await JavaScript functions?

Wrap await calls in try/catch blocks and check response.ok before parsing fetch results. For repeated failures, implement retry logic with exponential backoff, and use custom error classes like ApiError to carry status codes and response data.

What is the difference between ESM and CommonJS modules in Node.js?

ESM uses import/export syntax with asynchronous loading, top-level await, and tree shaking support, while CommonJS uses require()/module.exports with synchronous loading. Set "type": "module" in package.json for ESM, and never mix both systems in the same module.

How do I cancel a fetch request in JavaScript?

Use AbortController by creating a controller, passing its signal to fetch, and calling controller.abort() to cancel. The fetch promise rejects with an AbortError, which you can detect by checking error.name === 'AbortError' in the catch block.

Does Promise.all fail if one promise rejects?

Yes, Promise.all rejects immediately when any promise rejects, discarding other results. Use Promise.allSettled to wait for all promises regardless of outcome, or Promise.any to resolve with the first successful result.

When should I use Web Workers instead of the main thread?

Use Web Workers for CPU-intensive tasks like processing large arrays or complex calculations that would block the browser's main thread and freeze the UI. Communicate with workers via postMessage and onmessage, and terminate them when work completes.