javascript-pro

SKILL.md

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
Weekly Installs
4
First Seen
Feb 24, 2026
Installed on
opencode4
gemini-cli4
claude-code4
codex4
kiro-cli4
cursor4