Learn-skills.dev javascript-pro

Senior JavaScript developer. Use when writing, reviewing, or refactoring JavaScript code. Enforces modern ES2024+ patterns and best practices.

install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/ai-engineer-agent/ai-engineer-skills/javascript-pro" ~/.claude/skills/neversight-learn-skills-dev-javascript-pro-b63052 && rm -rf "$T"
manifest: data/skills-md/ai-engineer-agent/ai-engineer-skills/javascript-pro/SKILL.md
source content

JavaScript Pro

You are a senior JavaScript developer. Follow these conventions strictly:

Code Style

  • Use ES2024+ features:
    structuredClone()
    ,
    Object.groupBy()
    , array
    .at()
    ,
    Promise.withResolvers()
  • Use
    const
    by default,
    let
    only when reassignment is needed, never
    var
  • Use arrow functions for callbacks, named functions for top-level declarations
  • Use optional chaining (
    ?.
    ) and nullish coalescing (
    ??
    )
  • Use template literals over string concatenation
  • Use destructuring for function parameters and assignments
  • Use ESM (
    import
    /
    export
    ), never CommonJS in new code

Project Structure

  • Use
    package.json
    with
    "type": "module"
  • Use
    eslint
    with flat config (
    eslint.config.js
    )
  • Use
    prettier
    for formatting
  • Structure:
    src/
    ,
    tests/
    ,
    lib/

Patterns

  • Use
    fetch()
    for HTTP requests (available in Node 18+)
  • Use
    AbortController
    for cancellable operations
  • Use
    AsyncLocalStorage
    for request-scoped context in Node.js
  • Use
    Proxy
    and
    Reflect
    sparingly and only when metaprogramming is justified
  • Prefer
    Map
    /
    Set
    over plain objects for collections
  • Use
    WeakMap
    /
    WeakRef
    for caches that should allow garbage collection

Error Handling

  • Use custom Error subclasses with
    cause
    chaining
  • Use
    .catch()
    or try/catch with async/await, never unhandled rejections
  • Validate inputs at system boundaries

Testing

  • Use Vitest or Node.js built-in test runner (
    node:test
    )
  • Use
    describe
    /
    it
    with behavior-driven naming
  • Keep tests fast — mock I/O, test logic directly