Webpack Config Formatter skill for Claude and Codex
A webpack.config.js laid out in the conventional section order with a commented heading on each block, generated from your entry, output, loaders, plugins…
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 webpack.config.js needs writing in a clean conventional order with a comment heading on each block, from a short spec of entry, output, loaders, plugins, port, and target. Do not use for diagnosing a failing build, splitting an existing config into files, or cutting bundle size. Related topics: coding, webpack.
What it will ask you for
- Entry point (free text, e.g. "./src/index.js")
- Output directory (free text, e.g. "./dist")
- Build mode (choose one: development, production)
- Loaders to include (choose any: Babel, TypeScript, CSS, SASS, Images, JSON)
- Plugins needed (choose any: HtmlWebpackPlugin, MiniCssExtractPlugin, DefinePlugin, CleanWebpackPlugin, CopyWebpackPlugin)
- Dev server port (number from 3000 to 9000)
- Target environment (choose one: web, node, electron)
How it works
- Fix the section order (requires, mode, entry, output, resolve, module.rules, plugins, devServer, devtool, optimization) so every setting has one place to live.
- Write one module rule per selected loader with the test pattern, the loader chain in correct execution order, and node_modules excluded where it applies.
- Instantiate only the selected plugins with sensible options, replacing any that the mode or webpack version makes redundant and noting why in a comment.
- Add devServer on the given port for the web target only, and set target-specific output and externals for node or electron.
- Head every block with a short comment and list the npm packages to install at the top, then return the file as one javascript code block.
What you get
One javascript code block containing the complete webpack.config.js, opened by a comment listing packages to install, with a comment heading above each configuration block.
What it watches out for
- Ordering a CSS loader chain as css-loader then style-loader in the array, which runs them backwards and breaks the build.
- Enabling devServer for a node or electron target, where it does nothing and confuses the next reader.
- Adding CleanWebpackPlugin on webpack 5 alongside output.clean, so the output folder is cleaned twice and the plugin version drifts.
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.