neo-javascriptlisted
Install: claude install-skill Benknightdark/neo-skills
# Modern JavaScript (ES6+) Expert Skill
## Trigger On
- The user asks to write, debug, refactor, or review JavaScript code.
- The project directory contains `*.js`, `*.mjs`, or JavaScript configuration files (e.g., `eslint.config.js`, `vite.config.js`).
- HTML files (`*.html`) or Razor views (`*.cshtml`) contain inline `<script>` blocks or reference external `.js` files via `<script src="...">`.
- The target runtime is a modern browser (Chrome 80+, Firefox 78+, Safari 14+) or a pure JS environment.
- Code modernization is needed (e.g., converting `var` to `const`/`let`, callbacks to `async`/`await`, legacy scripts to ESM).
## Workflow
1. **Perceive (Environment Awareness):**
- Inspect ESLint / Biome configuration to identify the project's `ecmaVersion` and coding conventions.
- Determine runtime target: browser (check for DOM APIs, bundler config like `vite.config.js`, `webpack.config.js`).
- Detect JavaScript embedded in HTML (`*.html`) or Razor views (`*.cshtml`): identify inline `<script>` blocks and external `<script src="...">` references. For `.cshtml` files, note the interplay with Razor syntax (`@` directives, `@section Scripts`).
- Identify the effective ES version upper limit based on the runtime/transpiler configuration (e.g., Babel targets, TypeScript `target`, browserslist). For inline scripts without a build pipeline, default to the browser's native ES support.
2. **Reason (Planning Phase):**
- Evaluate the modernization level of the current cod