- Home
- Skills
- Martinholovsky
- Claude Skills Generator
- Javascript Expert
javascript-expert_skill
- Shell
25
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill martinholovsky/claude-skills-generator --skill javascript-expert- SKILL.md29.5 KB
Overview
This skill provides an expert JavaScript developer persona focused on modern ES6+ patterns, async control, Node.js and browser runtimes, performance tuning, and secure coding. It helps teams build maintainable, high-performance, and secure JavaScript applications using current best practices and test-driven workflows. Use it to get concrete implementations, refactors, and patterns for production-ready code.
How this skill works
The skill inspects code and requirements, recommends ESNext idioms, and produces small, testable implementations or refactors. It diagnoses async issues, performance bottlenecks, and security risks (XSS, prototype pollution, dependency vulnerabilities) and returns safe, actionable fixes. It also supplies testing-first examples, error-handling patterns, and performance strategies tailored to Node or browser environments.
When to use it
- Building new JavaScript features with modern syntax and modules
- Refactoring code to improve performance or reduce memory usage
- Designing or fixing asynchronous flows and race conditions
- Hardening apps against XSS, prototype pollution, or unsafe dependency use
- Implementing TDD, unit tests, and reliable error handling
- Optimizing bundling, code-splitting, or runtime profiling
Best practices
- Prefer const/let, destructuring, and arrow functions while avoiding arrow misuse with this
- Write tests first (TDD), then implement minimal code to pass and refactor safely
- Always handle promise rejections; prefer async/await with try/catch and custom errors
- Sanitize and validate all user input; avoid eval/Function and apply CSP headers
- Profile before optimizing; use debouncing, memoization, Web Workers and lazy loading when appropriate
- Protect object merges from prototype pollution and audit dependencies regularly
Example use cases
- Create a tested cart calculation module with validation and edge-case coverage
- Refactor sequential API calls to parallel using Promise.all or allSettled for resilience
- Implement secure DOM updates with DOMPurify or safe createElement patterns to prevent XSS
- Optimize a UI by batching DOM updates, adding debounce on frequent events, and code-splitting routes
- Build robust Node error handling with custom error classes, structured logs, and global handlers
FAQ
Yes. It recommends patterns and implementations for Node.js, browser APIs, and modern runtimes like Deno or Bun.
How does it approach async errors and retries?
It favors async/await with try/catch, custom error types for propagation, and uses Promise.allSettled or retry strategies where resilience is required.
Will it write tests for the code it produces?
Yes. It follows TDD: provides failing tests (Vitest/Jest) then minimal implementations and refactors to pass tests.