
Javascript Pro
Implement and refactor modern ES2023+ JavaScript for browser apps, Node services, and module-based tooling with async and performance best practices.
Overview
JavaScript Pro is an agent skill for the Build phase that writes, debugs, and refactors modern ES2023+ JavaScript for browser and Node.js applications.
Install
npx skills add https://github.com/jeffallan/claude-skills --skill javascript-proWhat is this skill?
- Four-step core workflow: analyze package.json and targets, design modules, implement ES2023+, validate with ESLint
- Covers ESM/CJS module systems, async/await flows, Web Workers, Service Workers, and Fetch
- Node.js backend service patterns alongside browser performance and memory tuning
- Explicit triggers for reviewing .js, .mjs, and .cjs files for correctness
- Related fullstack-guardian skill for broader stack guardrails
- 4-step core workflow from analyze requirements through ESLint validation
- Frontmatter version 1.1.0 with explicit ES2023+ and module-system triggers
Adoption & trust: 3.3k installs on skills.sh; 9.7k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need production-grade vanilla JavaScript with correct modules, async patterns, and lint-clean code—not copy-pasted snippets that break across ESM and CJS.
Who is it for?
Solo builders shipping browser tools, lightweight SaaS frontends, or Node microservices who want agent help on modern JS without adopting a full framework.
Skip if: Teams standardized on React/Vue-only codegen who never touch vanilla modules, or beginners who only need a language primer without lint and architecture steps.
When should I use this skill?
Building vanilla JavaScript applications, implementing async/await, working with ESM/CJS, Node.js APIs, Web Workers, Fetch API, or reviewing .js/.mjs/.cjs for best practices.
What do I get? / Deliverables
You get implemented or refactored JS aligned to your package targets, with architecture notes and ESLint-validated changes ready to merge or deploy.
- ES2023+ JavaScript implementation or refactor with module and async design
- Lint-validated source changes ready for commit or PR
Recommended Skills
Journey fit
Build is where vanilla JS, modules, and runtime APIs become shipping code for solo products across web and Node. Frontend is the canonical shelf because triggers emphasize browser APIs, Workers, and Fetch, while Node work stays in the same implementation skill.
How it compares
Use this language specialist skill instead of generic chat for .mjs/.cjs refactors where module system and async edge cases matter.
Common Questions / FAQ
Who is javascript-pro for?
Developers and agent users building vanilla JavaScript apps, Node backends, or Worker/Fetch-heavy clients who want ES2023+ patterns and review discipline.
When should I use javascript-pro?
Use it during Build when implementing features, fixing async bugs, optimizing browser performance, or reviewing .js/.mjs/.cjs files before Ship.
Is javascript-pro safe to install?
It may suggest shell and lint commands on your repo; review the Security Audits panel on this Prism page and run tools only in trusted projects.
SKILL.md
READMESKILL.md - Javascript Pro
# JavaScript Pro ## When to Use This Skill - Building vanilla JavaScript applications - Implementing async/await patterns and Promise handling - Working with modern module systems (ESM/CJS) - Optimizing browser performance and memory usage - Developing Node.js backend services - Implementing Web Workers, Service Workers, or browser APIs ## Core Workflow 1. **Analyze requirements** — Review `package.json`, module system, Node version, browser targets; confirm `.js`/`.mjs`/`.cjs` conventions 2. **Design architecture** — Plan modules, async flows, and error handling strategies 3. **Implement** — Write ES2023+ code with proper patterns and optimisations 4. **Validate** — Run linter (`eslint --fix`); if linter fails, fix all reported issues and re-run before proceeding. Check for memory leaks with DevTools or `--inspect`, verify bundle size; if leaks are found, resolve them before continuing 5. **Test** — Write comprehensive tests with Jest achieving 85%+ coverage; if coverage falls short, add missing cases and re-run. Confirm no unhandled Promise rejections ## Reference Guide Load detailed guidance based on context: | Topic | Reference | Load When | |-------|-----------|-----------| | Modern Syntax | `references/modern-syntax.md` | ES2023+ features, optional chaining, private fields | | Async Patterns | `references/async-patterns.md` | Promises, async/await, error handling, event loop | | Modules | `references/modules.md` | ESM vs CJS, dynamic imports, package.json exports | | Browser APIs | `references/browser-apis.md` | Fetch, Web Workers, Storage, IntersectionObserver | | Node Essentials | `references/node-essentials.md` | fs/promises, streams, EventEmitter, worker threads | ## Constraints ### MUST DO - Use ES2023+ features exclusively - Use `X | null` or `X | undefined` patterns - Use optional chaining (`?.`) and nullish coalescing (`??`) - Use async/await for all asynchronous operations - Use ESM (`import`/`export`) for new projects - Implement proper error handling with try/catch - Add JSDoc comments for complex functions - Follow functional programming principles ### MUST NOT DO - Use `var` (always use `const` or `let`) - Use callback-based patterns (prefer Promises) - Mix CommonJS and ESM in the same module - Ignore memory leaks or performance issues - Skip error handling in async functions - Use synchronous I/O in Node.js - Mutate function parameters - Create blocking operations in the browser ## Key Patterns with Examples ### Async/Await Error Handling ```js // ✅ Correct — always handle async errors explicitly async function fetchUser(id) { try { const response = await fetch(`/api/users/${id}`); if (!response.ok) throw new Error(`HTTP ${response.status}`); return await response.json(); } catch (err) { console.error("fetchUser failed:", err); return null; } } // ❌ Incorrect — unhandled rejection, no null guard async function fetchUser(id) { const response = await fetch(`/api/users/${id}`); return response.json(); } ``` ### Optional Chaining & Nullish Coalescing ```js // ✅ Correct const city = user?.address?.city ?? "Unknown"; // ❌ Incorrect — throws if address is undefined const city = user.address.city || "Unknown"; ``` ### ESM Module Struct