optimize-js-library-size

Reduce JavaScript library file sizes with terser while preserving the public API.

Updated Mar 9, 2026
One-click install
npx skills add https://github.com/TomerAberbach/claude-config --skill optimize-js-library-size
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize-js-library-size
Source: https://github.com/TomerAberbach/claude-config/tree/main/skills/optimize-js-library-size
Command: npx skills add https://github.com/TomerAberbach/claude-config --skill optimize-js-library-size

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the need to reduce the file size of JavaScript libraries, improving load times and performance without compromising functionality.

Core Features & Use Cases

  • Size Reduction: Optimizes minified and gzipped/brotli minified sizes.
  • API Preservation: Ensures the public API remains unchanged.
  • Strategic Optimization: Focuses on significant structural improvements over minor tweaks.
  • Use Case: A developer has a large JavaScript charting library that needs to be included in a web application. This Skill can be used to significantly reduce its size, leading to faster page loads for end-users.

Quick Start

Use the optimize-js-library-size skill to reduce the size of the attached file 'my-library.js'.

Frequently Asked Questions about optimize-js-library-size

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce the minified and gzipped size of a JavaScript library?

Reduce JavaScript library size by applying structural changes and dead code elimination to optimize both minified and compressed file sizes while preserving the public API.

What is the best way to shrink a JavaScript library without breaking its public API?

Shrink a JavaScript library safely by focusing on significant structural improvements and dead code elimination, which optimizes file size while ensuring the public API remains unchanged.

Do I need terser and node.js to optimize JavaScript library file size?

Yes, you need terser for minification and node.js for size measurement to effectively optimize and evaluate the compressed file size of your JavaScript library.

How does dead code elimination improve JavaScript bundling and code size?

Dead code elimination improves JavaScript code size by removing unused code structurally, leading to significant performance gains and smaller minified and gzipped bundles.

Can I optimize an existing JavaScript charting library for faster web page loads?

Yes, you can optimize an existing large JavaScript charting library to significantly reduce its file size, which directly leads to faster page loads for end-users.