Compression
Teaches JavaScript compression techniques including Gzip and Brotli. Use when optimizing network transfer times or configuring server-side compression for production builds.
Install
npx skills add PatternsDev/skills --skill compressiongit clone --depth 1 https://github.com/PatternsDev/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/javascript/compression ~/.claude/skills/compressionPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Compressing JavaScript ## Table of Contents - [When to Use](#when-to-use) - [Instructions](#instructions) - [Details](#details) - [Source](#source) JavaScript is the second biggest [contributor to page size](https://almanac.httparchive.org/en/2020/page-weight#fig-2) and the second most [requested web resource](https://almanac.httparchive.org/en/2020/page-weight#fig-4) on the internet after images. We use patterns that reduce the transfer, load, and execution time for JavaScript to improve website performance. Compression can help reduce the time needed to transfer scripts over the network. ## When to Use - Use this when you need to reduce JavaScript payload sizes for faster page loads - This is helpful when optimizing network transfer times, especially for users on slower connections - Use this alongside minification, code-splitting, and caching strategies ## Instructions - Prefer Brotli compression over Gzip for better compression ratios at similar speed - Use static compression for assets that don't change frequently and dynamic compression for frequently changing content - Enable compression at the server or CDN level (e.g., Nginx, Vercel, Netlify) - Minify JavaScript before applying compression - Be mindful of the granularity trade-off: larger bundles compress better, but smaller chunks cache better ## Details
Details
- Skill name
compression- Repository
- PatternsDev/skills
- Path
javascript/compression/SKILL.md- Repo updated
- 15 April 2026
FAQ
What does the Compression skill do?
Teaches JavaScript compression techniques including Gzip and Brotli. Use when optimizing network transfer times or configuring server-side compression for production builds.
How do I install the Compression skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add PatternsDev/skills --skill compression. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Compression 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.
Dynamic Import
259PatternsDev/skills
Teaches dynamic import() for on-demand code loading. Use when you need to reduce initial bundle size by lazily loading modules that aren't required at startup.
Command Pattern
259PatternsDev/skills
Teaches the command pattern for decoupling task execution from invocation. Use when you need undo/redo functionality, queued operations, or want to decouple the object that invokes an operation from the one that performs it.
Factory Pattern
259PatternsDev/skills
Teaches the factory pattern for flexible object creation. Use when you need to create objects dynamically without using the new keyword or when object creation logic should be centralized.
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.