Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
pproenca avatar

Webpack Plugin Authoring

  • 71 installs
  • 191 repo stars
  • Updated July 24, 2026
  • pproenca/dot-skills

webpack-plugin-authoring is a Claude Code skill for security. It helps solo builders move faster with AI-assisted coding.

Key points

  • webpack-plugin-authoring
  • Security
  • AI-coding skill

Webpack Plugin Authoring by the numbers

  • 71 all-time installs (skills.sh)
  • +6 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #1,170 of 2,203 Security skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pproenca/dot-skills --skill webpack-plugin-authoring

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs71
repo stars191
Last updatedJuly 24, 2026
Repositorypproenca/dot-skills

How do I helps with security tasks during ai-assisted development?

Helps with security tasks during AI-assisted development.

Who is it for?

Best when you're working on security and need structured help with webpack-plugin-authoring.

Skip if: Teams with no security needs, or anyone wanting a generic chat assistant without this specific workflow.

When should I use this skill?

When you need to helps with security tasks during ai-assisted development, or when webpack-plugin-authoring is a claude code skill for security. it helps solo builders move faster with ai-assisted coding.

What you get

Structured output aligned to webpack-plugin-authoring: webpack-plugin-authoring; Security; AI-coding skill.

Files

SKILL.mdMarkdownGitHub ↗

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

PriorityCategoryImpactPrefix
1Hook Selection & Tap PatternsCRITICALhook-
2Asset PipelineCRITICALasset-
3Caching & Watch ModeHIGHcache-
4Plugin Lifecycle & StateHIGHlife-
5Schema & Options ValidationMEDIUM-HIGHschema-
6Errors, Warnings & LoggingMEDIUM-HIGHdiag-
7Performance & ParallelismMEDIUMperf-
8Compatibility & PackagingLOW-MEDIUMcompat-

Quick Reference

1. Hook Selection & Tap Patterns (CRITICAL)

  • `hook-tap-method-matches-hook-type` — Match tap/tapAsync/tapPromise to the hook's Sync/Async type
  • `hook-thiscompilation-vs-compilation` — Use thisCompilation to skip child compilations
  • `hook-process-assets-stage` — Pick the right PROCESS_ASSETS_STAGE_* for your mutation
  • `hook-prefer-process-assets-over-emit` — Mutate in processAssets, not emit
  • `hook-bail-hook-return-semantics` — Return undefined from bail hooks unless intentionally stopping
  • `hook-tap-once-not-per-compilation` — Register compiler hooks once in apply, not inside compilation hooks
  • `hook-name-matches-class-name` — Use a stable tap name equal to the class name
  • `hook-normal-module-factory-stages` — Tap normalModuleFactory at the right resolution stage (beforeResolve vs resolve vs afterResolve)

2. Asset Pipeline (CRITICAL)

  • `asset-emit-asset-not-direct-assignment` — Use emitAsset/updateAsset, never compilation.assets[name] = ...
  • `asset-source-from-compiler-webpack` — Import source classes from compiler.webpack.sources
  • `asset-preserve-source-maps` — Use SourceMapSource/ReplaceSource to keep maps attached
  • `asset-set-info-metadata` — Set info.immutable, info.contenthash, info.related when emitting
  • `asset-content-hash-via-output-options` — Hash via compilation.outputOptions.hashFunction, not hardcoded md5
  • `asset-delete-then-emit-loses-info` — Use renameAsset to move; deleteAsset+emitAsset severs chunk references
  • `asset-buffer-not-source-for-binary` — Use buffer() not source() for binary assets

3. Caching & Watch Mode (HIGH)

  • `cache-add-file-dependencies` — Add read files to compilation.fileDependencies
  • `cache-context-dependencies-for-directories` — Use contextDependencies for directory scans
  • `cache-missing-dependencies-for-optional-files` — Add probed-but-absent paths to missingDependencies
  • `cache-build-dependencies-for-persistent-cache` — Declare buildDependencies for persistent cache invalidation
  • `cache-use-input-file-system` — Read via compiler.inputFileSystem, not Node fs

4. Plugin Lifecycle & State (HIGH)

  • `life-constructor-stores-options-only` — Constructor only validates and stores; side effects belong in apply()
  • `life-no-mutable-state-across-builds` — Scope mutable state per-compilation via local const or WeakMap
  • `life-multi-compiler-isolation` — One plugin instance per compiler; or use WeakMap<Compiler, T>
  • `life-cleanup-in-shutdown-hook` — Clean up workers, watchers, fds in compiler.hooks.shutdown
  • `life-defensively-copy-user-options` — Never mutate the user's options object

5. Schema & Options Validation (MEDIUM-HIGH)

  • `schema-validate-with-schema-utils` — Validate via schema-utils.validate() and a JSON Schema
  • `schema-name-and-base-data-path` — Set name and baseDataPath for navigable error messages
  • `schema-additional-properties-false` — Set additionalProperties: false on every object to catch typos
  • `schema-tap-into-validate-hook` — Defer cross-field validation to compiler.hooks.validate (5.106+)

6. Errors, Warnings & Logging (MEDIUM-HIGH)

  • `diag-push-webpack-error-not-throw` — Push WebpackError to compilation.errors, don't throw
  • `diag-use-compilation-get-logger` — Log via compilation.getLogger('Plugin'), not console
  • `diag-attach-loc-to-errors` — Attach loc and module to errors for IDE click-through
  • `diag-warnings-vs-errors-exit-codes` — Errors fail the build; warnings don't — choose intentionally
  • `diag-progress-reporting` — Report progress via context.reportProgress (opt in with context: true)

7. Performance & Parallelism (MEDIUM)

  • `perf-jest-worker-for-cpu-bound-work` — Offload CPU-bound work to a jest-worker pool
  • `perf-cache-results-with-compilation-cache` — Cache expensive work via compilation.getCache(name).providePromise
  • `perf-traverse-chunks-not-modules` — Iterate compilation.chunks not compilation.modules when possible
  • `perf-avoid-source-toString-in-hot-paths` — Avoid source().toString() for assets you only inspect
  • `perf-respect-experimental-options` — Honor experiments.cacheUnaffected / incremental

8. Compatibility & Packaging (LOW-MEDIUM)

  • `compat-webpack-as-peer-dependency` — Declare webpack as peerDependencies, not dependencies
  • `compat-use-compiler-webpack-namespace` — Use compiler.webpack.* instead of require('webpack')
  • `compat-custom-hooks-via-weakmap` — Expose custom hooks via static getCompilationHooks + WeakMap
  • `compat-feature-detection-not-version-check` — Detect APIs directly; don't parse webpack/package.json version
  • `compat-export-shape-and-cjs-esm` — Export the plugin class as default; provide CJS/ESM interop

How to Use

When writing or reviewing plugin code, scan AGENTS.md for the relevant category, then read the individual rule file for the full pattern and rationale.

  • Start at `references/_sections.md` for category definitions and impact levels
  • See `assets/templates/_template.md` for the rule template if you want to extend this skill
  • Read `AGENTS.md` for a compact navigation index

Reference Files

FileDescription
references/_sections.mdCategory definitions, impact levels, descriptions
assets/templates/_template.mdTemplate for authoring new rules
metadata.jsonVersion, discipline, source references

Related skills

FAQ

What does webpack-plugin-authoring do?

webpack-plugin-authoring is a Claude Code skill for security. It helps developers move faster with AI-assisted coding.

When should I use webpack-plugin-authoring?

When you need to helps with security tasks during ai-assisted development, or when webpack-plugin-authoring is a claude code skill for security. it helps developers move faster with ai-assisted coding.

What are the main capabilities?

webpack-plugin-authoring; Security; AI-coding skill.

Securityappsec

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.