Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

webpack-plugin-authoring

БесплатноБез исполняемых скриптовНе проверен

Writing webpack 5 plugins — hook selection (compiler vs compilation, tap vs tapAsync, processAssets stages), the asset pipeline (emitAsset, source classes…

pproencaот pproenca★ 231 звезда на GitHub

Об этом скилле

dot-skills Webpack 5 Plugins Best Practices

Comprehensive guide for writing correct, performant webpack 5 plugins. Contains 44 rules across 8 categories (8 hook + 7 asset + 5 cache + 5 life + 4 schema + 5 diag + 5 perf + 5 compat = 44), ordered by the authoring lifecycle: hook choice is the foundation, then asset manipulation, then caching/watch-mode correctness, then lifecycle hygiene, then user-facing concerns (schema validation, error reporting), then performance, then packaging.

Patterns are derived from webpack/webpack, the webpack-contrib plugin suite (mini-css-extract, terser, compression, copy, css-minimizer), and Next.js's webpack integration in vercel/next.js.

When to Apply

Reference these rules whenever:

  • Writing a new plugin (defining apply(compiler), picking which hook to tap)
  • Reviewing existing plugin code for correctness or performance
  • Debugging "why isn't my plugin's output showing up" — usually a hook/stage mismatch
  • Adding asset manipulation logic (processAssets, emitAsset, updateAsset)
  • Fixing watch-mode staleness or persistent-cache poisoning
  • Migrating a plugin from webpack 4 to webpack 5 (or supporting both)
  • Publishing a plugin to npm (export shape, peerDependencies, schema)

Rule Categories by Priority

Priority Category Impact Prefix
1 Hook Selection & Tap Patterns CRITICAL hook-
2 Asset Pipeline CRITICAL asset-
3 Caching & Watch Mode HIGH cache-
4 Plugin Lifecycle & State HIGH life-
5 Schema & Options Validation MEDIUM-HIGH schema-
6 Errors, Warnings & Logging MEDIUM-HIGH diag-
7 Performance & Parallelism MEDIUM perf-
8 Compatibility & Packaging LOW-MEDIUM compat-

Quick Reference

1. Hook Selection & Tap Patterns (CRITICAL)

2. Asset Pipeline (CRITICAL)

3. Caching & Watch Mode (HIGH)

4. Plugin Lifecycle &

Полный SKILL.md на GitHub

Установить webpack-plugin-authoring в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

AGENTS.mdassets/templates/_template.mdmetadata.jsonreferences/_sections.mdreferences/asset-buffer-not-source-for-binary.mdreferences/asset-content-hash-via-output-options.mdreferences/asset-delete-then-emit-loses-info.mdreferences/asset-emit-asset-not-direct-assignment.mdreferences/asset-preserve-source-maps.mdreferences/asset-set-info-metadata.mdreferences/asset-source-from-compiler-webpack.mdreferences/cache-add-file-dependencies.mdreferences/cache-build-dependencies-for-persistent-cache.mdreferences/cache-context-dependencies-for-directories.mdreferences/cache-missing-dependencies-for-optional-files.mdreferences/cache-use-input-file-system.mdreferences/compat-custom-hooks-via-weakmap.mdreferences/compat-export-shape-and-cjs-esm.mdreferences/compat-feature-detection-not-version-check.mdreferences/compat-use-compiler-webpack-namespace.mdreferences/compat-webpack-as-peer-dependency.mdreferences/diag-attach-loc-to-errors.mdreferences/diag-progress-reporting.mdreferences/diag-push-webpack-error-not-throw.mdreferences/diag-use-compilation-get-logger.mdreferences/diag-warnings-vs-errors-exit-codes.mdreferences/hook-bail-hook-return-semantics.mdreferences/hook-name-matches-class-name.mdreferences/hook-normal-module-factory-stages.mdreferences/hook-prefer-process-assets-over-emit.mdreferences/hook-process-assets-stage.mdreferences/hook-tap-method-matches-hook-type.mdreferences/hook-tap-once-not-per-compilation.mdreferences/hook-thiscompilation-vs-compilation.mdreferences/life-cleanup-in-shutdown-hook.mdreferences/life-constructor-stores-options-only.mdreferences/life-defensively-copy-user-options.mdreferences/life-multi-compiler-isolation.mdreferences/life-no-mutable-state-across-builds.mdreferences/perf-avoid-source-toString-in-hot-paths.md

FAQ

Что делает скилл webpack-plugin-authoring?

Writing webpack 5 plugins — hook selection (compiler vs compilation, tap vs tapAsync, processAssets stages), the asset pipeline (emitAsset, source classes, info metadata, source maps), watch-mode and persistent caching (file/context/missing/buildDependencies), plugin lifecycle (constructor purity, multi-compiler isolation, shutdown cleanup), schema-utils validation, WebpackError reporting, jest-worker parallelism, and compatibility patterns (compiler.webpack namespace, peerDependencies, getCompilationHooks WeakMap). Patterns are drawn from production plugins like mini-css-extract-plugin, terser-webpack-plugin, compression-webpack-plugin, and Next.js's webpack plugins. Trigger when writing, reviewing, or debugging webpack 5 plugins — even if the user doesn't explicitly mention "best practices" — anytime an `apply(compiler)` method is being written, hooks are being tapped, or a plugin imports from `webpack-sources`, the rules in this skill apply.

Как установить скилл webpack-plugin-authoring?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл webpack-plugin-authoring запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить webpack-plugin-authoring с