Webpack Config Architect skill for Claude and Codex
Lays down a full webpack setup for a project type with separate development and production configs: shared rules, hot reload in dev, hashing and chunk…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a project needs a complete webpack setup with separate development and production configs, chunk splitting, hashing, and hot reload decided. Do not use for a single quick config for one mode and target, explaining a config you already have, or fixing a broken build. Related topics: coding, webpack.
What it will ask you for
- Project type (choose one: Single-page app, Library, Server-side rendering, Multi-page app)
- Entry points (longer free text)
- Output directory (free text, e.g. "./dist")
- Target browsers (choose any: Chrome, Firefox, Safari, Edge, Legacy browsers)
- Use TypeScript (choose one: Yes, No)
- CSS approach (choose one: Plain CSS, Sass, PostCSS with Tailwind, CSS modules)
- Enable source maps (choose one: Yes, No)
- Additional plugins (longer free text)
- Webpack version (choose one: 5, 4)
How it works
- Write webpack.common.js with entry, output, resolve, and module rules chosen for the project type and CSS approach.
- Write webpack.dev.js merging development mode, devServer with hot module replacement, and cheap source maps.
- Write webpack.prod.js merging production mode, content-hashed filenames, splitChunks for vendor and shared code, minimizer, and the chosen source-map setting.
- Apply project-type specifics: library output and externals, SSR node target, one HtmlWebpackPlugin per entry for multi-page.
- Comment every major decision and list the install command with packages matching the webpack major version.
What you get
Three javascript code blocks (common, dev, prod) with decision comments, then one install command naming every required package.
What it watches out for
- Duplicating rules across dev and prod instead of merging from a common file, so they drift within a month.
- Content-hashing filenames in development, which defeats hot module replacement and fills the output folder.
- Adding IE-era transpilation targets by default, which inflates every bundle for users nobody has.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.