Js Performance Patterns
Provides framework-agnostic JavaScript runtime performance patterns. Use when optimizing hot paths, loops, DOM operations, caching, or data structure choices in performance-critical code.
Install
npx skills add PatternsDev/skills --skill js-performance-patternsgit clone --depth 1 https://github.com/PatternsDev/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/javascript/js-performance-patterns ~/.claude/skills/js-performance-patternsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# JavaScript Performance Patterns ## Table of Contents - [When to Use](#when-to-use) - [Instructions](#instructions) - [Details](#details) - [Source](#source) Runtime performance micro-patterns for JavaScript hot paths. These patterns matter most in tight loops, frequent callbacks (scroll, resize, animation frames), and data-heavy operations. They apply to any JavaScript environment — React, Vue, vanilla, Node.js. ## When to Use Reference these patterns when: - Profiling reveals a hot function or tight loop - Processing large datasets (1,000+ items) - Handling high-frequency events (scroll, mousemove, resize) - Optimizing build-time or server-side scripts - Reviewing code for performance in critical paths ## Instructions - Apply these patterns only in **measured hot paths** — code that runs frequently or processes large datasets. Don't apply them to cold code paths where readability is more important than nanosecond gains. ## Details ### Overview Micro-optimizations are **not** a substitute for algorithmic improvements. Address the algorithm first (O(n^2) to O(n), removing waterfalls, reducing DOM mutations). Once the algorithm is right, these patterns squeeze additional performance from hot paths. --- ### 1. Use `Set` and `Map` for Lookups **Impact: HIGH for large collections** — O(1) vs O(n) per lookup.
Details
- Skill name
js-performance-patterns- Repository
- PatternsDev/skills
- Path
javascript/js-performance-patterns/SKILL.md- Repo updated
- 15 April 2026
FAQ
What does the Js Performance Patterns skill do?
Provides framework-agnostic JavaScript runtime performance patterns. Use when optimizing hot paths, loops, DOM operations, caching, or data structure choices in performance-critical code.
How do I install the Js Performance Patterns skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add PatternsDev/skills --skill js-performance-patterns. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Js Performance Patterns popular?
It lives in PatternsDev/skills, which has 259 GitHub stars and 28 forks.
Related skills
AI UI Patterns
259PatternsDev/skills
Teaches design patterns for building AI-powered React interfaces. Use when creating chatbots, intelligent assistants, streaming UIs, or any AI-driven user experience in React.
Async Components
259PatternsDev/skills
Teaches async component loading in Vue for performance optimization. Use when you have heavy components that aren't needed on initial render and can be loaded on demand.
Bundle Splitting
259PatternsDev/skills
Teaches bundle splitting techniques for web performance. Use when your application has a large JavaScript bundle that affects load times or when you need to reduce FCP/LCP.
Loading Sequence
259PatternsDev/skills
Teaches resource loading sequence optimization for Core Web Vitals. Use when you need to improve FCP, LCP, or FID by reordering how critical resources are discovered and loaded.
Islands Architecture
259PatternsDev/skills
Teaches the islands architecture pattern for partial hydration. Use when building content-heavy sites where most of the page is static and only small regions need interactivity.
Mediator Pattern
259PatternsDev/skills
Teaches the mediator pattern for centralized component communication. Use when multiple components need to communicate and direct coupling between them creates complexity or tight dependencies.
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.