.agents/skills/mf-perf/SKILL.md
Check Module Federation local development performance configuration: detect whether recommended performance optimization options are enabled to alleviate slow HMR and slow build speed.
npx skillsauth add brGuirra/funkonation mf-perfInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Step 1: Call the mf-context Skill (pass $ARGUMENTS) to collect MFContext.
Step 2: Serialize MFContext to JSON and pass it to the check script via the --context argument:
node scripts/performance-check.js --context '<MFContext-JSON>'
Provide recommendations for each item in the output results and context.bundler.name:
PERF · info — dev.disableAssetsAnalyze (applies to all projects)
dev: { disableAssetsAnalyze: true }
PERF · info — Rspack splitChunks optimization (shown only when bundler.name is rspack or rsbuild)
splitChunks.chunks to "async" reduces initial bundle size and speeds up first-screen loadingoutput: { splitChunks: { chunks: 'async' } }
PERF · info — TypeScript DTS optimization (shown only when typescript dependency is detected)
dts: false in the @module-federation/enhanced configts-go for significantly faster type generationStep 3: After presenting the DTS recommendation, ask the user:
"Would you like me to automatically try switching to
ts-goand verify compatibility?"
If the user confirms, execute the following steps in order:
Backup — copy the current generated type output directory (e.g. @mf-types/) to a timestamped backup path such as @mf-types.bak.<timestamp>/
Configure — set dts.generateTypes.compilerInstance = "tsgo" in the Module Federation config
Install — install the required package:
npm install @typescript/native-preview --save-dev
(use the project's actual package manager from MFContext)
Regenerate — run:
npx mf dts
Verify — diff the newly generated type output against the backup:
ts-go is compatible and the switch is safe; offer to remove the backupWebpack projects do not show Rspack-specific entries to avoid irrelevant suggestions.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
development
Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".
development
Diagnose Module Federation type issues across three categories: (1) producer type file generation failures (TYPE-001), (2) consumer failing to pull remote types, (3) tsconfig not configured to consume remote types. Use when the user encounters TS type errors, missing @mf-types folder, or cannot consume remote module types.
development
Check Module Federation shared dependency configuration: detect shared/externals conflicts, antd/arco transformImport blocking shared deps, and multiple versions of the same shared package in build artifacts. Use when shared dependencies fail to be shared, or host and remote load duplicate instances of a library.