# Terser

> Use this skill when the user wants to minify JavaScript code for production — compress, mangle, tree-shake, and eliminate dead code in ES6+ files.

- Skill: `javimosch/terser` (Agent Skill)
- Install (CLI): `npx skillmds@latest add javimosch/terser`
- Raw SKILL.md: https://api.skillmd.com/api/skills/javimosch/terser/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: javimosch (https://skillmd.com/u/javimosch)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/javimosch/terser

---


# Terser Plugin

Terser minifies and optimizes JavaScript for ES6+. Successor to UglifyJS.

## Usage Examples

- "minify app.js for production"
- "compress with source map generation"
- "mangle variable names for size reduction"
- "remove console.log statements from build"

## Installation

```bash
npm install -g terser
```

## Key Features
- ES6+ syntax support
- Variable name mangling
- Dead code elimination
- Tree shaking
- Expression optimization
- Source map generation
- Comments preservation or removal
- Configurable compression level

