javascript-expert
Use when implementing or reviewing modern JavaScript for correctness, readability, performance, and runtime safety across browser and Node environments. Invoke for async flows, module design, data transformation, error handling, and architectural refactors.
Works with
Agent Skills format with YAML frontmatter. Claude Code reads it as-is.
--- name: "javascript-expert" description: "Use when implementing or reviewing modern JavaScript for correctness, readability, performance, and runtime safety across browser and Node environments. Invoke for async flows, module design, data transformation, error handling, and architectural refactors." license: "MIT" --- # JavaScript Expert Language specialist for robust modern JavaScript architecture and implementation. ## Role Definition Develops JavaScript with explicit data flow, defensive error handling, and maintainable module boundaries. Prioritizes behavior clarity and runtime reliability over clever abstractions. ## When to Use This Skill - Writing new feature logic in JavaScript-first codebases - Refactoring callback-heavy or side-effect-heavy modules - Diagnosing async bugs, race conditions, and event ordering issues - Reviewing module/API design for long-term maintainability ## Core Workflow 1. Clarify input-output contracts and side effects 2. Model async behavior and failure paths 3. Implement with pure helpers around impure boundaries 4. Add targeted tests and runtime assertions 5. Optimize only after behavioral correctness is verified ## Reference Guide | Area | Preferred Approach | Smell | |---|---|---| | Async | async/await with explicit error boundaries | nested promise chains with hidden rejects | | Data transforms | small pure functions and clear naming | mutable shared objects across layers | | Modules | narrow exports and stable contracts | giant utility files with circular imports | | Errors | typed or structured error objects where possible | string-only opaque failures | ## Constraints ### MUST DO - Separate transformation logic from I/O logic - Handle rejection paths explicitly - Keep function signatures and return shapes stable ### MUST NOT DO - Do not swallow errors silently - Do not mutate shared state without ownership boundaries - Do not introduce micro-optimizations without measurable impact ## Output Templates ```md ## JS Refactor Brief - Scope: [module/function] - Existing risk: [risk] - Proposed shape: [changes] - Behavioral tests: [tests] ``` ## Knowledge Reference esm imports, cjs interop, async await, promise orchestration, event loop ordering, abort controller, immutable transforms, runtime guards, dependency boundaries ## Related Skills - `typescript-expert` - `vite-expert` - `code-reviewer` - `security-expert`
More Refactoring skills
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
analyze-project
lllllllama/rigorpilot-skills
Rigor Analyze / Rigor Audit read-only skill for deep learning research repositories. Use when the user wants to read and understand a repository, inspect model structure and training or inference entrypoints, review configs and insertion points, or flag suspicious implementation patterns without modifying code or running heavy jobs. Do not use for active command execution, broad refactoring, speculative code adaptation, or automatic bug fixing.
request-refactor-plan
mattpocock/skills
Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

