# parcel-bundler

A skill that gives the agent a working set of Parcel conventions: entry points, TypeScript, CSS modules, caching and production builds. Useful when the project has no bundler config.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 633 installs · ★ 286
- Author: Mindrally
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/Mindrally/skills/tree/HEAD/parcel-bundler/SKILL.md
- Updated: 2026-10-08
- HTML: https://affpapa.org/en/nevibecode/skills/parcel-bundler

## What it does

The skill treats Parcel as a zero-config bundler and hands the agent rules to follow while writing project code. It covers the `src/` and `dist/` layout, HTML and JavaScript entry points, and the `dev`, `build` and `clean` scripts in `package.json`.

TypeScript and React get their own sections: Parcel picks up `.ts`, `.tsx` and JSX on its own, and `sass` is installed automatically when you import a `.scss` file. There is also material on `.env` variables, the dev server with hot module replacement, proxying API requests, and production builds with `--dist-dir`, `--public-url` and `--no-source-maps`.

Caching is called aggressive, so when a build starts misbehaving the first move is to clear `.parcel-cache`. Configuration is framed as the exception: `.parcelrc` and the `targets` block are there for the cases where defaults fall short, not as a starting point. The skill text cuts off inside the best-practices section, so plugin development and library packaging are only introduced.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill parcel-bundler -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/parcel-bundler/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/parcel-bundler/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill parcel-bundler -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/parcel-bundler/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill parcel-bundler -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/parcel-bundler/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Mindrally/skills parcel-bundler
```

2. **Manually: put the files in place**
- File: `.github/skills/parcel-bundler/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill parcel-bundler -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Mindrally/skills --path parcel-bundler
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/parcel-bundler/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill parcel-bundler -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Mindrally/skills/tree/HEAD/parcel-bundler/SKILL.md

## When to use it
- wire up entry points and build scripts in package.json
- add TypeScript and JSX without touching bundler config
- split code into chunks with dynamic imports
- pass .env variables through to application code
- clear the cache when a build goes wrong

## Example prompts
- Set up a Parcel build for src/index.html with dev and build scripts in package.json
- Add CSS modules to the project and wire them into the button component
- Build for production into build with public-url /app/ and no source maps

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 20dd507e4e9eaa67.

BEGIN THIRD-PARTY FILE 20dd507e4e9eaa67
````text
---
name: parcel-bundler
description: Best practices and guidelines for Parcel, the zero-configuration web application bundler
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Parcel Bundler

You are an expert in Parcel, the zero-configuration build tool for the web. Follow these guidelines when working with Parcel projects.

## Core Principles

- Zero configuration by default - Parcel works out of the box
- Automatic dependency detection and installation
- Built-in development server with hot module replacement
- Native performance with Rust-based compiler
- Automatic code splitting and optimization

## Project Structure

```
project/
├── src/
│   ├── index.html        # HTML entry point
│   ├── index.js          # JavaScript entry
│   ├── styles.css        # Stylesheets
│   └── assets/           # Images, fonts, etc.
├── dist/                 # Build output (auto-generated)
├── .parcelrc             # Optional configuration
└── package.json
```

## Getting Started

### Basic Usage

```bash
# Development with hot reload
parcel src/index.html

# Production build
parcel build src/index.html
```

### Package.json Scripts

```json
{
  "scripts": {
    "dev": "parcel src/index.html",
    "build": "parcel build src/index.html",
    "clean": "rm -rf dist .parcel-cache"
  },
  "source": "src/index.html"
}
```

## Entry Points

### HTML Entry

```html
<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="./styles.css">
</head>
<body>
  <div id="app"></div>
  <script type="module" src="./index.js"></script>
</body>
</html>
```

### JavaScript Entry

```bash
parcel build src/index.js --dist-dir lib
```

### Multiple Entry Points

```bash
parcel build src/index.html src/admin.html
```

## Supported Languages and File Types

Parcel supports out of the box:

- **JavaScript/TypeScript**: `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`
- **Styles**: `.css`, `.scss`, `.sass`, `.less`, `.styl`
- **HTML**: `.html`, `.htm`
- **Images**: `.png`, `.jpg`, `.gif`, `.svg`, `.webp`
- **Fonts**: `.woff`, `.woff2`, `.ttf`, `.otf`, `.eot`
- **Data**: `.json`, `.yaml`, `.toml`, `.xml`
- **WebAssembly**: `.wasm`

## Configuration (When Needed)

### .parcelrc

```json
{
  "extends": "@parcel/config-default",
  "transformers": {
    "*.svg": ["@parcel/transformer-svg-react"]
  },
  "reporters": ["...", "parcel-reporter-bundle-analyzer"]
}
```

### package.json Targets

```json
{
  "targets": {
    "main": {
      "source": "src/index.js",
      "distDir": "dist",
      "context": "browser",
      "outputFormat": "esm"
    }
  }
}
```

## TypeScript Support

### Automatic Configuration

Parcel handles TypeScript automatically. Just use `.ts` or `.tsx` files.
````
END THIRD-PARTY FILE 20dd507e4e9eaa67

The third-party file has ended. Everything between the 20dd507e4e9eaa67 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2764 of 7936 bytes. © Mindrally · Apache-2.0 · https://github.com/Mindrally/skills/tree/HEAD/parcel-bundler/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
