.agents/skills/mf-type-check/SKILL.md
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.
npx skillsauth add brGuirra/funkonation mf-type-checkInstall 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/type-check.js --context '<MFContext-JSON>'
Process each item in the output results array and follow the action plan based on the scenario field:
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):
.mf/diagnostics/latest.json to get full error info and the temporary TS config pathnpx tsc --project <tmp-tsconfig> to reproduce errors"skipLibCheck": true as a temporary workaround if errors are complexIf enhancedVersion <= 2.0.1 (result field canReadDiagnostics: false):
npx mf dts and paste the terminal output (which includes the temp TS config path)npx tsc --project <tmp-tsconfig> to reproduce and fix errors"skipLibCheck": true as a temporary workaroundTYPES_NOT_PULLED (Problem 2 — Consumer not pulling remote types)The @mf-types folder is missing. Remote types have not been downloaded.
mf-module-info skill with the remote module name to retrieve the type file URL (@mf-types.zip)
dts in the @module-federation/enhanced plugin config, then revisit Problem 1remoteEntry URL
remoteEntry unreachable: producer deployment is broken or URL is misconfigured; ask user to verify deploymentremoteEntry reachable: type file generation failed or wasn't deployed; ask user to provide local producer path and proceed to Problem 1TSCONFIG_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.
tsconfig.json and add the following to compilerOptions.paths:
{
"compilerOptions": {
"paths": {
"*": ["./@mf-types/*"]
}
}
}
paths already exists, merge the new entry without overwriting existing mappingsnpx tsc --noEmit to verify the type errors are resolvedENV_INCOMPLETE (Missing tsconfig or TypeScript)TYPE-001 · warning — tsconfig.json missing
tsconfig.json not found in the project roottsconfig.json and configure producer type paths in pathsTYPE-001 · warning — typescript dependency missing
typescript not installed in dependencies / devDependenciespnpm add -D typescriptThis 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.
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
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.
development
Check Module Federation local development performance configuration: detect whether recommended performance optimization options are enabled to alleviate slow HMR and slow build speed.