This skill helps you write and review JavaScript code by applying best-practice guidelines across performance, async patterns, security, and modern features.
npx playbooks add skill jcastillotx/vibe-skeleton-app --skill javascript-best-practices
Comprehensive coding standards for JavaScript development, optimized for AI agents and LLMs. Contains 24 rules across 8 categories, prioritized by impact.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | Performance | CRITICAL | perf- |
| 2 | Async Patterns | CRITICAL | async- |
| 3 | Security | HIGH | security- |
| 4 | Error Handling | HIGH | error- |
| 5 | ES Modules | MEDIUM-HIGH | module- |
| 6 | Data Structures | MEDIUM | data- |
| 7 | DOM Manipulation | MEDIUM | dom- |
| 8 | Modern Features | LOW-MEDIUM | modern- |
perf-avoid-memory-leaks - Clean up event listeners and intervalsperf-dom-batch-updates - Batch DOM updates with DocumentFragmentperf-debounce-throttle - Debounce scroll/resize handlersperf-avoid-layout-thrashing - Separate reads and writes to DOMperf-web-workers - Use Web Workers for heavy computationasync-promise-all - Use Promise.all() for parallel operationsasync-promise-allsettled - Use allSettled() when some can failasync-error-boundaries - Handle promise rejections properlyasync-avoid-nested-promises - Flatten with async/awaitasync-cancellation - Use AbortController for cancellable requestssecurity-no-innerhtml - Use textContent instead of innerHTMLsecurity-no-eval - Never use eval() or new Function()security-sanitize-user-input - Sanitize before DOM insertionsecurity-csp-compliance - Write CSP-compliant codeerror-custom-errors - Create custom Error classeserror-async-try-catch - Wrap async operations in try-catcherror-global-handler - Implement window.onerror handlermodule-named-exports - Prefer named exports for tree-shakingmodule-barrel-files - Avoid barrel files in performance-critical codemodule-dynamic-imports - Use dynamic imports for code splittingdata-map-over-object - Use Map for dynamic key collectionsdata-set-for-uniqueness - Use Set for unique value collectionsdata-immutable-updates - Use spread operator for immutabilitymodern-optional-chaining - Use ?. for safe property accessRead individual rule files for detailed explanations and code examples.
For the complete guide with all rules expanded: AGENTS.md
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.