mf-type-check
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/type-check.js --context '<MFContext-JSON>'
Process each item in the output results array and follow the action plan based on the scenario field:
Scenario: TYPE_GENERATION_FAILED (Problem 1 — Producer type files not generated)
The producer failed to generate type files (TYPE-001 error).
If enhancedVersion > 2.0.1 (result field canReadDiagnostics: true):
- Read
.mf/diagnostics/latest.jsonto get full error info and the temporary TS config path - Use the temp TS config path with
npx tsc --project <tmp-tsconfig>to reproduce errors - Fix the TS errors revealed. Refer to FAQ: https://module-federation.io/guide/troubleshooting/type.md
- Offer
"skipLibCheck": trueas a temporary workaround if errors are complex
If enhancedVersion <= 2.0.1 (result field canReadDiagnostics: false):
- Ask the user to run
npx mf dtsand paste the terminal output (which includes the temp TS config path) - Or ask them to copy the error message that contains the temp TS config path
- Once the temp TS config path is known, run
npx tsc --project <tmp-tsconfig>to reproduce and fix errors - Offer
"skipLibCheck": trueas a temporary workaround
Scenario: TYPES_NOT_PULLED (Problem 2 — Consumer not pulling remote types)
The @mf-types folder is missing. Remote types have not been downloaded.
- Call
mf-module-infoskill with the remote module name to retrieve the type file URL (@mf-types.zip)- If no URL returned: the producer has not configured the type file URL or has not generated types. Guide them to enable
dtsin the@module-federation/enhancedplugin config, then revisit Problem 1 - If URL found: attempt to fetch it (or ask the user to verify in browser)
- URL inaccessible: try fetching the
remoteEntryURLremoteEntryunreachable: producer deployment is broken or URL is misconfigured; ask user to verify deploymentremoteEntryreachable: type file generation failed or wasn't deployed; ask user to provide local producer path and proceed to Problem 1
- URL accessible: types were generated and deployed; the issue is in tsconfig — proceed to Problem 3
- URL inaccessible: try fetching the
- If no URL returned: the producer has not configured the type file URL or has not generated types. Guide them to enable
Scenario: TSCONFIG_PATHS_MISSING (Problem 3 — tsconfig not configured for remote types)
The @mf-types folder exists but TypeScript cannot find the types because tsconfig.json is missing the paths mapping.
- Open
tsconfig.jsonand add the following tocompilerOptions.paths:{ "compilerOptions": { "paths": { "*": ["./@mf-types/*"] } } } - If
pathsalready exists, merge the new entry without overwriting existing mappings - After updating, run
npx tsc --noEmitto verify the type errors are resolved
Scenario: ENV_INCOMPLETE (Missing tsconfig or TypeScript)
TYPE-001 · warning — tsconfig.json missing
tsconfig.jsonnot found in the project root- Advise the user to create
tsconfig.jsonand configure producer type paths inpaths
TYPE-001 · warning — typescript dependency missing
typescriptnot installed independencies/devDependencies- Prompt the user to install:
pnpm add -D typescript
This Skill performs configuration and dependency-level checks. It runs
npx tsconly when guided by a valid temp TS config path. It never runstscblindly against the entire project.
More from module-federation/core
mf
All-in-one Module Federation skill. Use when the user asks anything about MF — concepts, configuration, runtime API, shared dependencies, type errors, runtime error code troubleshooting, slow builds, Bridge integration, or adding MF to an existing project.
411mf-integrate
Integrate Module Federation into an existing project — add provider (exposes modules) or consumer (loads remote modules) configuration. Use when the user wants to add Module Federation to an existing Rsbuild / Rspack / Webpack / Modern.js / Next.js / Vite project, set up a remote, create a host app, or quickly consume the demo provider to see MF working. Default role is consumer.
107mf-docs
Answer questions about Module Federation (MF) — configuration, runtime API, build plugins (Webpack/Rspack/Rsbuild/Vite), framework integration (React/Vue/Next.js/Modern.js/Angular), shared dependencies, exposes, remotes, debugging, troubleshooting, and micro-frontend architecture. Use this skill when the user asks anything about module federation, remote modules, shared deps, mf-manifest, federation runtime, or micro-frontends with MF.
100mf-context
Collects the current project's Module Federation context (MFContext) and outputs a structured summary. Serves as the data foundation for all MF diagnostic Skills; can also be called standalone to quickly understand the project's MF configuration.
66mf-shared-deps
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.
61mf-perf
Check Module Federation local development performance configuration: detect whether recommended performance optimization options are enabled to alleviate slow HMR and slow build speed.
60